# Dune Docs > This file is very large and may be truncated. For an index of this content, please refer to https://docs.dune.com/llms.txt instead. > Official documentation for building with Dune's data platform, query engine, and API. # Data API Overview Source: https://docs.dune.com/api-reference/api-overview Access Dune's onchain data programmatically via REST endpoints. The Data API provides programmatic access to execute queries, manage data, track usage, and integrate Dune's onchain analytics into your applications, workflows, and environments. See also [APIs and connectors on dune.com](https://dune.com/apis-and-connectors). > [!NOTE] > > For complete endpoint documentation, authentication guides, and code examples, visit the **[API Reference](/api-reference/overview/introduction)** tab. ## Available Endpoints > [card] [Executions and Results](/api-reference/executions/execution-object) > > Execute saved queries and retrieve results in various formats > [card] [Query Management](/api-reference/queries/endpoint/query-object) > > Create, update, and manage your Dune queries programmatically > [card] [Data Uploads](/api-reference/tables/endpoint/overview) > > Upload and manage custom datasets as queryable tables > [card] [Materialized Views](/api-reference/materialized-views/overview) > > Create and refresh materialized views for improved performance > [card] [Pipelines](/api-reference/pipelines/overview) > > Execute and monitor query pipelines with coordinated workflows > [card] [Account Management](/api-reference/usage/overview) > > Monitor API usage and credit consumption ## Full API Reference > [card] [API Reference Documentation](/api-reference/overview/introduction) > > Complete endpoint documentation with authentication, rate limits, SDKs, and detailed code examples → # Analyze Onchain Data Source: https://docs.dune.com/api-reference/apis/quickstart-analyze Execute SQL queries and build custom analytics pipelines with Dune's query execution engine ## Overview Perfect for data teams, researchers, and analysts who need to programmatically analyze onchain data, build custom reports, and create automated analytics pipelines. ## What You'll Learn * Execute SQL queries via API * Retrieve and process results * Handle query parameters * Build analytics pipelines * Filter and transform data ## Prerequisites * A Dune account ([create one free](https://dune.com/auth/register)) * An API key ([get your API key](https://dune.com/apis?tab=keys)) * Basic familiarity with SQL ## Quick Start ### 1. Execute a Simple Query Let's start by executing a query to analyze recent DEX trading volume: ```python Python theme={null} theme={null} from dune_client.client import DuneClient import pandas as pd # Initialize client dune = DuneClient(api_key="YOUR_API_KEY") # Execute SQL query sql = """ SELECT blockchain, DATE_TRUNC('hour', block_time) as hour, SUM(amount_usd) as volume_usd, COUNT(*) as trade_count FROM dex.trades WHERE block_time > now() - interval '24' hour GROUP BY 1, 2 ORDER BY 2 DESC """ results = dune.run_sql(query_sql=sql) # Convert to pandas DataFrame for analysis df = pd.DataFrame(results.result.rows) print(df.head()) ``` ```bash cURL theme={null} theme={null} # Step 1: Execute query curl -X POST "https://api.dune.com/api/v1/sql/execute" \ -H "Content-Type: application/json" \ -H "X-Dune-Api-Key: YOUR_API_KEY" \ -d '{ "sql": "SELECT blockchain, DATE_TRUNC('\''hour'\'', block_time) as hour, SUM(amount_usd) as volume_usd, COUNT(*) as trade_count FROM dex.trades WHERE block_time > now() - interval '\''24'\'' hour GROUP BY 1, 2 ORDER BY 2 DESC", "performance": "medium" }' # Response includes execution_id # {"execution_id":"01JA...","state":"QUERY_STATE_EXECUTING"} # Step 2: Get results (after query completes) curl "https://api.dune.com/api/v1/execution/{execution_id}/results" \ -H "X-Dune-Api-Key: YOUR_API_KEY" ``` > [!NOTE] > > The `run_sql()` function in our Python SDK automatically handles query execution and polling for completion. With cURL, you'll need to poll the execution status endpoint and then fetch results manually. ### 2. Use Parameterized Queries For reusable analytics, create queries with parameters: ```python Python theme={null} theme={null} from dune_client.client import DuneClient from dune_client.query import QueryBase from datetime import datetime, timedelta dune = DuneClient(api_key="YOUR_API_KEY") # Execute a saved query with parameters query_id = 3493826 # Example: Popular DEX analysis query query = QueryBase(query_id=query_id) results = dune.run_query(query=query) # Process results for row in results.result.rows: protocol = row.get('protocol') or row.get('project', 'Unknown') volume = row.get('volume') or row.get('volume_usd', 0) print(f"{protocol}: ${volume:,.2f}") ``` ```typescript TypeScript theme={null} theme={null} import { DuneClient, QueryParameter } from '@duneanalytics/client-sdk'; const client = new DuneClient(process.env.DUNE_API_KEY ?? ''); // Execute a saved query with parameters const queryId = 3493826; const params = { query_parameters: [ QueryParameter.text("blockchain", "ethereum"), QueryParameter.number("min_volume", 1000), QueryParameter.number("days", 7), ] }; client .runQuery(queryId, params) .then((executionResult) => { // Process results executionResult.result?.rows.forEach(row => { console.log(`${row.protocol}: $${row.volume.toLocaleString()}`); }); }); ``` ### 3. Build an Analytics Pipeline Create a pipeline that runs multiple queries and combines results: ```python theme={null} theme={null} from dune_client.client import DuneClient import pandas as pd from datetime import datetime dune = DuneClient(api_key="YOUR_API_KEY") def daily_dex_analysis(): """Run daily DEX analytics pipeline""" # 1. Get overall volume volume_query = """ SELECT SUM(amount_usd) as total_volume, COUNT(DISTINCT taker) as unique_traders FROM dex.trades WHERE block_time > now() - interval '24' hour """ volume_data = dune.run_sql(query_sql=volume_query) # 2. Get top protocols protocol_query = """ SELECT project as protocol, SUM(amount_usd) as volume, COUNT(*) as trades FROM dex.trades WHERE block_time > now() - interval '24' hour GROUP BY 1 ORDER BY 2 DESC LIMIT 10 """ protocol_data = dune.run_sql(query_sql=protocol_query) # 3. Get chain breakdown chain_query = """ SELECT blockchain, SUM(amount_usd) as volume FROM dex.trades WHERE block_time > now() - interval '24' hour GROUP BY 1 ORDER BY 2 DESC """ chain_data = dune.run_sql(query_sql=chain_query) # Combine and process results report = { 'timestamp': datetime.now(), 'total_volume': volume_data.result.rows[0]['total_volume'], 'unique_traders': volume_data.result.rows[0]['unique_traders'], 'top_protocols': pd.DataFrame(protocol_data.result.rows), 'chain_breakdown': pd.DataFrame(chain_data.result.rows) } return report # Run pipeline report = daily_dex_analysis() print(f"24h Volume: ${report['total_volume']:,.2f}") print(f"Unique Traders: {report['unique_traders']:,}") print("\nTop Protocols:") print(report['top_protocols']) ``` ### 4. Filter and Transform Results Use Dune's powerful filtering to refine results: ```python Python theme={null} theme={null} from dune_client.client import DuneClient dune = DuneClient(api_key="YOUR_API_KEY") # Execute query with SQL-based filtering sql = """ SELECT blockchain, project, SUM(amount_usd) as volume_usd FROM dex.trades WHERE block_time > now() - interval '24' hour AND blockchain = 'ethereum' AND amount_usd > 1000000 GROUP BY 1, 2 ORDER BY 3 DESC """ results = dune.run_sql(query_sql=sql) # Results are already filtered server-side for row in results.result.rows: print(row) ``` ```bash cURL theme={null} theme={null} # Execute query, then filter results curl "https://api.dune.com/api/v1/execution/{execution_id}/results?filters=blockchain%20%3D%20%27ethereum%27%20AND%20volume_usd%20%3E%201000000" \ -H "X-Dune-Api-Key: YOUR_API_KEY" ``` > [!TIP] > > Server-side filtering with Dune's SQL-like WHERE clause syntax is unique to Dune's API! It saves bandwidth and processing time compared to filtering client-side. ## Common Patterns ### Scheduled Analytics Run analytics on a schedule (e.g., with cron, Airflow, or cloud scheduler): ```python theme={null} theme={null} import schedule import time from dune_client.client import DuneClient dune = DuneClient(api_key="YOUR_API_KEY") def hourly_report(): """Generate hourly DEX report""" sql = """ SELECT project, SUM(amount_usd) as hourly_volume FROM dex.trades WHERE block_time > now() - interval '1' hour GROUP BY 1 ORDER BY 2 DESC """ results = dune.run_sql(query_sql=sql) # Send to your dashboard/database/Slack send_to_dashboard(results.result.rows) # Run every hour schedule.every().hour.at(":00").do(hourly_report) while True: schedule.run_pending() time.sleep(60) ``` ### Onchain Monitoring Monitor specific metrics and trigger alerts: ```python theme={null} theme={null} from dune_client.client import DuneClient import time dune = DuneClient(api_key="YOUR_API_KEY") def monitor_large_trades(threshold=1000000): """Alert on large trades""" sql = f""" SELECT * FROM dex.trades WHERE block_time > now() - interval '5' minute AND amount_usd > {threshold} ORDER BY block_time DESC """ results = dune.run_sql(query_sql=sql) if results.result.rows: for trade in results.result.rows: send_alert(f"Large trade: ${trade['amount_usd']:,.2f} on {trade['blockchain']}") # Run continuously while True: monitor_large_trades() time.sleep(300) # Check every 5 minutes ``` ## Next Steps > [card] [Execute Queries API](/api-reference/executions/endpoint/execute-sql) > > Full API reference for query execution > [card] [Result Filtering](/api-reference/executions/filtering) > > Advanced filtering techniques > [card] [Materialized Views](/api-reference/materialized-views/create) > > Create and manage materialized views > [card] [DuneSQL Functions](/query-engine/Functions-and-operators) > > Learn DuneSQL functions and operators ## Example Use Cases * **Research Reports:** Generate daily/weekly reports on DeFi protocols, NFT markets, or chain activity * **Automated Dashboards:** Feed data to custom dashboards or BI tools * **Alert Systems:** Monitor metrics and trigger alerts when thresholds are met * **Comparative Analysis:** Compare metrics across chains, protocols, or time periods # Build Custom Dashboards & Reports Source: https://docs.dune.com/api-reference/apis/quickstart-dashboards Fetch query results, manage executions, and create dynamic visualizations in your own applications ## Overview Perfect for product teams embedding analytics into their applications, creating white-label solutions, or building custom reporting tools on top of Dune's data. ## What You'll Learn * Fetch and display query results * Build interactive visualizations * Manage query executions * Create parameterized dashboards * Handle real-time updates * Export data in multiple formats ## Prerequisites * A Dune account ([create one free](https://dune.com/auth/register)) * An API key ([get your API key](https://dune.com/apis?tab=keys)) * Basic knowledge of your frontend framework (React, Vue, etc.) ## Installation Install the required SDK for your language: ```bash TypeScript theme={null} npm install @duneanalytics/client-sdk ``` ```bash Python theme={null} pip install dune-client ``` ## Quick Start ### 1. Fetch Query Results Start by fetching results from an existing Dune query: ```javascript React theme={null} import { useEffect, useState } from 'react'; import { DuneClient } from '@duneanalytics/client-sdk'; function DashboardWidget() { const [data, setData] = useState(null); const [loading, setLoading] = useState(true); const dune = new DuneClient(process.env.DUNE_API_KEY); useEffect(() => { async function fetchData() { try { // Execute query and get results const executionResult = await dune.runQuery({ queryId: 3493826 }); setData(executionResult.result?.rows); } catch (error) { console.error('Error fetching data:', error); } finally { setLoading(false); } } fetchData(); }, []); if (loading) return
Loading...
; return (

DEX Volume (24h)

{data?.map((row, i) => ( ))}
Protocol Volume
{row.protocol} ${row.volume.toLocaleString()}
); } export default DashboardWidget; ``` ```python Python (Flask) theme={null} from flask import Flask, jsonify, render_template from dune_client.client import DuneClient from dune_client.query import QueryBase app = Flask(__name__) # DuneClient will read the DUNE_API_KEY environment variable dune = DuneClient() @app.route('/api/dashboard/dex-volume') def get_dex_volume(): """API endpoint for DEX volume data""" query = QueryBase(query_id=3493826) results = dune.run_query(query) return jsonify({ 'data': results.get_rows(), 'metadata': { 'execution_id': results.execution_id, 'row_count': len(results.get_rows()) } }) @app.route('/dashboard') def dashboard(): """Render dashboard page""" return render_template('dashboard.html') if __name__ == '__main__': app.run(debug=True) ``` ```python Python (Streamlit) theme={null} import streamlit as st from dune_client.client import DuneClient from dune_client.query import QueryBase import pandas as pd import plotly.express as px # DuneClient will read the DUNE_API_KEY environment variable dune = DuneClient() st.set_page_config(page_title="DEX Analytics", layout="wide") # Dashboard title st.title("📊 DEX Analytics Dashboard") # Fetch data @st.cache_data(ttl=300) # Cache for 5 minutes def load_data(): query = QueryBase(query_id=3493826) results = dune.run_query(query) return pd.DataFrame(results.get_rows()) df = load_data() # Display metrics col1, col2, col3 = st.columns(3) with col1: st.metric("Total Volume", f"${df['volume'].sum():,.0f}") with col2: st.metric("Total Trades", f"{df['trade_count'].sum():,}") with col3: st.metric("Protocols", len(df)) # Visualization fig = px.bar(df, x='protocol', y='volume', title='Volume by Protocol') st.plotly_chart(fig, use_container_width=True) # Data table st.dataframe(df, use_container_width=True) ``` ### 2. Build Interactive Visualizations Create charts using popular visualization libraries: ```python Plotly theme={null} from dune_client.client import DuneClient import plotly.graph_objects as go import pandas as pd dune = DuneClient(api_key="YOUR_API_KEY") # Fetch data sql = """ SELECT DATE_TRUNC('hour', block_time) as time, blockchain, SUM(amount_usd) as volume FROM dex.trades WHERE block_time > now() - interval '24' hour GROUP BY 1, 2 ORDER BY 1 """ results = dune.run_sql(query_sql=sql) df = pd.DataFrame(results.get_rows()) # Create interactive chart fig = go.Figure() for blockchain in df['blockchain'].unique(): chain_data = df[df['blockchain'] == blockchain] fig.add_trace(go.Scatter( x=chain_data['time'], y=chain_data['volume'], name=blockchain, mode='lines' )) fig.update_layout( title='DEX Volume by Chain', xaxis_title='Time', yaxis_title='Volume (USD)', hovermode='x unified' ) fig.show() ``` > [!NOTE] > > **Important Limitations:** > > * **TypeScript SDK:** The TypeScript SDK (`@duneanalytics/client-sdk`) only supports saved queries, not direct SQL execution. For JavaScript/TypeScript applications, create a saved query on Dune and use `dune.runQuery({ queryId })`. > > * **Python SDK:** Direct SQL execution with `dune.run_sql()` requires a Dune Plus subscription. For most users, use saved queries with `query = QueryBase(query_id=123)` and `dune.run_query(query)`. > > The example above shows SQL execution using the Python SDK (Plus subscription required). ### 3. Parameterized Dashboards Create dashboards with user-configurable filters using saved queries: ```typescript theme={null} import { useState, useEffect } from 'react'; import { DuneClient, QueryParameter } from '@duneanalytics/client-sdk'; interface DashboardFilters { blockchain: string; protocol: string; timeRange: string; } function ParameterizedDashboard() { const [filters, setFilters] = useState({ blockchain: 'ethereum', protocol: 'all', timeRange: '24h' }); const [data, setData] = useState(null); const dune = new DuneClient(process.env.DUNE_API_KEY!); useEffect(() => { async function fetchData() { // Use a saved query with parameters instead of SQL const queryId = 3493826; // Your parameterized query ID const executionResult = await dune.runQuery({ queryId, query_parameters: [ QueryParameter.text("blockchain", filters.blockchain), QueryParameter.text("time_range", filters.timeRange), ] }); setData(executionResult.result?.rows); } fetchData(); }, [filters]); return (
{data && }
); } ``` ### 4. Real-time Dashboard Updates Implement automatic data refreshes: ```javascript theme={null} import { useEffect, useState, useCallback } from 'react'; import { DuneClient } from '@duneanalytics/client-sdk'; function RealtimeDashboard() { const [data, setData] = useState(null); const [lastUpdate, setLastUpdate] = useState(null); const [autoRefresh, setAutoRefresh] = useState(true); const dune = new DuneClient(process.env.DUNE_API_KEY); const fetchData = useCallback(async () => { try { const executionResult = await dune.runQuery({ queryId: 3493826 }); setData(executionResult.result?.rows); setLastUpdate(new Date()); } catch (error) { console.error('Failed to fetch data:', error); } }, []); useEffect(() => { // Initial fetch fetchData(); // Set up auto-refresh let interval; if (autoRefresh) { interval = setInterval(fetchData, 60000); // Refresh every minute } return () => { if (interval) clearInterval(interval); }; }, [fetchData, autoRefresh]); return (
{lastUpdate && ( Last updated: {lastUpdate.toLocaleTimeString()} )}
{data && }
); } ``` ## Advanced Patterns ### Multi-Query Dashboard Combine data from multiple queries: ```python theme={null} from dune_client.client import DuneClient from dune_client.query import QueryBase from concurrent.futures import ThreadPoolExecutor dune = DuneClient(api_key="YOUR_API_KEY") def build_comprehensive_dashboard(): """Fetch data from multiple queries in parallel""" query_ids = { 'volume': 3493826, 'users': 3493827, 'protocols': 3493828, 'chains': 3493829 } # Use ThreadPoolExecutor for parallel execution with ThreadPoolExecutor(max_workers=4) as executor: futures = { name: executor.submit( lambda qid: dune.run_query(QueryBase(query_id=qid)), query_id ) for name, query_id in query_ids.items() } # Build dashboard data structure dashboard = { name: future.result().get_rows() for name, future in futures.items() } return dashboard # Run function (no async/await needed) dashboard_data = build_comprehensive_dashboard() ``` > [!NOTE] > > The Python Dune SDK does not support async/await. For parallel query execution, use `ThreadPoolExecutor` as shown above to execute multiple queries concurrently. ### Export Data Provide data export functionality: ```typescript theme={null} import { DuneClient } from '@duneanalytics/client-sdk'; class DataExporter { private dune: DuneClient; constructor(apiKey: string) { this.dune = new DuneClient(apiKey); } async exportToCSV(queryId: number, filename: string) { // Use Dune's CSV endpoint const response = await fetch( `https://api.dune.com/api/v1/query/${queryId}/results/csv`, { headers: { 'X-Dune-Api-Key': process.env.DUNE_API_KEY! } } ); const csv = await response.text(); // Trigger download const blob = new Blob([csv], { type: 'text/csv' }); const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; a.click(); } async exportToJSON(queryId: number) { const executionResult = await this.dune.runQuery({ queryId }); const json = JSON.stringify(executionResult.result?.rows, null, 2); const blob = new Blob([json], { type: 'application/json' }); const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'data.json'; a.click(); } } // Usage function ExportButton({ queryId }: { queryId: number }) { const exporter = new DataExporter(process.env.DUNE_API_KEY!); return (
); } ``` ### Caching Strategy Implement smart caching for better performance: ```python theme={null} from flask import Flask, jsonify from flask_caching import Cache from dune_client.client import DuneClient from dune_client.query import QueryBase import os app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) # DuneClient will read the DUNE_API_KEY environment variable dune = DuneClient() @app.route('/api/data/') @cache.cached(timeout=300) # Cache for 5 minutes def get_query_data(query_id): """Cached endpoint for query results""" query = QueryBase(query_id=query_id) results = dune.run_query(query) return jsonify({ 'data': results.get_rows(), 'cached': False, # First request 'execution_id': results.execution_id }) @app.route('/api/data//refresh') def refresh_data(query_id): """Force refresh cached data""" cache.delete(f'view//api/data/{query_id}') query = QueryBase(query_id=query_id) results = dune.run_query(query) return jsonify({ 'data': results.get_rows(), 'cached': False, 'refreshed': True }) ``` ## Dashboard Templates ### Analytics Dashboard ```javascript theme={null} // Complete analytics dashboard example using saved queries import { useEffect, useState } from 'react'; import { DuneClient } from '@duneanalytics/client-sdk'; import { LineChart, BarChart, PieChart } from 'recharts'; function AnalyticsDashboard() { const [metrics, setMetrics] = useState({ totalVolume: 0, activeUsers: 0, avgTransactionSize: 0, topProtocols: [] }); const dune = new DuneClient(process.env.DUNE_API_KEY); useEffect(() => { async function loadDashboard() { // Use saved query IDs for each metric const volumeQueryId = 123456; // Your volume query ID const usersQueryId = 123457; // Your users query ID const protocolsQueryId = 123458; // Your protocols query ID const [volume, users, protocols] = await Promise.all([ dune.runQuery({ queryId: volumeQueryId }), dune.runQuery({ queryId: usersQueryId }), dune.runQuery({ queryId: protocolsQueryId }) ]); setMetrics({ totalVolume: volume.result?.rows[0].total, activeUsers: users.result?.rows[0].total, avgTransactionSize: volume.result?.rows[0].total / users.result?.rows[0].total, topProtocols: protocols.result?.rows }); } loadDashboard(); // Refresh every 5 minutes const interval = setInterval(loadDashboard, 300000); return () => clearInterval(interval); }, []); return (

DEX Analytics

); } ``` ## Next Steps > [card] [Execute Queries API](/api-reference/executions/endpoint/execute-sql) > > Full API reference for query execution > [card] [Result Filtering](/api-reference/executions/filtering) > > Filter and transform data efficiently > [card] [CSV Export](/api-reference/executions/endpoint/get-execution-result-csv) > > Export data in CSV format > [card] [Webhooks](/api-reference/webhooks/webhook) > > Get notified when queries complete ## Example Use Cases * **Internal Analytics:** Build custom dashboards for your team * **White-label Solutions:** Embed Dune-powered analytics in your product * **Client Reporting:** Generate automated reports for clients * **Portfolio Trackers:** Create personalized portfolio dashboards * **Protocol Dashboards:** Build public dashboards for your protocol # CI/CD & Workflows Source: https://docs.dune.com/api-reference/connectors/dbt/cicd-workflows Set up development workflows and GitHub Actions for dbt on Dune The dbt template includes pre-configured GitHub Actions workflows for both CI and production deployments. > [!NOTE] > > **Credit Usage in CI/CD** > > All dbt executions triggered by CI/CD workflows consume Dune credits. This includes pull request workflows, deploy workflows, and scheduled runs. The template repository ships with automated triggers **disabled by default** so you can enable them on your own terms. See [Pricing & Best Practices](/api-reference/connectors/dbt/pricing-best-practices) for optimization guidance. ## Understanding Credit Costs in CI/CD When you run dbt models through CI/CD, each execution consumes credits from your Dune plan. Here are a few things to keep in mind: * **Each push or PR can trigger a pipeline run.** If your GitHub Actions run on every commit, frequent pushes during development will each use credits. * **All executions draw from the same pool.** Whether a query is triggered locally, from a CI runner, or a scheduled job, it counts the same way. * **Concurrent executions add up.** Multiple CI jobs running simultaneously (e.g., several open PRs) each consume credits independently. * **Timed-out queries still use credits.** If a query runs for 30 minutes before timing out, credits are consumed for the compute used during that time. **Tips for managing costs:** * Start with `workflow_dispatch` (manual trigger only) until you've validated your models * Use `--select state:modified` to only run changed models in CI * Set appropriate query timeouts to keep costs predictable * Monitor your credit usage in the Dune dashboard after enabling automated workflows ## Development Workflow ### Local Development 1. **Create a feature branch**: ```bash theme={null} git checkout -b feature/new-transformation ``` 2. **Develop models locally**: ```bash theme={null} # Run specific model uv run dbt run --select my_model # Run with full refresh (ignore incremental logic) uv run dbt run --select my_model --full-refresh # Run tests for specific model uv run dbt test --select my_model ``` 3. **Query your tables on Dune**: * Remember to use the `dune.` catalog prefix: ```sql theme={null} SELECT * FROM dune.my_team__tmp_alice.my_model ``` ### Pull Request Workflow 1. **Push changes and open PR**: ```bash theme={null} git add . git commit -m "Add new transformation model" git push origin feature/new-transformation ``` 2. **Automated CI runs**: * CI enforces that branch is up-to-date with main * Runs modified models with `--full-refresh` in isolated schema `{team}__tmp_pr{number}` * Runs tests on modified models * Tests incremental run logic > [!NOTE] > > **Tip:** The pull request workflow is disabled by default in the template. To enable it, uncomment the `on:` trigger block in `.github/workflows/dbt_ci.yml`. Each PR sync event (new commits pushed to a PR branch) will trigger a run and consume credits. 3. **Team review**: * Review transformation logic in GitHub * Check CI results * Approve and merge when ready ### Production Deployment The [production workflow](https://github.com/duneanalytics/dune-dbt-template/blob/main/.github/workflows/dbt_prod.yml) includes an hourly schedule (0 \* \* \* \*), but it's commented out by default. You can enable it by uncommenting the corresponding lines when you're ready to run production jobs automatically. > [!NOTE] > > **Tip:** The deploy and scheduled workflows are disabled by default. Only `workflow_dispatch` (manual trigger) is enabled out of the box. Uncomment the `push` and `schedule` triggers in the respective workflow files when you're ready to automate. 1. **State comparison**: Uses manifest from previous run to detect changes 2. **Full refresh modified models**: Any changed models run with `--full-refresh` 3. **Incremental run**: All models run with normal incremental logic 4. **Testing**: All models are tested 5. **Notification**: Email sent on failure ## CI/CD with GitHub Actions The template includes two GitHub Actions workflows: ### CI Workflow (`.github/workflows/ci.yml`) Runs on every pull request: ```yaml theme={null} - Enforces branch is up-to-date with main - Sets DEV_SCHEMA_SUFFIX to pr{number} - Runs modified models with --full-refresh - Tests modified models - Runs incremental logic test - Tests incremental models ``` **Required GitHub Secrets**: * `DUNE_API_KEY` **Required GitHub Variables**: * `DUNE_TEAM_NAME` ### Production Workflow (`.github/workflows/prod.yml`) Runs hourly on main branch: ```yaml theme={null} - Downloads previous manifest (for state comparison) - Full refreshes any modified models - Tests modified models - Runs all models (incremental logic) - Tests all models - Uploads manifest for next run - Sends email notification on failure ``` ## Troubleshooting ### Connection Issues **Problem**: `dbt debug` fails with connection error. **Solution**: * Verify `DUNE_API_KEY` and `DUNE_TEAM_NAME` are set correctly * Check that you have Data Transformations enabled for your team * Ensure `transformations: true` is in session properties ### Models Not Appearing in Dune **Problem**: Can't find tables in Data Explorer or queries. **Solution**: * Check the Connectors section in Data Explorer under "My Data" * Remember to use `dune.` catalog prefix in queries * Verify the table was created in the correct schema ### Incremental Models Not Working **Problem**: Incremental models always do full refresh. **Solution**: * Check that `is_incremental()` macro is used correctly * Verify the `unique_key` configuration matches your table structure * Ensure the target table exists before running incrementally ### CI/CD Failures **Problem**: GitHub Actions failing. **Solution**: * Verify secrets and variables are set correctly in GitHub * Check that branch is up-to-date with main * Review workflow logs for specific errors ## Limitations ### Metadata Discovery Limited support for some metadata discovery queries like `SHOW TABLES` or `SHOW SCHEMAS` in certain contexts. This may affect autocomplete in some BI tools. **Workaround**: Use the [Data Explorer](/web-app/query-editor/data-explorer) or query `information_schema` directly. ### Result Set Size Large result sets may timeout. Consider: * Paginating with `LIMIT` and `OFFSET` * Narrowing filters to reduce data volume * Breaking complex queries into smaller parts ### Read-After-Write Consistency Tables and views are available for querying immediately after creation, but catalog caching may cause brief delays (typically \< 60 seconds) before appearing in some listing operations. ### Rate Limits Rate limits for Data Transformations align with the Dune Data API: * Requests are subject to the same rate limiting as API executions * Large query operations run on the [Large Query Engine tier](/query-engine/query-executions#large-engine-size) * See [Rate Limits](/api-reference/overview/rate-limits) for detailed information # dbt Connector + Datashare Source: https://docs.dune.com/api-reference/connectors/dbt/datashares Sync dbt-managed tables from Dune into your Snowflake, Databricks, or S3 datashare > [!NOTE] > > dbt Connector + Datashare is available only to existing customers of this offering and is no longer available to new customers. [Learn more about Enterprise Datashare](https://dune.com/enterprise). Use dbt to publish transformation outputs from your private Dune namespace to your team's Datashare destination: [Snowflake](/datashare/datashare-snowflake), [Databricks](/datashare/datashare-databricks), or [S3](/datashare/datashare-s3). This is useful when you want to keep the transformation logic on Dune, but consume the resulting tables inside your own warehouse. > [!WARNING] > > dbt Connector + Datashare is an enterprise workflow that requires both **Data Transformations** and **Datashare** to be enabled for your team. > [!NOTE] > > Datashare syncs are billed based on bytes transferred and byte-months of storage for the synced table. Automated dbt runs also consume query credits. ## How It Works Datashare syncs use the table's change data feed (CDF): 1. dbt builds a `table` or `incremental` model with change data feed enabled in your Dune namespace. 2. A dbt post-hook runs `ALTER TABLE ... EXECUTE sync_datashare(...)` on that table. 3. Dune registers the sync and copies the table to your team's destination. Dune resolves the destination from your team's configuration. 4. Dune then applies the table's changes every five minutes by default. 5. You monitor the sync in `dune.datashare.table_syncs` and `dune.datashare.table_sync_runs`. ## Prerequisites * Enterprise account with Data Transformations enabled * Datashare destination configured for your team by Dune * Dune API key with write access * A dbt project using the Dune Trino connector ## Recommended Starting Point The fastest way to get started is the public template repo: > [card] [dune-dbt-template](https://github.com/duneanalytics/dune-dbt-template) > > Includes the datashare macro, a prod-only post-hook, and an opt-in example model. ## Add The dbt Post-Hook Add the datashare post-hook to your `dbt_project.yml`: ```yaml theme={null} models: your_project: +post-hook: - sql: "{{ datashare_trigger_sync() }}" transaction: true ``` > [!WARNING] > > **The hook must be restricted to your production target.** Without a target guard, a local `dbt run` or a CI job writes to a temporary schema (`__tmp_`) and registers **that** schema as a real datashare, shipping it to your destination warehouse. Because dev schemas are ephemeral, the resulting destination table and view can outlive the source table that created them. > > If you are adding datashare to an existing dbt project rather than starting from the template, make sure your `datashare_trigger_sync()` macro opens with this check: > > ```jinja theme={null} > {% macro datashare_trigger_sync() %} > {%- if target.name != 'prod' -%} > {{ log('Skipping datashare sync for ' ~ this.schema ~ '.' ~ this.identifier ~ ': datashare post-hook only runs on the prod target.', info=True) }} > {{ return('') }} > {%- endif -%} > > {#- ... build and return the ALTER TABLE ... EXECUTE sync_datashare(...) statement -#} > {%- endmacro %} > ``` > > When the guard is working you will see one `Skipping datashare sync for ...: datashare post-hook only runs on the prod target` line per datashare-enabled model on every non-prod run. ## Check Table Size Before Syncing Datashare syncs are billed by reported bytes written during the sync and by byte-months of storage at your target warehouse, so it is worth checking how large a source table is before you enable a sync. You can read the Dune source table's on-disk size from the `$size` metadata table, but you first need to know the **physical** table name that Dune is scanning, which may differ from the logical name you query. You can give a list of tables to the [Dune MCP](/docs/agents/mcp#dune-mcp) and it can calculate their sizes. Alternatively, you can use the following two-step workflow from any Trino-compatible client (the Dune SQL Editor, a notebook, or `dbt run-operation`). > [!NOTE] > > These queries are read-only and do not require the `transformations=true` session property. The `$size` suffix must be attached to the table name and wrapped in double quotes (for example, `schema."table$size"`). ### Step 1: Find The Physical Table Name With `EXPLAIN` Run `EXPLAIN` against the table you want to size up: ```sql theme={null} EXPLAIN SELECT * FROM team.schema.table; ``` In the query plan, look for the `TableScan` or `ScanProject` node. The `table = ...` value is the physical table name you need for step 2. The catalog prefix before the colon (for example `dune:` or `delta_prod:`) is part of the connector and should be dropped — only the `schema.table` portion is used in the size query. ### Step 2: Query The `$size` Metadata Table Plug the physical `schema.table` name from step 1 into the size query, wrapping `table$size` in double quotes: ```sql theme={null} SELECT size_bytes, size_bytes / 1000.0 / 1000 / 1000 AS source_size_gb, size_bytes / 1000.0 / 1000 / 1000 / 1000 AS source_size_tb FROM dune.."$size"; ``` This returns the Dune source table's at-rest size using SI units (`1 GB = 1,000,000,000 bytes`). Treat it as a planning estimate only: it is not the destination warehouse table size, and it is not the exact billing meter. Destination storage can differ because each warehouse uses different formats, compression, layout, and metadata. Datashare sync billing is based on bytes written during synchronization, as reported by Dune's sync system. This can differ from both the Dune source table at-rest size and the destination warehouse at-rest size. ### Example 1: A dbt-Created Table For the dbt model `dune.dune.lineage_query_2`: ```sql theme={null} EXPLAIN SELECT * FROM dune.dune.lineage_query_2; ``` The `TableScan` line in the plan reads: ``` TableScan[table = dune:dune.lineage_query_2] ``` Here the physical name matches the logical name, so the size query is: ```sql theme={null} SELECT size_bytes, size_bytes / 1000.0 / 1000 / 1000 AS source_size_gb, size_bytes / 1000.0 / 1000 / 1000 / 1000 AS source_size_tb FROM dune.dune."lineage_query_2$size"; ``` ### Example 2: A Dune-Managed Table With A Suffix For a Dune-managed table such as `base.transactions`: ```sql theme={null} EXPLAIN SELECT * FROM base.transactions; ``` The plan shows a `ScanProject` node referencing a different physical name: ``` ScanProject[table = delta_prod:base.transactions_0002] ``` Notice the `_0002` suffix on the physical table — that is the name you must use in the size query (drop the `delta_prod:` catalog prefix): ```sql theme={null} SELECT size_bytes, size_bytes / 1000.0 / 1000 / 1000 AS source_size_gb, size_bytes / 1000.0 / 1000 / 1000 / 1000 AS source_size_tb FROM base."transactions_0002$size"; ``` > [!TIP] > > After confirming the source-size estimate is acceptable, run a one-off sync with `dry_run: true` (see [Manual Syncs](#manual-syncs)) to preview the generated SQL before enabling the post-hook in production. ## Configure A Model Enable datashare in `meta.datashare_sync` on a `table` or `incremental` model, and enable change data feed on the table: ```sql theme={null} {{ config( materialized = 'incremental', incremental_strategy = 'merge', unique_key = ['block_number', 'block_date'], meta = { "datashare_sync": { "enabled": true, "partitioning": "block_date" } }, properties = { "partitioned_by": "ARRAY['block_date']", "change_data_feed_enabled": "true" } ) }} select ... ``` The post-hook generates this statement: ```sql theme={null} ALTER TABLE dune.your_team.my_model EXECUTE sync_datashare( unique_key_columns => ARRAY['block_number', 'block_date'], full_refresh => false, partitioning => 'block_date' ) ``` Each sync applies all table changes since the last completed sync. Date filters in the model bound only what dbt reads from its sources. ## Configuration | Setting | Required | Description | | - | - | - | | `meta.datashare_sync.enabled` | Yes | Must be the boolean `true` to register the sync. | | `meta.datashare_sync.partitioning` | No | A date or timestamp column name that partitions the delivered table. Use a raw column, not an expression. | | `unique_key` | Yes | Model-level column or list of columns that identify a row. Dune uses it to apply changes. Do not repeat it under `meta.datashare_sync`. | | `properties.change_data_feed_enabled` | Yes | Must be `"true"` when dbt creates the table. | The template macro fails compilation if an enabled model has no `unique_key`, does not enable change data feed, or sets an unknown key under `meta.datashare_sync`. > [!NOTE] > > Adding `change_data_feed_enabled` to an existing model does not change its existing table. Rebuild the table once with `--full-refresh`. The source table must keep its change history for at least seven days. Dune rejects the sync if `delta.logRetentionDuration` or `delta.deletedFileRetentionDuration` is set below seven days. The defaults meet this requirement. Changing the `partitioning` of an existing share requires a full refresh. Datashare does not support `UINT256` and `INT256` columns. Cast them to a supported type in your model, for example `cast(amount_raw as decimal(38, 0))` for exact values or `cast(amount_raw as double)` for calculations. ## Sync Schedule Registering a table creates a Dune sync schedule that applies changes every five minutes by default. This schedule is separate from your dbt schedule: your dbt runs control when the source table changes, and frequent syncs do not resend the full table. Setting `enabled` to `false` or pausing your dbt workflow does not stop a registered sync. To stop it, [remove the table from Datashare](#remove-a-table-from-datashare). ## Full Refresh Behavior A full refresh copies the current table again instead of applying changes since the last sync. Dune handles the first copy and any needed recovery automatically, so use `full_refresh => true` only as a manual override. The post-hook sets `full_refresh` as follows: * `table` models: always `true`, because each build recreates the table with a new change history. * `incremental` models: `true` only when dbt runs a full refresh, for example with `--full-refresh`. * Manual syncs: `false` unless you pass `full_refresh: true`. ## Manual Syncs You can trigger a sync manually with `dbt run-operation`: ```bash theme={null} uv run dbt run-operation datashare_trigger_sync_operation --target prod --args ' model_selector: my_model dry_run: true ' ``` This is useful for previewing the generated SQL or running one-off syncs outside a normal `dbt run`. > [!WARNING] > > **Always pass `--target prod`.** This is a separate entry point from the post-hook and does not inherit its guard. It reads the source schema from the dbt manifest, so on the default `dev` target it registers your temporary schema as a real datashare. `dry_run: true` is safe on any target, since it only prints SQL. ## Monitor Syncs ```sql theme={null} SELECT * FROM dune.datashare.table_syncs WHERE source_schema = 'your_team'; SELECT * FROM dune.datashare.table_sync_runs WHERE source_schema = 'your_team' ORDER BY created_at DESC; ``` Use `table_syncs` for the current registration state and `table_sync_runs` for execution history. ## Remove A Table From Datashare ```sql theme={null} ALTER TABLE dune.your_team.my_table EXECUTE delete_datashare_sync ``` This stops the sync and revokes access at the destination. It does not drop the Dune table. Also set `meta.datashare_sync.enabled` to `false`, or the next prod run registers the table again. ## Migrate From `meta.datashare` The earlier `meta.datashare` configuration, with `target_type`, `target_region`, and a time window, is no longer supported. Models that still use it fail compilation in the current template. To migrate a model: 1. Replace `meta.datashare` with `meta.datashare_sync`, enable change data feed, and set a `unique_key` as shown in [Configure A Model](#configure-a-model). 2. Run the model on the prod target. The old and new shares can both be active. 3. After the first successful sync, remove the old share: ```sql theme={null} ALTER TABLE dune.your_team.my_table EXECUTE delete_datashare ``` ## Reference * [Supported SQL Operations](/api-reference/connectors/sql-operations#datashare-operations) * [dbt Connector Overview](/api-reference/connectors/dbt/overview) * [Datashare Overview](/datashare/datashare) # Getting Started Source: https://docs.dune.com/api-reference/connectors/dbt/getting-started Set up your dbt project and connect to Dune The fastest way to get started is using our [dbt template repository](https://github.com/duneanalytics/dune-dbt-template), which includes pre-configured profiles, sample models, and CI/CD workflows. ## Prerequisites * **Dune Enterprise account** with Data Transformations enabled * **Dune API key** ([generate one here](https://dune.com/settings/api)) * **Team name** on Dune (defines your namespace) * **dbt installed locally** (we recommend using `uv` for dependency management) ## 1. Use the Template Repository We provide a complete dbt project template to get started quickly: **GitHub Template**: [github.com/duneanalytics/dune-dbt-template](https://github.com/duneanalytics/dune-dbt-template) The template includes: * Pre-configured dbt profiles for dev and prod environments * Sample models demonstrating all model types * GitHub Actions workflows for CI/CD * Cursor AI rules for dbt best practices on Dune * Example project structure following dbt conventions > [!NOTE] > > **CI Workflows Are Disabled by Default** > > The template repository ships with GitHub Actions CI workflows **disabled by default**. Since each dbt execution consumes Dune credits, we recommend: > > 1. Running models locally first to get familiar with your pipeline > 2. Reviewing the [Pricing & Best Practices](/api-reference/connectors/dbt/pricing-best-practices) guide > 3. Enabling workflows when you're ready by uncommenting triggers in the workflow files (see the [template README](https://github.com/duneanalytics/dune-dbt-template#-note-) for instructions) **To use the template:** ```bash theme={null} # Create a new repository from the template # (Use GitHub's "Use this template" button) # Clone your new repository git clone https://github.com/your-org/your-dbt-project.git cd your-dbt-project # Install dependencies uv sync # Set up environment variables (see next section) ``` ## 2. Configure Environment Variables Set these required environment variables: ```bash theme={null} # Required export DUNE_API_KEY="your_api_key_here" export DUNE_TEAM_NAME="your_team_name" # Optional - for personal dev environments export DEV_SCHEMA_SUFFIX="alice" ``` **Persistence options:** ```bash theme={null} # Option 1: Add to shell profile (recommended for local dev) echo 'export DUNE_API_KEY="your_key"' >> ~/.zshrc echo 'export DUNE_TEAM_NAME="your_team"' >> ~/.zshrc source ~/.zshrc # Option 2: Use a .env file (remember to add to .gitignore!) # Option 3: Set in CI/CD secrets for production deployments ``` ## 3. Configure dbt Profile Your `profiles.yml` should look like this: ```yaml theme={null} dune: outputs: dev: type: trino method: jwt user: "{{ env_var('DUNE_TEAM_NAME') }}" jwt_token: "{{ env_var('DUNE_API_KEY') }}" host: trino.api.dune.com port: 443 database: dune schema: "{{ env_var('DUNE_TEAM_NAME') }}__tmp_{{ env_var('DEV_SCHEMA_SUFFIX', '') }}" http_scheme: https session_properties: transformations: true prod: type: trino method: jwt user: "{{ env_var('DUNE_TEAM_NAME') }}" jwt_token: "{{ env_var('DUNE_API_KEY') }}" host: trino.api.dune.com port: 443 database: dune schema: "{{ env_var('DUNE_TEAM_NAME') }}" http_scheme: https session_properties: transformations: true target: dev ``` > [!NOTE] > > The `transformations: true` session property is **required**. This tells Dune that you're running data transformation operations that need write access. ## 4. Test Your Connection ```bash theme={null} # Install dbt dependencies uv run dbt deps # Test connection uv run dbt debug # Run your first model uv run dbt run # Run tests uv run dbt test ``` ## Project Structure The template repository follows standard dbt conventions: ``` your-dbt-project/ ├── models/ │ ├── templates/ # Example models for each strategy │ │ ├── dbt_template_view_model.sql │ │ ├── dbt_template_table_model.sql │ │ ├── dbt_template_merge_incremental_model.sql │ │ ├── dbt_template_delete_insert_incremental_model.sql │ │ └── dbt_template_append_incremental_model.sql │ └── your_models/ # Your transformation models ├── macros/ │ └── dune_dbt_overrides/ │ └── get_custom_schema.sql # Schema naming logic ├── tests/ # Custom data tests ├── seeds/ # CSV seed files ├── snapshots/ # Snapshot definitions ├── analyses/ # Ad-hoc analyses ├── .github/workflows/ # CI/CD workflows (disabled by default—see note above) ├── profiles.yml # dbt connection profile ├── dbt_project.yml # Project configuration └── README.md ``` ## Schema Organization Schemas are automatically organized based on your dbt target: | Target | DEV_SCHEMA_SUFFIX | Schema Name | Use Case | | - | - | - | - | | `dev` | Not set | `{team}__tmp_` | Local development (default) | | `dev` | Set to `alice` | `{team}__tmp_alice` | Personal dev space | | `dev` | Set to `pr123` | `{team}__tmp_pr123` | CI/CD per PR | | `prod` | (any) | `{team}` | Production tables | This is controlled by the `get_custom_schema.sql` macro in the template. ## How It Works ### Namespace Isolation All tables and views you create are organized into your team's namespace: * **Production schema**: `{your_team}` - For production tables * **Development schemas**: `{your_team}__tmp_*` - For development and testing This ensures complete isolation between teams and between development/production environments. ### Write Operations Execute SQL statements to create and manage your data: 1. **Create tables and views** in your namespace 2. **Insert, update, or merge** data using standard SQL 3. **Drop tables** when no longer needed 4. **Optimize and vacuum** tables for optimal performance when querying these tables All operations are authenticated via your Dune API key and restricted to your team's namespace. ### Data Access **What You Can Read:** * **All public Dune datasets**: Full access to blockchain data across all supported chains * **Your uploaded data**: Private datasets you've uploaded to Dune * **Your transformation outputs**: Tables and views created in your namespace * **Materialized views**: Views that are materialized as tables in your namespace via the APP **What You Can Write:** * **Your team namespace**: `{team_name}` for production tables * **Development namespaces**: `{team_name}__tmp_*` for dev and testing * **Private by default**: All created tables are private unless explicitly made public **Access Control:** * Write operations are restricted to your team's namespaces only * Cannot write to public schemas or other teams' namespaces * Schema naming rules enforced: no `__tmp_` in team handles ## Querying dbt Models on Dune > [!WARNING] > > When querying your dbt models in the Dune app or via the API, you **must** use the `dune.` catalog prefix. **Pattern**: `dune.{schema}.{table}` ```sql theme={null} -- ❌ Won't work (dbt logs show this but it won't work on Dune) SELECT * FROM my_team.my_model -- ✅ Correct SELECT * FROM dune.my_team.my_model SELECT * FROM dune.my_team__tmp_alice.dev_model ``` dbt logs omit the catalog name for readability, so remember to add `dune.` when using queries in the Dune app. ## Where Your Data Appears Tables and views created through dbt appear in the **Data Explorer** under: **My Data → Connectors** ![Data Transformations in Data Explorer under Connectors](https://mintcdn.com/dune/Hf9LNgq7l6rcjPCE/images/data-transformations-explorer.png?fit=max\&auto=format\&n=Hf9LNgq7l6rcjPCE\&q=85\&s=2809cd991acbb030896f98d24d1c5044) You can: * Browse your transformation datasets * View table schemas and metadata * Delete datasets directly from the UI * Search and reference them in queries ## Next Steps > [card] [Incremental Models](/api-reference/connectors/dbt/incremental-models) > > Learn about merge, delete+insert, and append strategies > [card] [CI/CD & Workflows](/api-reference/connectors/dbt/cicd-workflows) > > Set up GitHub Actions and development workflows # Incremental Models Source: https://docs.dune.com/api-reference/connectors/dbt/incremental-models Efficiently update large tables with merge, delete+insert, and append strategies dbt supports multiple strategies for incremental models. The template includes examples of each strategy to help you get started. ## 1. Merge Strategy (Recommended) **When to use**: When you need to update existing rows and insert new ones. **Example**: ```sql theme={null} {{ config( materialized='incremental', unique_key='user_address', incremental_strategy='merge' ) }} SELECT user_address, COUNT(*) as trade_count, SUM(volume_usd) as total_volume, MAX(block_time) as last_trade_time FROM {{ source('ethereum', 'dex_trades') }} WHERE block_time >= date_trunc('day', now() - interval '1' day) {% if is_incremental() %} AND block_time >= (SELECT MAX(last_trade_time) FROM {{ this }}) {% endif %} GROUP BY 1 ``` ## 2. Delete+Insert Strategy **When to use**: When recomputing entire partitions (e.g., daily aggregations). **Example**: ```sql theme={null} {{ config( materialized='incremental', unique_key='date', incremental_strategy='delete+insert' ) }} SELECT date_trunc('day', block_time) as date, protocol, COUNT(*) as transaction_count, SUM(amount_usd) as volume FROM {{ source('ethereum', 'decoded_events') }} WHERE block_time >= date_trunc('day', now() - interval '7' day) {% if is_incremental() %} AND date_trunc('day', block_time) >= date_trunc('day', now() - interval '1' day) {% endif %} GROUP BY 1, 2 ``` ## 3. Append Strategy **When to use**: For immutable event logs that only need new rows appended. **Example**: ```sql theme={null} {{ config( materialized='incremental', unique_key='tx_hash', incremental_strategy='append' ) }} SELECT tx_hash, block_time, block_number, "from" as from_address, "to" as to_address, value FROM {{ source('ethereum', 'transactions') }} WHERE block_time >= date_trunc('hour', now() - interval '1' hour) {% if is_incremental() %} AND block_time >= (SELECT MAX(block_time) FROM {{ this }}) {% endif %} ``` ## Strategy Comparison | Strategy | Best For | How It Works | | - | - | - | | **Merge** | Updating existing rows + inserting new | Matches on `unique_key`, updates existing, inserts new | | **Delete+Insert** | Recomputing partitions | Deletes matching rows, then inserts new data | | **Append** | Immutable event logs | Only inserts new rows, no updates or deletes | ## Table Maintenance Maintenance operations consume credits based on compute and data written. These operations are necessary to keep your tables performant and to reclaim storage space. ### Manual Maintenance Run OPTIMIZE and VACUUM to improve performance and reduce storage costs: ```bash theme={null} # Optimize a specific table uv run dbt run-operation optimize_table --args '{table_name: "my_model"}' # Vacuum a specific table uv run dbt run-operation vacuum_table --args '{table_name: "my_model"}' ``` ### Automated Maintenance with dbt post-hooks Add post-hooks to your model configuration: ```sql theme={null} {{ config( materialized='incremental', post_hook=[ "ALTER TABLE {{ this }} EXECUTE OPTIMIZE", "ALTER TABLE {{ this }} EXECUTE VACUUM" ] ) }} SELECT ... ``` ### Project level post-hooks Add post-hooks to your project configuration: ```yaml theme={null} # dbt_project.yml post-hooks: - "ALTER TABLE {{ this }} EXECUTE OPTIMIZE" - "ALTER TABLE {{ this }} EXECUTE VACUUM" ``` The [template repository](https://github.com/duneanalytics/dune-dbt-template) includes a default post-hook that runs OPTIMIZE and VACUUM on all tables. ## Dropping Tables dbt doesn't have a built-in way to drop tables. Options: ### Option 1: Use dbt's --full-refresh flag then remove the model ```bash theme={null} # This will drop and recreate uv run dbt run --select my_model --full-refresh # Then delete the model file and run again rm models/my_model.sql uv run dbt run ``` ### Option 2: Connect with a SQL client Use any Trino-compatible client (Hex, Jupyter, DBeaver) to execute: ```sql theme={null} DROP TABLE IF EXISTS dune.your_team.old_model; ``` See the [SQL Operations Reference](/api-reference/connectors/sql-operations) for details. ## Examples Complete examples are available in the template repository: * **View Model**: Lightweight, always fresh data * **Table Model**: Static snapshots for specific points in time * **Merge Incremental**: Update existing rows, insert new ones * **Delete+Insert Incremental**: Recompute partitions efficiently * **Append Incremental**: Add-only with deduplication > [card] [dbt Template Repository](https://github.com/duneanalytics/dune-dbt-template) > > See all example models in our official dbt template repository # dbt Connector Overview Source: https://docs.dune.com/api-reference/connectors/dbt/overview Run production-grade dbt projects directly on Dune with full incremental model support The [dbt Connector](https://dune.com/dbt-connector) enables you to run production-grade dbt projects directly against Dune's data warehouse using the [dbt-trino adapter](https://docs.getdbt.com/docs/core/connect-data-platform/trino-setup). Build, test, and deploy transformation pipelines with full support for incremental models, testing frameworks, and CI/CD orchestration. This connector provides **write access to DuneSQL** via a Trino API endpoint, enabling you to create, update, and manage tables in your private namespace while reading from Dune's comprehensive blockchain datasets. Existing customers of the dbt Connector + Datashare offering can also use dbt to publish transformed tables from Dune into a configured Datashare target. See [dbt Connector + Datashare](/api-reference/connectors/dbt/datashares). > [!NOTE] > > dbt Connector + Datashare is available only to existing customers of this offering and is no longer available to new customers. [Learn more about Enterprise Datashare](https://dune.com/enterprise). > [card] [dbt Template Repository](https://github.com/duneanalytics/dune-dbt-template) > > Get started quickly with our official dbt template repository, featuring example models for all model strategies and CI/CD workflows. > [card] [dbt Connector + Datashare](/api-reference/connectors/dbt/datashares) > > Sync dbt-managed tables from your Dune namespace into Snowflake or BigQuery. > [!WARNING] > > The dbt Connector is currently only available to Enterprise customers with Data Transformations enabled. > [!TIP] > > Interested in having the dbt Connector enabled for your team? [Contact our team](https://dune.com/enterprise)—please mention the dbt Connector when you reach out. > [!NOTE] > > **Credits & CI/CD** > > Each dbt run consumes Dune credits, including runs triggered by CI/CD pipelines. If you're using GitHub Actions or similar tools, we recommend reviewing [Pricing & Best Practices](/api-reference/connectors/dbt/pricing-best-practices) for optimization tips and [CI/CD & Workflows](/api-reference/connectors/dbt/cicd-workflows) for guidance on configuring triggers. ## Video Tutorial Watch this step-by-step guide to get started with the dbt Connector on Dune: [YouTube video player](https://www.youtube.com/embed/TRqqPC0PcZU) ## What is dbt? [dbt (data build tool)](https://www.getdbt.com/) is the industry-standard framework for analytics engineering. It enables data teams to transform raw data into analysis-ready datasets using SQL and software engineering best practices. **Key capabilities:** * **SQL-based transformations**: Write SELECT statements, dbt handles the DDL/DML * **Incremental models**: Efficiently update large tables with merge, append, or delete+insert strategies * **Testing & documentation**: Built-in data quality tests and auto-generated documentation * **Version control**: Manage transformation logic in Git with code review workflows * **Dependency management**: Define relationships between models with automatic execution ordering > [card] [dbt Documentation](https://docs.getdbt.com/) > > Learn more about dbt's features, best practices, and advanced capabilities in the official dbt documentation. ## Why dbt on Dune? ### Enterprise-Grade Transformations * **Full incremental support**: Use merge, delete+insert, or append strategies for efficient updates * **Warehouse publishing**: Sync transformation outputs to a configured Datashare target * **Testing framework**: Validate data quality with dbt's built-in testing capabilities * **Documentation**: Generate and maintain documentation alongside your transformations * **Modularity**: Build reusable models and macros for complex transformation logic ### Seamless Integration * **Drop-in compatibility**: Works with your existing dbt projects and workflows * **Version control**: Manage transformation logic in Git with PR reviews * **Production orchestration**: Schedule with GitHub Actions, Airflow, Prefect, or dbt Cloud. See [Pricing & Best Practices](/api-reference/connectors/dbt/pricing-best-practices) for credit optimization tips * **Private by default**: Keep proprietary transformation logic within your organization ### No Spellbook Dependency * **Autonomous deployment**: Deploy transformations on your schedule without community review * **Proprietary logic**: Keep sensitive business logic private * **Faster iteration**: Test and deploy changes immediately ## Connection Details Connect to Dune using these parameters: | Parameter | Value | | - | - | | **Host** | `trino.api.dune.com` | | **Port** | `443` | | **Protocol** | HTTPS | | **Catalog** | `dune` (required) | | **Authentication** | JWT (use your Dune API key) | | **Session Property** | `transformations=true` (required for write operations) | > [!WARNING] > > The session property `transformations=true` is **required** for all write operations. Without it, DDL and DML statements will be rejected. ## Use Cases ### Enterprise Data Pipelines Add Dune to your existing data infrastructure without reworking your workflows: * **Drop-in compatibility**: Integrate with your current dbt projects, Airflow DAGs, or Prefect flows * **Full incremental support**: Use merge, delete+insert, or append strategies for efficient updates * **Production orchestration**: Schedule with the tools you already use (GitHub Actions, Airflow, Prefect) * **Version controlled**: Keep all transformation logic in Git alongside your other data pipelines ### Governance & Compliance Meet enterprise requirements for data control and auditability: * **Private by default**: All datasets remain private to your team unless explicitly shared * **Audit trails**: Track every transformation through Git history and PR workflows * **Data lineage**: Maintain clear lineage from raw data through transformations to analytics * **Review processes**: Implement PR reviews and approval workflows before deploying to production * **Access control**: Restrict write access to specific teams and namespaces ### Complex Analytics Workflows Build sophisticated multi-stage data pipelines: * Read from Dune's comprehensive blockchain datasets across all chains * Transform and enrich with your proprietary business logic * Create reusable intermediate datasets for downstream analytics * Chain multiple transformations into complex data products ### Alternative to Spellbook Build and maintain custom datasets without community review processes: * Deploy transformations on your own schedule * Keep proprietary logic private to your organization * Faster iteration cycles without PR review delays ## Next Steps > [card] [Getting Started](/api-reference/connectors/dbt/getting-started) > > Set up your dbt project and connect to Dune > [card] [Incremental Models](/api-reference/connectors/dbt/incremental-models) > > Learn about merge, delete+insert, and append strategies > [card] [dbt Connector + Datashare](/api-reference/connectors/dbt/datashares) > > Publish dbt-managed tables to your configured Datashare target > [card] [CI/CD & Workflows](/api-reference/connectors/dbt/cicd-workflows) > > Set up GitHub Actions and development workflows > [card] [Pricing & Best Practices](/api-reference/connectors/dbt/pricing-best-practices) > > Understand credit consumption and optimization tips ## SQLMesh Compatibility > [!NOTE] > > [SQLMesh](https://sqlmesh.com/) also works out of the box with Dune using the same Trino connection approach described above. If you prefer SQLMesh over dbt for your data transformation workflows, you can connect it to Dune using the [SQLMesh Trino adapter](https://sqlmesh.readthedocs.io/en/stable/integrations/engines/trino/) with the same connection parameters. > > We plan to release a dedicated SQLMesh template in the future. Until then, follow the same connection setup (host, port, authentication, and session properties) to get started with SQLMesh on Dune. # Pricing & Best Practices Source: https://docs.dune.com/api-reference/connectors/dbt/pricing-best-practices Credit consumption, optimization tips, and best practices for dbt on Dune Data Transformations is an **Enterprise-only feature** with usage-based credit consumption. > [!NOTE] > > **CI/CD and Credit Usage** > > Each dbt execution consumes credits, whether triggered locally, through CI/CD, or on a schedule. The template repository ships with automated CI/CD triggers **disabled by default** so you can enable them when you're ready. See [CI/CD & Workflows](/api-reference/connectors/dbt/cicd-workflows) for tips on managing costs in automated pipelines. ## Pricing & Credits ### Credit Consumption Your credit usage includes three components: #### Compute Credits * Same as Fluid Engine credits for query execution * Charged based on actual compute resources used * Depends on query complexity and execution time #### Write Operations * **Minimum 3 credits** per write operation * Scales with data volume (GB written) * Applied to INSERT, MERGE, CREATE TABLE AS SELECT, etc. #### Storage Credits * **4 credits per GB per month** * Calculated based on end-of-day storage usage * Encourages efficient data management and cleanup #### Maintenance Operations * OPTIMIZE, VACUUM, and ANALYZE operations consume credits * Based on compute resources and data written during maintenance * Can be automated with dbt post-hooks > [!NOTE] > > A separate platform fee applies in addition to usage-based credits. See [Billing](/api-reference/overview/billing) for more details on credit pricing. ## Best Practices ### Model Organization ``` models/ ├── staging/ # Clean and standardize raw data ├── intermediate/ # Business logic transformations ├── marts/ # Final datasets for analytics └── utils/ # Reusable utility models ``` ### Schema Organization * Use `dev` target with personal suffixes during development * Keep `prod` target for production deployments only * Consider separate schemas for different projects or domains ### Performance Optimization * Use incremental models for large datasets * Partition by date fields when possible * Add appropriate partitions via dbt configurations * Run OPTIMIZE and VACUUM on large tables ### Credit Management * Monitor credit usage in your Dune dashboard * Use incremental models to reduce compute and write costs * Drop unused development tables regularly * Implement table lifecycle policies ### Data Management * Clean up temporary/test data in `__tmp_` schemas * Document table retention requirements * Regularly review and optimize storage usage ### Version Control * Store all transformation logic in Git * Use meaningful commit messages * Tag production releases * Review PRs before merging to main ### Documentation ```yaml theme={null} # schema.yml models: - name: user_stats description: "Daily user trading statistics" columns: - name: user_address description: "Ethereum address of the user" tests: - not_null - unique - name: trade_count description: "Number of trades in the period" ``` ## Resources ### Documentation * [dbt Template Repository](https://github.com/duneanalytics/dune-dbt-template) * [SQL Operations Reference](/api-reference/connectors/sql-operations) * [Query Engine Overview](/query-engine/overview) - DuneSQL capabilities and read operations * [Trino Connector](/api-reference/connectors/trino/overview) - General Trino connection guide * [dbt Documentation](https://docs.getdbt.com/) * [dbt-trino Setup Guide](https://docs.getdbt.com/docs/core/connect-data-platform/trino-setup) ### Support * **Enterprise Support**: Contact your account team * **GitHub Issues**: Report issues in the [template repository](https://github.com/duneanalytics/dune-dbt-template) ## Getting Started Ready to get started? Clone the [template repository](https://github.com/duneanalytics/dune-dbt-template) and have your first dbt model running on Dune in minutes! > [card] [dbt Template Repository](https://github.com/duneanalytics/dune-dbt-template) > > Clone our official template to get started > [card] [Getting Started Guide](/api-reference/connectors/dbt/getting-started) > > Step-by-step setup instructions # Supported SQL Operations Source: https://docs.dune.com/api-reference/connectors/sql-operations Comprehensive reference of DDL and DML statements supported for data transformations ## Overview This page documents **write operations** supported via the Data Transformations connector. These operations enable you to create, manage, and manipulate tables and views in your private namespace on Dune. Both read and write operations use the same Trino endpoint (`trino.api.dune.com`), but write operations require the `transformations=true` session property. **Standard read operations** (SELECT, JOIN, WHERE, etc.) are documented in the [Query Engine](/query-engine/overview) section and work without any special session properties. While [dbt](/api-reference/connectors/dbt/overview) is the recommended tool for data transformations, these SQL operations work with any Trino-compatible client including Hex, Jupyter notebooks, SQLMesh, or direct Trino connections. > [!NOTE] > > All write operations require the `transformations=true` session property to be set. Without this property, DDL and DML statements will be rejected. ## Prerequisites * Dune Enterprise account with Data Transformations enabled * Valid Dune API key with write permissions * Queries must target the `dune` catalog ## DDL Operations ### Schema Management Create and manage schemas within your namespace. #### CREATE SCHEMA **`CREATE SCHEMA [IF NOT EXISTS] schema_name`** Create a new schema in your team namespace. **Examples:** ```sql theme={null} CREATE SCHEMA IF NOT EXISTS your_team; CREATE SCHEMA IF NOT EXISTS your_team__tmp_dev; ``` **Access control**: You can only create schemas matching your team handle or temporary schemas with the pattern `{team}__tmp_*`. #### SHOW SCHEMAS **`SHOW SCHEMAS [FROM catalog]`** List all schemas you have access to. **Example:** ```sql theme={null} SHOW SCHEMAS FROM dune; ``` **Returns**: All public schemas plus your own schemas. #### Query Information Schema **`SELECT ... FROM dune.information_schema.schemata`** Get detailed schema metadata using information schema queries. **Example:** ```sql theme={null} SELECT schema_name, catalog_name FROM dune.information_schema.schemata WHERE schema_name LIKE 'your_team%' ORDER BY schema_name; ``` ### Table Management #### CREATE TABLE **`CREATE TABLE [IF NOT EXISTS] table_name (column_definitions)`** Create a new table with explicit column definitions. **Example:** ```sql theme={null} CREATE TABLE IF NOT EXISTS your_team.users ( user_id BIGINT, address VARBINARY, created_at TIMESTAMP, total_volume DOUBLE ); ``` **Supported column types**: All DuneSQL data types including `BIGINT`, `DOUBLE`, `VARCHAR`, `VARBINARY`, `TIMESTAMP`, `BOOLEAN`, `ARRAY`, `MAP`, and custom types like [`UINT256` and `INT256`](https://docs.dune.com/query-engine/datatypes#uint256-dune-sql). To control whether a table is publicly queryable, see [Table Privacy](#table-privacy). #### CREATE TABLE AS SELECT (CTAS) **`CREATE TABLE table_name AS query`** Create a table from a query result. **Example:** ```sql theme={null} CREATE TABLE your_team.daily_volumes AS SELECT DATE_TRUNC('day', block_time) as day, COUNT(*) as tx_count, SUM(value) as total_volume FROM ethereum.transactions WHERE block_time >= NOW() - INTERVAL '7' DAY GROUP BY 1; ``` #### CREATE OR REPLACE TABLE **`CREATE OR REPLACE TABLE table_name AS query`** Create or replace an existing table atomically. **Example:** ```sql theme={null} CREATE OR REPLACE TABLE your_team.latest_prices AS SELECT contract_address, symbol, price_usd, MAX(minute) as last_updated FROM prices.usd WHERE minute >= NOW() - INTERVAL '1' HOUR GROUP BY 1, 2, 3; ``` **Note**: This completely replaces the table. For incremental updates, use `MERGE` instead. To control table privacy (public/private), see [Table Privacy](#table-privacy). #### DROP TABLE **`DROP TABLE [IF EXISTS] table_name`** Delete a table and its data. **Examples:** ```sql theme={null} DROP TABLE IF EXISTS your_team.old_analysis; DROP TABLE IF EXISTS your_team__tmp_pr123.test_model; ``` **Access control**: You can only drop tables in your own namespaces. #### SHOW TABLES **`SHOW TABLES [FROM schema]`** List all tables in a schema. **Examples:** ```sql theme={null} SHOW TABLES FROM your_team; SHOW TABLES FROM your_team__tmp_; ``` #### SHOW CREATE TABLE **`SHOW CREATE TABLE table_name`** View the DDL for a table. **Example:** ```sql theme={null} SHOW CREATE TABLE your_team.users; ``` **Returns**: The full `CREATE TABLE` statement that can recreate the table, including any table properties like privacy settings. #### Table Privacy > [!NOTE] > > `ALTER TABLE ... SET PROPERTIES` and all other write statements must be run through a Trino-compatible client (CLI, dbt, Hex, Python `trino` package, etc.) connected to `trino.api.dune.com` with `transformations=true` enabled at connection time. They cannot be executed from the Dune web app — attempting to do so returns `Access Denied: Cannot set system session property transformations`. See [Running write statements via the Trino CLI](#running-write-statements-via-the-trino-cli) for a working example. Tables created via Data Transformations are **private by default** -- only your team can query them. You can make a table publicly queryable by anyone on Dune by setting the `dune.public` property. > [!NOTE] > > Privacy is set on tables. A view's privacy cannot be changed after it is created, but a view over private tables stays restricted: reading a view still authorizes against each underlying table. **Set privacy when creating a table:** ```sql theme={null} -- Create a public table with explicit columns CREATE TABLE your_team.public_metrics ( metric_name VARCHAR, metric_value DOUBLE, updated_at TIMESTAMP ) WITH ( extra_properties = map_from_entries(ARRAY[ ROW('dune.public', 'true') ]) ); -- Create a public table from a query CREATE TABLE your_team.public_metrics WITH ( extra_properties = map_from_entries(ARRAY[ ROW('dune.public', 'true') ]) ) AS SELECT DATE_TRUNC('day', block_time) as day, COUNT(*) as tx_count FROM ethereum.transactions WHERE block_time >= NOW() - INTERVAL '7' DAY GROUP BY 1; ``` **Set privacy with CREATE OR REPLACE TABLE:** ```sql theme={null} CREATE OR REPLACE TABLE your_team.public_metrics WITH ( extra_properties = map_from_entries(ARRAY[ ROW('dune.public', 'true') ]) ) AS SELECT DATE_TRUNC('day', block_time) as day, COUNT(*) as tx_count FROM ethereum.transactions WHERE block_time >= NOW() - INTERVAL '7' DAY GROUP BY 1; ``` When using `CREATE OR REPLACE TABLE`: * If the table **already exists** and you omit `dune.public`, the existing privacy setting is preserved. * If the table **does not exist** and you omit `dune.public`, it defaults to private. **Change privacy on an existing table:** ```sql theme={null} -- Make a table public ALTER TABLE dune.your_team.my_table SET PROPERTIES extra_properties = map_from_entries(ARRAY[ ROW('dune.public', 'true') ]); -- Make a table private again ALTER TABLE dune.your_team.my_table SET PROPERTIES extra_properties = map_from_entries(ARRAY[ ROW('dune.public', 'false') ]); ``` **Check the current privacy setting:** ```sql theme={null} -- Method 1: View the full CREATE TABLE statement SHOW CREATE TABLE dune.your_team.my_table; -- Method 2: Query table properties directly SELECT * FROM dune.your_team."my_table$properties"; ``` > [!TIP] > > Public tables are queryable by anyone on Dune and appear in the data explorer under community data. ### View Management #### CREATE OR REPLACE VIEW **`CREATE OR REPLACE VIEW view_name AS query`** Create or update a view definition. **Example:** ```sql theme={null} CREATE OR REPLACE VIEW your_team.active_traders AS SELECT trader_address, COUNT(*) as trade_count, SUM(amount_usd) as total_volume FROM your_team.dex_trades WHERE block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1 HAVING COUNT(*) >= 10; ``` **Benefits**: Views don't store data, so they don't consume storage credits. They're computed on-the-fly when queried. #### DROP VIEW **`DROP VIEW [IF EXISTS] view_name`** Delete a view definition. **Example:** ```sql theme={null} DROP VIEW IF EXISTS your_team.old_view; ``` #### SHOW CREATE VIEW **`SHOW CREATE VIEW view_name`** View the SQL definition of a view. **Example:** ```sql theme={null} SHOW CREATE VIEW your_team.active_traders; ``` ### Column Operations #### SHOW COLUMNS **`SHOW COLUMNS FROM table_name`** List all columns in a table. **Example:** ```sql theme={null} SHOW COLUMNS FROM your_team.users; ``` #### DESCRIBE **`DESCRIBE table_name`** Get detailed column information including names, types, and metadata. **Example:** ```sql theme={null} DESCRIBE your_team.users; ``` **Returns**: Column names, data types, nullability, and additional metadata. #### Query Information Schema for Columns **`SELECT ... FROM dune.information_schema.columns`** Get detailed column metadata using information schema queries. **Example:** ```sql theme={null} SELECT table_schema, table_name, column_name, data_type, is_nullable FROM dune.information_schema.columns WHERE table_schema = 'your_team' AND table_name = 'users' ORDER BY ordinal_position; ``` ## DML Operations ### Insert Operations #### INSERT INTO with VALUES **`INSERT INTO table_name (columns) VALUES (values)`** Insert specific rows into a table. **Example:** ```sql theme={null} INSERT INTO your_team.config (key, value, updated_at) VALUES ('max_slippage', '0.5', NOW()), ('min_liquidity', '1000', NOW()); ``` #### INSERT INTO with SELECT **`INSERT INTO table_name SELECT ...`** Insert query results into a table. **Example:** ```sql theme={null} INSERT INTO your_team.daily_aggregates SELECT DATE_TRUNC('day', block_time) as day, protocol, COUNT(*) as transaction_count, SUM(amount_usd) as volume_usd FROM your_team.decoded_events WHERE block_time >= CURRENT_DATE GROUP BY 1, 2; ``` **Use case**: Append-only incremental models, historical snapshots, event logging. ### Update Operations #### MERGE INTO **`MERGE INTO target USING source ON condition WHEN MATCHED THEN UPDATE ... WHEN NOT MATCHED THEN INSERT ...`** Upsert data - update existing rows and insert new ones in a single operation. **Example:** ```sql theme={null} MERGE INTO your_team.user_stats t USING ( SELECT user_address, COUNT(*) as trade_count, SUM(volume_usd) as total_volume, MAX(block_time) as last_trade FROM ethereum.dex_trades WHERE block_time >= CURRENT_DATE - INTERVAL '1' DAY GROUP BY 1 ) s ON t.user_address = s.user_address WHEN MATCHED THEN UPDATE SET trade_count = t.trade_count + s.trade_count, total_volume = t.total_volume + s.total_volume, last_trade = GREATEST(t.last_trade, s.last_trade) WHEN NOT MATCHED THEN INSERT (user_address, trade_count, total_volume, last_trade) VALUES (s.user_address, s.trade_count, s.total_volume, s.last_trade); ``` **Use case**: Incremental models that update existing records and insert new ones (dbt merge strategy). **Performance**: More efficient than delete+insert for partial updates of large tables. ### Delete Operations #### DELETE FROM **`DELETE FROM table_name WHERE condition`** Delete rows matching a condition. **Example:** ```sql theme={null} DELETE FROM your_team.staging_data WHERE created_at < NOW() - INTERVAL '7' DAY; ``` #### TRUNCATE TABLE **`TRUNCATE TABLE table_name`** Remove all rows from a table efficiently. **Example:** ```sql theme={null} TRUNCATE TABLE your_team.temp_calculations; ``` **Performance**: `TRUNCATE` is faster than `DELETE FROM table` for removing all rows as it doesn't scan individual rows. ## Maintenance Operations These operations optimize table performance and manage metadata. They consume credits based on compute and data written. ### OPTIMIZE **`ALTER TABLE table_name EXECUTE OPTIMIZE`** Compact small files and optimize table layout for better query performance. **Example:** ```sql theme={null} ALTER TABLE your_team.large_dataset EXECUTE OPTIMIZE; ``` **When to use**: * After many small writes * Before running complex queries * Periodically for frequently-updated tables **Effect**: Combines small data files into larger ones, improving query performance by reducing file overhead. ### VACUUM **`ALTER TABLE table_name EXECUTE VACUUM`** Remove old data files and reclaim storage space. **Example:** ```sql theme={null} ALTER TABLE your_team.historical_data EXECUTE VACUUM; ``` **When to use**: * After major updates or deletes * To reclaim storage space * Based on your retention policies **Effect**: Removes old file versions that are no longer needed, reducing storage costs. > [!TIP] > > VACUUM is most effective when run after OPTIMIZE, as it can remove the redundant small files replaced during compaction. ### Automating Maintenance in dbt Use dbt post-hooks to automate maintenance: ```yaml theme={null} models: your_project: large_model: +post-hook: - "ALTER TABLE {{ this }} EXECUTE OPTIMIZE" - "ALTER TABLE {{ this }} EXECUTE VACUUM" ``` ## Datashare Operations > [!NOTE] > > dbt Connector + Datashare is available only to existing customers of this offering and is no longer available to new customers. [Learn more about Enterprise Datashare](https://dune.com/enterprise). These table procedures register a table for Datashare sync and manage its lifecycle. > [!WARNING] > > These operations require Datashare to be enabled and configured for your team. They are intended for tables in your production namespace, not temporary dev or PR schemas. ### Register Or Trigger A Datashare Sync **`ALTER TABLE table_name EXECUTE sync_datashare(...)`** Register a table for Datashare and sync it to your team's configured destination. The table must have change data feed enabled. Dune copies the table on the first sync, then applies its changes every five minutes by default. **Example:** ```sql theme={null} ALTER TABLE dune.your_team.daily_metrics EXECUTE sync_datashare( unique_key_columns => ARRAY['block_number', 'block_date'], full_refresh => false, partitioning => 'block_date' ); ``` **Arguments:** * `unique_key_columns`: Columns that uniquely identify a row * `full_refresh` (optional, default `false`): Copy the full table again instead of applying changes since the last sync * `partitioning` (optional): Date or timestamp column that partitions the delivered table ### Remove A Table From Datashare **`ALTER TABLE table_name EXECUTE delete_datashare_sync`** Stop syncing a table to Datashare and revoke access at the destination. The Dune table is not dropped. **Example:** ```sql theme={null} ALTER TABLE dune.your_team.daily_metrics EXECUTE delete_datashare_sync; ``` ### Monitor Datashare State Use the Datashare system tables to inspect registrations and sync history: ```sql theme={null} SELECT * FROM dune.datashare.table_syncs WHERE source_schema = 'your_team'; SELECT * FROM dune.datashare.table_sync_runs WHERE source_schema = 'your_team' ORDER BY created_at DESC; ``` For dbt-specific setup, see [dbt Connector + Datashare](/api-reference/connectors/dbt/datashares). ## Information Schema Queries Query metadata about your tables and schemas. ### List All Tables ```sql theme={null} SELECT table_schema, table_name, table_type FROM dune.information_schema.tables WHERE table_schema = 'your_team' ORDER BY table_name; ``` ### Find Tables by Pattern ```sql theme={null} SELECT table_schema, table_name FROM dune.information_schema.tables WHERE table_schema LIKE 'your_team%' AND table_name LIKE 'user_%' ORDER BY table_schema, table_name; ``` ### Get Table Column Details ```sql theme={null} SELECT column_name, data_type, is_nullable, ordinal_position FROM dune.information_schema.columns WHERE table_schema = 'your_team' AND table_name = 'users' ORDER BY ordinal_position; ``` ### Check Table Existence ```sql theme={null} SELECT COUNT(*) > 0 as table_exists FROM dune.information_schema.tables WHERE table_schema = 'your_team' AND table_name = 'my_model'; ``` ## Permissions & Access Control ### What You Can Do #### Read Permissions * All public Dune datasets * Your team's private uploaded data * Your transformation tables and views #### Write Permissions * Create schemas: `{team_name}` and `{team_name}__tmp_*` * Create tables/views in your schemas only * Insert, update, delete data in your tables only * Drop your own tables and views * Set [table privacy](#table-privacy) (public/private) on tables you own ### What You Cannot Do * Write to public schemas (e.g., `ethereum`, `prices`, etc.) * Write to other teams' namespaces * Modify tables you don't own ### Schema Naming Rules Valid namespace patterns: * `your_team` - Production schema * `your_team__tmp_` - Default development schema * `your_team__tmp_alice` - Personal development schema * `your_team__tmp_pr123` - CI/CD schema for PR #123 Invalid patterns: * `eth__tmp_` - Cannot use reserved prefixes * `another_team` - Cannot use other team names * `public__tmp_` - Cannot use system schemas ## Session Properties ### Required Property ```sql theme={null} SET SESSION transformations = true; ``` **Purpose**: Enables write operations. Without this, all DDL/DML statements will be rejected. **How to set**: * **dbt**: Add to `profiles.yml` under `session_properties` * **Python**: Set in connection parameters * **Trino CLI**: Pass `--session=transformations=true` at connection time. See [Running write statements via the Trino CLI](#running-write-statements-via-the-trino-cli). * **Other Trino clients (Hex, Python `trino`, DBeaver, etc.)**: Set `transformations=true` in the client's session properties at connection time. ### Running write statements via the Trino CLI Write statements (DDL, DML, `ALTER TABLE ... SET PROPERTIES`) cannot be executed from the Dune web app. They must be run through a Trino-compatible client with the `transformations=true` session property set at connection time. Here is a working example using the [Trino CLI](https://trino.io/docs/current/client/cli.html) to make a table public: ```bash theme={null} # Set the API key as an environment variable (do not pass it inline) export TRINO_PASSWORD= trino \ --server https://trino.api.dune.com \ --user dune \ --password \ --session=transformations=true \ --execute="ALTER TABLE dune.your_team.your_table SET PROPERTIES extra_properties = map_from_entries(ARRAY[ROW('dune.public','true')])" ``` > [!WARNING] > > The `--password` flag does **not** accept the API key as a value. It tells the CLI to prompt for one interactively. To pass the API key non-interactively, set the `TRINO_PASSWORD` environment variable as shown above. > [!WARNING] > > The `--session` value must not contain whitespace. Writing `--session='transformations=true '` (with a trailing space) will fail with `Session property value contains spaces or is not ASCII`. Use `--session=transformations=true` exactly. For dbt, set the session property in `profiles.yml` under `session_properties` — see the [dbt Getting Started](/api-reference/connectors/dbt/getting-started) guide. ### Optional Properties #### Join Distribution Type Optimize join performance: ```sql theme={null} SET SESSION join_distribution_type = 'PARTITIONED'; ``` **Options**: * `AUTOMATIC` (default) - Let Trino choose * `PARTITIONED` - Repartition both tables * `BROADCAST` - Broadcast smaller table **When to use**: For complex joins on large tables. ## Common Patterns ### Incremental Model Pattern (Merge) ```sql theme={null} -- Check if target table exists CREATE TABLE IF NOT EXISTS your_team.user_daily_stats ( date DATE, user_address VARBINARY, tx_count BIGINT, volume_usd DOUBLE, PRIMARY KEY (date, user_address) ); -- Merge new data MERGE INTO your_team.user_daily_stats t USING ( SELECT DATE_TRUNC('day', block_time) as date, "from" as user_address, COUNT(*) as tx_count, SUM(value) as volume_usd FROM ethereum.transactions WHERE block_time >= CURRENT_DATE - INTERVAL '1' DAY GROUP BY 1, 2 ) s ON t.date = s.date AND t.user_address = s.user_address WHEN MATCHED THEN UPDATE SET tx_count = s.tx_count, volume_usd = s.volume_usd WHEN NOT MATCHED THEN INSERT (date, user_address, tx_count, volume_usd) VALUES (s.date, s.user_address, s.tx_count, s.volume_usd); ``` ### Delete+Insert Pattern ```sql theme={null} -- Delete existing data for update period DELETE FROM your_team.hourly_metrics WHERE hour >= DATE_TRUNC('hour', NOW() - INTERVAL '24' HOUR); -- Insert fresh data INSERT INTO your_team.hourly_metrics SELECT DATE_TRUNC('hour', block_time) as hour, protocol, COUNT(*) as event_count, SUM(amount_usd) as total_volume FROM your_team.decoded_events WHERE block_time >= DATE_TRUNC('hour', NOW() - INTERVAL '24' HOUR) GROUP BY 1, 2; ``` ### Append-Only Pattern with Deduplication ```sql theme={null} -- Insert new records only INSERT INTO your_team.event_log SELECT DISTINCT evt_tx_hash, evt_block_time, evt_block_number, user_address, action_type FROM ethereum.decoded_events WHERE evt_block_time >= ( SELECT COALESCE(MAX(evt_block_time), TIMESTAMP '2020-01-01') FROM your_team.event_log ) AND NOT EXISTS ( SELECT 1 FROM your_team.event_log existing WHERE existing.evt_tx_hash = ethereum.decoded_events.evt_tx_hash ); ``` ### Staging Table Pattern ```sql theme={null} -- Create staging table CREATE TABLE your_team__tmp_.staging_new_users AS SELECT user_id, address, first_seen, tx_count FROM your_source.raw_users WHERE created_at >= CURRENT_DATE; -- Validate staging data SELECT COUNT(*) as total_rows, COUNT(DISTINCT user_id) as unique_users, COUNT(*) FILTER (WHERE address IS NULL) as null_addresses FROM your_team__tmp_.staging_new_users; -- Promote to production INSERT INTO your_team.users SELECT * FROM your_team__tmp_.staging_new_users; -- Clean up staging DROP TABLE your_team__tmp_.staging_new_users; ``` ## Best Practices ### Use Appropriate Incremental Strategy * **Merge**: When you need to update existing rows (e.g., daily aggregations) * **Delete+Insert**: When recomputing entire partitions (e.g., hourly metrics) * **Append**: For immutable event logs ### Optimize Write Operations * Batch inserts instead of single-row inserts * Use CTAS for bulk table creation * Partition large tables by date for efficient updates ### Manage Table Lifecycle * Drop temporary tables in `__tmp_` schemas regularly * Use views for derived data that doesn't need persistence * Run OPTIMIZE periodically on frequently-updated tables ### Monitor Credit Usage * Track write operations in large tables * Use incremental models to minimize data written ## Limitations & Considerations ### No ALTER TABLE for Schema Changes You cannot alter table structure (add, rename, or drop columns) directly. Instead, recreate the table: ```sql theme={null} -- Create new table with desired schema CREATE TABLE your_team.users_new AS SELECT user_id, address, created_at, -- Add new columns or modify types CAST(total_volume AS DECIMAL(38, 2)) as total_volume_precise FROM your_team.users; -- Drop old table DROP TABLE your_team.users; -- Rename new table (via re-create) CREATE TABLE your_team.users AS SELECT * FROM your_team.users_new; DROP TABLE your_team.users_new; ``` > [!NOTE] > > `ALTER TABLE ... SET PROPERTIES` **is** supported for changing table properties like privacy. See [Table Privacy](#table-privacy). ### No SCHEMA DROP Empty schemas are automatically managed. You cannot explicitly drop schemas. ### Transaction Behavior Each statement is auto-committed. There is no multi-statement transaction support. ### Concurrent Writes Writing to the same table from multiple processes simultaneously may cause conflicts. Use: * Separate staging tables * Partitioned writes * Sequential execution ## Troubleshooting ### "Access Denied" Errors **Problem**: Cannot create table in schema. **Solution**: Verify you're using the correct team namespace and have Data Transformations enabled. ### "Session Property Required" or "Cannot set system session property transformations" Error **Problem**: Write operation rejected, or `SET SESSION transformations = true` returns `Access Denied`. **Solution**: Write statements cannot be run from the Dune web app. Connect via a Trino-compatible client (Trino CLI, dbt, Hex, Python `trino`, etc.) and set `transformations=true` at connection time, not as a runtime `SET SESSION` statement. See [Running write statements via the Trino CLI](#running-write-statements-via-the-trino-cli) for a working example. ### Slow MERGE Operations **Problem**: MERGE takes too long on large tables. **Solution**: * Add filters to reduce rows matched * Run OPTIMIZE before MERGE * Consider delete+insert for full partition updates ### Table Not Visible in Dune App **Problem**: Created table doesn't appear in queries. **Solution**: Remember to use the `dune.` catalog prefix: ```sql theme={null} SELECT * FROM dune.your_team.your_table; ``` ## Examples Complete examples and templates are available in the [dune-dbt-template repository](https://github.com/duneanalytics/dune-dbt-template). See the `/models/templates/` directory for: * View model example * Table model example * Merge incremental model * Delete+insert incremental model * Append incremental model with deduplication ## Related Documentation * [dbt Connector](/api-reference/connectors/dbt/overview) * [Trino Connector](/api-reference/connectors/trino/overview) * [Query Engine Overview](/query-engine/overview) * [DuneSQL Functions & Operators](/query-engine/Functions-and-operators/index) * [Rate Limits](/api-reference/overview/rate-limits) * [Billing](/api-reference/overview/billing) # DBeaver Source: https://docs.dune.com/api-reference/connectors/trino/dbeaver Connect Dune to DBeaver for direct SQL access Follow these steps to connect Dune as a data source in DBeaver. ## Add a Database Connection **1. Create new connection** In DBeaver, click the **New Database Connection** button. It usually looks like a plug with a plus on it. **2. Select Trino database** You'll be taken to the "Connect to a database" screen. Find and select **Trino** from the list of accepted databases, then click on it. ![DBeaver step 2: Select Trino from database list](https://mintcdn.com/dune/bE2iCQxUVMqVPGif/images/trino-presto-connector/dbeaver-1.png?fit=max\&auto=format\&n=bE2iCQxUVMqVPGif\&q=85\&s=e57842195baf7a75e1cf59f11934f107) **3. Configure connection details** You'll be taken to a screen where you can fill in your connection details. Make sure to click **Connect by host**, then fill in the connection parameters using the values from the [Connection Parameters](/api-reference/connectors/trino/overview#connection-parameters) section. ![DBeaver step 3: Enter connection details](https://mintcdn.com/dune/bE2iCQxUVMqVPGif/images/trino-presto-connector/dbeaver-2.png?fit=max\&auto=format\&n=bE2iCQxUVMqVPGif\&q=85\&s=a1468abe99eb7b965a7bde680ce6dc4e) **4. Finish connection setup** Once you have all the details filled out properly, click **Finish** to create the connection. ## Run a Test Query After configuring your connection, you can run a query to verify that everything is working. **1. Open SQL editor** Right-click on your Dune database connection and navigate to the **SQL Editor** section. This will open up a new SQL editor. **2. Write your SQL query** In the SQL editor, you can write all of your Dune-compatible SQL. Paste the example query below into the editor. **3. Run the script** Click the **Run** button to execute your script. If everything went well, you will see the results displayed in the results panel. ![DBeaver step 5: Run SQL script and view results](https://mintcdn.com/dune/bE2iCQxUVMqVPGif/images/trino-presto-connector/dbeaver-3.png?fit=max\&auto=format\&n=bE2iCQxUVMqVPGif\&q=85\&s=1184ebe7cff94bdd08465c60eae4d927) You can use this query to test your connection. It fetches the daily transaction count from the last year on Base. ```sql theme={null} SELECT date_trunc('day', block_time) AS time, count(*) AS count FROM base.transactions WHERE block_time > now() - interval '12' month GROUP BY 1 ORDER BY 1 DESC ``` # Hex Source: https://docs.dune.com/api-reference/connectors/trino/hex Connect Dune to Hex's notebook-native analytics platform Follow these steps to connect Dune as a data source in your Hex workspace. ## Add the Data Connection **1. Open Data sources** Under Workspace settings, select **Data sources**. ![Hex step 1: Open Data sources](https://mintcdn.com/dune/Sfv_5QdqAPVofYTY/images/trino-presto-connector/hex-1.png?fit=max\&auto=format\&n=Sfv_5QdqAPVofYTY\&q=85\&s=18b2f51e2c0c50f8abb1eff9e154b232) **2. Add connection and choose Trino** Click the green **+ Connection** button, then select **Trino** from the list of available connections. ![Hex step 2: Add connection and choose Trino](https://mintcdn.com/dune/Sfv_5QdqAPVofYTY/images/trino-presto-connector/hex-2.png?fit=max\&auto=format\&n=Sfv_5QdqAPVofYTY\&q=85\&s=bca16b701683e201422aa2ef60122561) **3. Enter connection details** Fill in the form fields using the values from the [Connection Parameters](/api-reference/connectors/trino/overview#connection-parameters) section. ![Hex step 3: Enter connection details](https://mintcdn.com/dune/Sfv_5QdqAPVofYTY/images/trino-presto-connector/hex-3.png?fit=max\&auto=format\&n=Sfv_5QdqAPVofYTY\&q=85\&s=b572ea6938ca81f272ab3458bf4c25b1) ## Run a Test Query Once your data source is configured, you can query it directly from any Hex project. **1. Open or create a project** Open an existing project or create a new one. **2. Add a SQL cell** Add a new **SQL cell** to your notebook. **3. Select data source** In the data source dropdown at the top of the cell, select your newly created **Dune SQL** connection. **4. Paste and run SQL** Paste the example query below into the cell and run it. ![Hex step: Paste and run SQL](https://mintcdn.com/dune/Sfv_5QdqAPVofYTY/images/trino-presto-connector/hex-4.png?fit=max\&auto=format\&n=Sfv_5QdqAPVofYTY\&q=85\&s=47760566fc47b89255dba35980668889) You can use this query to test your connection. It fetches the daily transaction count from the last year on Base. ```sql theme={null} SELECT date_trunc('day', block_time) AS time, count(*) AS count FROM base.transactions WHERE block_time > now() - interval '12' month GROUP BY 1 ORDER BY 1 DESC ``` # Metabase Source: https://docs.dune.com/api-reference/connectors/trino/metabase Connect Dune to Metabase for BI dashboards Follow these steps to connect Dune as a data source in Metabase. ## Add the Database Connection **1. Open Admin settings** From the Metabase home page, click the **Settings** gear icon in the top-right corner. Select **Admin settings** from the dropdown menu. ![Metabase step 1: Open Admin settings](https://mintcdn.com/dune/Sfv_5QdqAPVofYTY/images/trino-presto-connector/metabase-1.png?fit=max\&auto=format\&n=Sfv_5QdqAPVofYTY\&q=85\&s=cac1b521d3d5853359fee7897d076586) **2. Go to Databases** In the Admin panel, navigate to the **Databases** tab. ![Metabase step 2: Go to Databases](https://mintcdn.com/dune/Sfv_5QdqAPVofYTY/images/trino-presto-connector/metabase-2.png?fit=max\&auto=format\&n=Sfv_5QdqAPVofYTY\&q=85\&s=ca3ac9b7a0c932af726e73714d197bab) **3. Add database** Click the blue **Add database** button to open the configuration modal. ![Metabase step 3: Add database](https://mintcdn.com/dune/Sfv_5QdqAPVofYTY/images/trino-presto-connector/metabase-3.png?fit=max\&auto=format\&n=Sfv_5QdqAPVofYTY\&q=85\&s=923552c92a278252c509ce42ed41a586) **4. Choose driver** In the modal, select `Starburst (Trino)` as the **Database type**. **5. Enter connection details** Fill in the form fields using the values from the [Connection Parameters](/api-reference/connectors/trino/overview#connection-parameters) section. For best performance in Metabase, we recommend disabling **Rerun queries for simple explorations** and **Periodically refingerprint tables** in the advanced settings. > [!NOTE] > > Schema discovery queries such as `SHOW TABLES` or `SHOW SCHEMAS` may not be available in Metabase with this connector because Dune's catalog spans millions of tables. Many BI tools are not yet optimized to enumerate catalogs at this scale. An update with improved schema discovery is planned for the future. ## Run a Test Query After configuring and saving the connection, you can run a query to verify that everything is working. **1. Create a new SQL query** Click the **+ New** button and select **SQL query**. **2. Select database** In the editor, choose your newly created **Dune SQL** data source from the **Select a database** dropdown. **3. Paste example SQL** Paste the example query below into the editor. **4. Run the query** Run the query to verify the connection. You can use this query to test your connection. It fetches the daily transaction count from the last year on Base. ```sql theme={null} SELECT date_trunc('day', block_time) AS time, count(*) AS count FROM base.transactions WHERE block_time > now() - interval '12' month GROUP BY 1 ORDER BY 1 DESC ``` # Trino Connector Overview Source: https://docs.dune.com/api-reference/connectors/trino/overview Access Dune's blockchain data through Trino/Presto-compatible tools and SDKs Access Dune's blockchain data from your favorite BI tools and clients using the DuneSQL Trino/Presto connector. Connect Dune with popular tools like Hex, Metabase, DBeaver, and any Trino, Presto, or Starburst-compatible application for seamless data analysis. ![Dune Trino Presto connector architecture diagram showing integration flow](https://mintcdn.com/dune/Sfv_5QdqAPVofYTY/images/trino-presto-connector/trino%20-%20light.png?fit=max\&auto=format\&n=Sfv_5QdqAPVofYTY\&q=85\&s=05cccc36321e5ba8359d12ba4aab5d43) Trino/Presto client → Dune connector → Dune Query Engine > [!WARNING] > > The DuneSQL Trino Connector is currently only available to Plus and Enterprise customers. ## Compatible Tools Dune's Trino connector supports any tool that works with Trino, Presto, or Starburst connectors. Popular Dune integrations include: > [card] [Hex](/api-reference/connectors/trino/hex) > > Connect Dune to Hex's notebook-native analytics via built-in Trino connector. > [card] [Metabase](/api-reference/connectors/trino/metabase) > > Integrate Dune with Metabase using the Starburst/Trino driver for BI dashboards. > [card] [DBeaver](/api-reference/connectors/trino/dbeaver) > > Connect Dune to DBeaver using the Trino driver for direct SQL access to blockchain data. > [card] [Trino SDKs](/api-reference/connectors/trino/sdks) > > Treat Dune like a Database in your language of choice with popular Trino libraries. > [!NOTE] > > Any of the supported client applications listed in the [Trino ecosystem](https://trino.io/ecosystem/#official-client-applications) are supported. Please visit their documentation to learn about their specific connection instructions, though the configuration should generally follow the same pattern using the connection parameters below. ## Connection Parameters Use these values in your Trino, Presto, or Starburst client configuration: | Parameter | Value | Description | | - | - | - | | Host | `trino.api.dune.com` | Dune's Trino/Presto endpoint | | Port | `443` | Standard HTTPS port | | Username | `dune` | Fixed username for all connections | | Password | `` | [Your Dune API key](/api-reference/overview/authentication) | | Catalog | `delta_prod` | Main data catalog | | SSL/TLS | `true` | Always use encrypted connections | | HTTP scheme | `https` | Required for secure connections | > [!NOTE] > > If you need an API key, see our guide on [Authentication](/api-reference/overview/authentication). Remember to keep your API keys secret and rotate them immediately if they are ever exposed. ## Supported SQL Operations Queries executed via the connector align with what you can run on the Dune platform. See the [Query Engine overview](/query-engine/overview) for more information on supported functions and syntax. ## Rate Limits Rate limits for the connector mirror those of the Dune Data API. Please refer to the [Rate Limits](/api-reference/overview/rate-limits) documentation for details. ## Billing & Cost All queries run via the connector are executed on the [Large Query Engine](/query-engine/query-executions#query-engine-size). Credits are consumed based on actual compute resources used. In addition, fetching results consumes credits proportional to the number of datapoints returned. For a full breakdown, please see our documentation on [Billing](/api-reference/overview/billing). ## Limitations The connector currently has limited support for metadata discovery queries such as `SHOW TABLES` or `SHOW SCHEMAS`. This may impact the data source browsing and autocomplete experience within some BI tools. For schema and table discovery, see the [Data Explorer](/web-app/query-editor/data-explorer) guide. If you encounter timeouts with large result sets, consider paginating your queries using `LIMIT` and `OFFSET`, narrowing your filters, or splitting complex queries into smaller, more manageable parts. # Trino SDKs Source: https://docs.dune.com/api-reference/connectors/trino/sdks Connect to Dune using Trino SDKs in your preferred programming language Connect to Dune using Trino SDKs in your preferred language. Dune supports any Trino, Presto, or Starburst-compatible client library. ## Code Examples > [tab] Bash > > ```bash theme={null} > # Install: brew install trino > trino --server https://trino.api.dune.com:443 \ > --user dune --password \ > --catalog delta_prod \ > --schema runtime \ > --execute "SELECT count(*) FROM base.transactions WHERE block_time > now() - interval '1' day" > ``` > [tab] TypeScript > > ```typescript theme={null} > import { Trino, BasicAuth } from "trino-client"; > > const trino = Trino.create({ > server: "https://trino.api.dune.com:443", > catalog: "delta_prod", > schema: "runtime", > auth: new BasicAuth("dune", process.env.DUNE_API_KEY), > }); > > const iter = await trino.query("SELECT count(*) FROM base.transactions WHERE block_time > now() - interval '1' day"); > for await (const result of iter) { > console.log(result.data); > } > ``` > [tab] Python > > ```python theme={null} > import trino > import os > > conn = trino.dbapi.connect( > host='trino.api.dune.com', > port=443, > user='dune', > catalog='delta_prod', > schema='runtime', > auth=trino.auth.BasicAuthentication('dune', os.environ['DUNE_API_KEY']), > http_scheme='https' > ) > > cursor = conn.cursor() > cursor.execute("SELECT count(*) FROM base.transactions WHERE block_time > now() - interval '1' day") > print(cursor.fetchall()) > ``` > [tab] Rust > > ```rust theme={null} > use prusto::{ClientBuilder, Presto}; > > #[derive(Presto, Debug)] > struct Foo { > a: i64, > b: f64, > c: String, > } > > #[tokio::main] > async fn main() { > let cli = ClientBuilder::new("user", "localhost") > .port(8090) > .catalog("catalog") > .build() > .unwrap(); > > let sql = "select 1 as a, cast(1.1 as double) as b, 'bar' as c "; > > let data = cli.get_all::(sql.into()).await.unwrap().into_vec(); > > for r in data { > println!("{:?}", r) > } > } > ``` > [tab] Go > > ```go theme={null} > import "database/sql" > import _ "github.com/trinodb/trino-go-client/trino" > > dsn := "http://user@localhost:8080?catalog=default&schema=test" > db, err := sql.Open("trino", dsn) > ``` > [tab] Ruby > > ```ruby theme={null} > require 'trino-client' > > # create a client object: > client = Trino::Client.new( > server: "localhost:8880", # required option > ssl: {verify: false}, > catalog: "native", > schema: "default", > user: "frsyuki", > password: "********", > time_zone: "US/Pacific", > language: "English", > properties: { > "hive.force_local_scheduling": true, > "raptor.reader_stream_buffer_size": "32MB" > }, > http_proxy: "proxy.example.com:8080", > http_debug: true > ) > > # run a query and get results as an array of arrays: > columns, rows = client.run("select * from sys.node") > rows.each {|row| > p row # row is an array > } > > # run a query and get results as an array of hashes: > results = client.run_with_names("select alpha, 1 AS beta from tablename") > results.each {|row| > p row['alpha'] # access by name > p row['beta'] > p row.values[0] # access by index > p row.values[1] > } > > # run a query and fetch results streamingly: > client.query("select * from sys.node") do |q| > # get columns: > q.columns.each {|column| > puts "column: #{column.name}.#{column.type}" > } > > # get query results. it feeds more rows until > # query execution finishes: > q.each_row {|row| > p row # row is an array > } > end > > # killing a query > query = client.query("select * from sys.node") > query_id = query.query_info.query_id > query.each_row {|row| ... } # when a thread is processing the query, > client.kill(query_id) # another thread / process can kill the query. > > # Use Query#transform_row to parse Trino ROW types into Ruby Hashes. > # You can also set a scalar_parser to parse scalars how you'd like them. > scalar_parser = -> (data, type) { (type === 'json') ? JSON.parse(data) : data } > client.query("select * from sys.node") do |q| > q.scalar_parser = scalar_parser > > # get query results. it feeds more rows until > # query execution finishes: > q.each_row {|row| > p q.transform_row(row) > } > end > ``` > [!NOTE] > > Besides the code samples shown above, Trino supports a variety of other official and unofficial SDKs. Please check the [official Trino SDKs page](https://trino.io/ecosystem/client-driver#official-client-drivers) to see which ones are available and to view their GitHub repositories for updated code samples and documentation. ## Connection Parameters For all SDK integrations, use the following connection parameters: | Parameter | Value | | - | - | | Host | `trino.api.dune.com` | | Port | `443` | | Username | `dune` | | Password | Your Dune API key | | Catalog | `delta_prod` | | HTTP scheme | `https` | See the [Overview](/api-reference/connectors/trino/overview#connection-parameters) for complete connection details. # Submit Contracts for Decoding Source: https://docs.dune.com/api-reference/contracts/endpoint/decode POST /v1/contracts/decode Submit up to 100 contracts (with their ABIs) for decoding in one request. Each item is validated and queued independently; the response reports a per-item result matched by index. Successful items are queued as "pending" and can be tracked with GET /v1/contracts/submissions or at dune.com/workspace. Submissions are attributed to the user who created the API key. "upgrade" submissions and protected namespaces are always routed to manual review. > [!NOTE] > > Minimum required API key scope: `Read/Write`. Submissions are attributed to the user who created the API key. ## Description Submit up to 100 contracts for decoding in a single request. Each item is validated and queued independently: the response carries one result per item, matched by `index`, so a bad ABI in one item does not stop the others. Successful items are queued as `pending` and can be tracked with [List Contract Submissions](./list) or in the [Dune UI](https://dune.com/contracts/new). Items that fail validation carry an `error` describing what to fix. > [!NOTE] > > ABI upgrades, renames, deletions, and submissions to protected namespaces are always routed to manual review. Expect them to show `needs_manual_review` rather than being decoded automatically. ## Request Fields Each entry in `submissions` mirrors the fields of the submission form. See the [decoding guide](/web-app/decoding/decoding-contracts) for what the flags mean. | Field | Notes | | - | - | | `blockchain_name` | Chain the contract is deployed on, e.g. `ethereum`, `base`. Must be a chain Dune decodes. | | `address` | Contract address. Hex for EVM chains; Tron base58 addresses are accepted when `blockchain_name` is `tron`. | | `project_name` | Namespace the decoded tables are grouped under. Case is preserved. | | `contract_name` | Contract name used in decoded table names. Case is preserved. | | `abi` | The ABI as a JSON array, or as a string containing the JSON array (the shape most exports produce). | | `has_multiple_instances` | `true` for [dynamic contracts](/web-app/decoding/decoding-contracts#are-there-several-instances-of-this-contract-dynamic-contract) sharing one ABI. | | `is_created_by_factory` | `true` for contracts created by a [factory](/web-app/decoding/decoding-contracts#is-it-created-by-a-factory-contract-factory-contract). | | `is_proxy` | `true` when the address is a proxy; submit the implementation's ABI. | | `is_manual_abi` | `true` when the ABI was written or edited by hand rather than fetched from an explorer. | | `submission_type` | `new` (default), `upgrade`, `rename`, `delete`, or `other`. | | `resubmission_reason` | Why you are resubmitting. Required for `delete` and `other`. | | `old_project_name`, `old_contract_name` | Required for `rename`: the names the contract is decoded under today. `project_name` and `contract_name` then carry the new names. | | `idempotency_key` | Optional, at most 128 characters, unique per account. See below. | For `delete`, `project_name` and `contract_name` name the contract to remove. ## Idempotency If a request fails part way through or you lose the response, retrying a batch without keys creates duplicate submissions. Give each item an `idempotency_key` you control, such as `abi-refresh-2026-09-10/0`. Resubmitting an item whose key you already used returns the existing submission with `replayed: true` instead of creating a new one. Keys are scoped to your account. ## Plan Requirements * Free plans can submit new contracts for a single blockchain per request. * Batches spanning more than one `blockchain_name`, and any `upgrade`, `rename`, `delete`, or `other` submission, require the plan behind the API key to be paid (the team's plan for a team key). Otherwise the request fails with `403` and a reason. * Read-only plans cannot submit. ## Pricing Submitting contracts does not consume credits. ## Related Endpoints * [List Contract Submissions](./list) - Track the status of your submissions ```bash cURL theme={null} curl -X POST "https://api.dune.com/api/v1/contracts/decode" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "submissions": [ { "blockchain_name": "ethereum", "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", "project_name": "uniswap", "contract_name": "UniswapToken", "abi": [{"type": "event", "name": "Transfer", "inputs": []}], "has_multiple_instances": false, "is_created_by_factory": false, "is_manual_abi": false, "is_proxy": false, "idempotency_key": "uniswap-token/ethereum/1" } ] }' ``` ```python Python theme={null} import json import requests url = "https://api.dune.com/api/v1/contracts/decode" headers = {"X-DUNE-API-KEY": "YOUR_API_KEY"} with open("UniswapToken.abi.json") as f: abi = json.load(f) payload = { "submissions": [ { "blockchain_name": "ethereum", "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", "project_name": "uniswap", "contract_name": "UniswapToken", "abi": abi, "has_multiple_instances": False, "is_created_by_factory": False, "is_manual_abi": False, "is_proxy": False, "idempotency_key": "uniswap-token/ethereum/1", } ] } response = requests.post(url, json=payload, headers=headers) for result in response.json()["results"]: print(result) ``` ```javascript JavaScript theme={null} const url = 'https://api.dune.com/api/v1/contracts/decode'; const response = await fetch(url, { method: 'POST', headers: { 'X-DUNE-API-KEY': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ submissions: [ { blockchain_name: 'ethereum', address: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', project_name: 'uniswap', contract_name: 'UniswapToken', abi: [{ type: 'event', name: 'Transfer', inputs: [] }], has_multiple_instances: false, is_created_by_factory: false, is_manual_abi: false, is_proxy: false, idempotency_key: 'uniswap-token/ethereum/1' } ] }) }); const data = await response.json(); console.log(data.results); ``` ```json Example Response theme={null} { "results": [ { "index": 0, "submission_id": "0b1e4c2a-7d3f-4e5b-9a6c-8d7e6f5a4b3c", "status": "pending" }, { "index": 1, "error": "abi must be valid JSON" } ] } ``` ```json Replayed Item theme={null} { "results": [ { "index": 0, "submission_id": "0b1e4c2a-7d3f-4e5b-9a6c-8d7e6f5a4b3c", "status": "pending", "replayed": true } ] } ``` ```json Plan Required theme={null} { "error": "Resubmissions and multi-chain batches require a paid team plan. Submit new contracts for one chain at a time, or upgrade your plan." } ``` # List Contract Submissions Source: https://docs.dune.com/api-reference/contracts/endpoint/list GET /v1/contracts/submissions List the contract decoding submissions made by your account > [!NOTE] > > Minimum required API key scope: `Read`. Lists the submissions of the user who created the API key. ## Description Returns the contract decoding submissions made by the user who created the API key, newest first. Use it to track submissions made through [Submit Contracts for Decoding](./decode) or the Dune UI. ## Statuses | Status | Meaning | | - | - | | `pending` | Queued; the decoding pipeline picks it up within about a minute. | | `approved` | Validated and about to be decoded. | | `processed` | Decoded tables are available in the Data Explorer. | | `needs_manual_review` | Waiting for a Dune team member. Always the case for upgrades, renames, deletions, and protected namespaces. | | `rejected` | Not accepted; `comment` explains why. | | `in_progress`, `cancelled` | Intermediate and terminal states set during manual handling. | ## Filtering Combine any of `blockchain_name`, `address`, `project_name`, `contract_name`, and `status`. Filters are ANDed together. ## Pagination Results are paged with an opaque cursor. Request a page with `limit` (default 50, maximum 250). When more results exist the response includes `next_cursor`; pass it back as the `cursor` parameter to fetch the next page. `total` is the number of submissions matching the filters across all pages. ## Pricing This is a metadata endpoint and does not consume credits. ## Related Endpoints * [Submit Contracts for Decoding](./decode) - Submit a batch of contracts ```bash cURL theme={null} curl -X GET "https://api.dune.com/api/v1/contracts/submissions?blockchain_name=ethereum&status=pending&limit=20" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/contracts/submissions" headers = {"X-DUNE-API-KEY": "YOUR_API_KEY"} params = {"blockchain_name": "ethereum", "status": "pending", "limit": 20} while True: page = requests.get(url, params=params, headers=headers).json() for submission in page["submissions"]: print(submission["id"], submission["status"]) if "next_cursor" not in page: break params["cursor"] = page["next_cursor"] ``` ```javascript JavaScript theme={null} const url = 'https://api.dune.com/api/v1/contracts/submissions'; const params = new URLSearchParams({ blockchain_name: 'ethereum', status: 'pending', limit: 20 }); const response = await fetch(`${url}?${params}`, { headers: { 'X-DUNE-API-KEY': 'YOUR_API_KEY' } }); const data = await response.json(); console.log(data.submissions, data.next_cursor); ``` ```json Example Response theme={null} { "submissions": [ { "id": "0b1e4c2a-7d3f-4e5b-9a6c-8d7e6f5a4b3c", "blockchain_name": "ethereum", "address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", "project_name": "uniswap", "contract_name": "UniswapToken", "status": "pending", "submission_type": "new", "created_at": "2026-09-10T11:04:18.724658Z", "updated_at": "2026-09-10T11:04:18.724658Z", "idempotency_key": "uniswap-token/ethereum/1" } ], "total": 1 } ``` # Overview Source: https://docs.dune.com/api-reference/contracts/introduction Submit smart contracts for decoding on Dune programmatically, and track the status of your submissions. This is the API equivalent of the [contract submission form](https://dune.com/contracts/new), built for teams that maintain many contracts or refresh ABIs on every deploy. ## Use Cases * **Bulk submission**: Submit up to 100 contracts in one request, for example every contract of a protocol on a new chain. * **ABI refresh**: Resubmit an updated ABI after an upgrade instead of filling in the form again. * **CI integration**: Submit from a deploy pipeline and poll for the result, using idempotency keys so retries are safe. * **Status tracking**: List your submissions and filter by chain, project, contract, or status. > [card] [Submit Contracts for Decoding](/api-reference/contracts/endpoint/decode) > > Submit a batch of contracts with their ABIs and get a per-item result. > [card] [List Contract Submissions](/api-reference/contracts/endpoint/list) > > Track the status of the submissions made by your account. ## How Decoding Submissions Work 1. You submit a contract with its ABI. Each item in the batch is validated and stored independently, so one bad item does not fail the others. 2. Accepted items start as `pending`. Dune's decoding pipeline picks them up within a minute and moves them to `approved`, `rejected`, or `needs_manual_review`. 3. Approved submissions are processed and decoded tables appear under `_._evt_*` and `_call_*` in the Data Explorer, after which the status becomes `processed`. > [!NOTE] > > **Some submissions always go to manual review.** ABI upgrades (`submission_type: "upgrade"`), renames, deletions, and submissions to protected namespaces are queued for a Dune team member to review rather than processed automatically. They will show `needs_manual_review` until then. ## Requirements * **Attributed to you.** Submissions are attributed to the Dune user who created the API key, the same way the form attributes them to the logged-in user. For a team's key that user must still be a member of the team. * **Read/Write scope** to submit, **Read** scope to list. * **Paid plan for advanced submissions.** Free plans can submit new contracts for one blockchain per request. Batches spanning multiple blockchains, and resubmissions (`upgrade`, `rename`, `delete`, `other`), require a paid plan: the team's plan for a team API key. Submissions made through the API appear alongside your form submissions in the [Dune UI](https://dune.com/contracts/new), and the same [contract submission guidance](/web-app/decoding/short-guide-contract-submission) applies. # Get Dataset Source: https://docs.dune.com/api-reference/datasets/endpoint/get GET /v1/datasets/{slug} Retrieve dataset information including columns, metadata, and ownership details > [!NOTE] > > Minimum required API key scope: `Read` > [!NOTE] > > * Retrieve detailed information about a specific dataset by its slug - Returns > complete schema including all columns with data types - Includes ownership > details and metadata - Example slugs: `dex.trades`, `tokens.erc20`, > `ethereum.transactions` # Use Cases * **Schema Discovery**: Retrieve the complete schema of a dataset including column names, data types, and nullability. * **Table Exploration**: Understand the structure of a dataset before writing queries against it. * **Data Integration**: Programmatically fetch table schemas for ETL pipelines and data integration tools. * **Documentation Generation**: Automatically generate documentation for datasets based on their schemas. * **Validation**: Verify dataset structure and columns before building queries or applications. # List Datasets Source: https://docs.dune.com/api-reference/datasets/endpoint/list GET /v1/datasets Retrieve a paginated list of datasets with optional filtering by owner and type > [!NOTE] > > Minimum required API key scope: `Read` # Use Cases * **Browse Available Data**: Programmatically discover all tables and datasets available on Dune for querying. * **Filter by Owner**: Find all datasets owned by a specific user or team using `owner_handle` parameter. * **Filter by Type**: Narrow down results to specific dataset types like curated tables, decoded tables, or transformations using the `type` parameter. * **Build Data Catalogs**: Create custom data discovery tools that index and search through Dune's table ecosystem. * **Access Management**: Audit and manage datasets owned by your team or organization. # Search Datasets Source: https://docs.dune.com/api-reference/datasets/endpoint/search POST /v1/datasets/search Search for datasets across the Dune catalog, with filtering by categories, blockchains, schemas, and more > [!NOTE] > > Minimum required API key scope: `Read` # Use Cases * **Free-Text Search**: Search across Dune's entire dataset catalog using natural language queries like `"dex trades"` or `"ethereum transactions"`. * **Filter by Category**: Narrow results to specific categories such as `canonical`, `decoded`, `spell`, or `community` datasets. * **Filter by Blockchain**: Find datasets for specific blockchains by passing blockchain names in the `blockchains` parameter. * **AI Agents**: Enable AI agents to discover relevant tables and schemas before constructing SQL queries. * **Build Search UIs**: Power custom dataset search interfaces and data discovery tools on top of Dune's catalog. # Search Datasets by Contract Address Source: https://docs.dune.com/api-reference/datasets/endpoint/search-by-contract POST /v1/datasets/search-by-contract Find decoded datasets associated with a smart contract address > [!NOTE] > > Minimum required API key scope: `Read` # Use Cases * **Contract Analysis**: Find all decoded datasets associated with a specific smart contract address. * **Blockchain Filtering**: Narrow results to decoded tables on specific blockchains using the `blockchains` parameter. * **Build Contract Explorers**: Power contract exploration tools that surface relevant decoded tables for any contract address. * **Data Integration**: Programmatically discover decoded event and function tables for a contract to build ETL pipelines. * **Schema Discovery**: Retrieve the schema of decoded tables for a contract by setting `include_schema` to `true`. # Overview Source: https://docs.dune.com/api-reference/datasets/introduction Leverage Dune's Datasets API for programmatic access to explore all queryable tables on Dune. Discover schemas, metadata, and ownership details without writing SQL—perfect for building data catalogs, discovery tools, and data integration pipelines. ## Use Cases * **Data Discovery**: Programmatically browse and search through all available datasets on Dune * **AI Agents**: Allow AI agents to understand the available tables and schemas before constructing the SQL query. * **Schema Exploration**: Retrieve column names, data types, and metadata for any table * **Access Management**: Filter datasets by owner to understand team data assets > [card] [List Datasets](/api-reference/datasets/endpoint/list) > > Retrieve a paginated list of datasets with optional filtering by owner and > type. > [card] [Get Dataset](/api-reference/datasets/endpoint/get) > > Get detailed information about a specific dataset including columns and > metadata. > [card] [Search Datasets](/api-reference/datasets/endpoint/search) > > Search across the dataset catalog with free-text queries and advanced > filters. > [card] [Search by Contract Address](/api-reference/datasets/endpoint/search-by-contract) > > Find decoded datasets associated with a specific smart contract address. # Cancel Execution Source: https://docs.dune.com/api-reference/executions/endpoint/cancel-execution POST /v1/execution/{execution_id}/cancel Cancel a pending or running execution, given the execution ID returned when the query or SQL was submitted for execution. > [!NOTE] > > Minimum required API key scope: `Read` You must pass the `execution_id` obtained from making an [execute query](/api-reference/executions/endpoint/execute-query) POST request. The result returns a boolean for whether the execution is successfully canceled. ```bash cURL theme={null} curl -X POST -H x-dune-api-key:{{api_key}} "https://api.dune.com/api/v1/execution/{{execution_id}}/cancel" ``` ```python Python SDK theme={null} ''' Download Dune Python SDK by running `pip install dune-client` For more info, visit the GitHub repository: https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38 ''' import json from dune_client.types import QueryParameter from dune_client.client import DuneClient from dune_client.query import QueryBase # setup Dune Python client dune = DuneClient() result = dune.cancel_execution(job_id = '01HM79YYNXADPK66YWZK5X0NXB') # pass in the execution_id ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/execution/{execution_id}/cancel" headers = {"X-DUNE-API-KEY": ""} response = requests.request("POST", url, headers=headers) print(response.text) ``` ```javascript Javascript theme={null} const options = {method: 'POST', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/execution/{execution_id}/cancel', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/execution/{execution_id}/cancel" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/execution/{execution_id}/cancel", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.post("https://api.dune.com/api/v1/execution/{execution_id}/cancel") .header("X-DUNE-API-KEY", "") .asString(); ``` # Execute Query Source: https://docs.dune.com/api-reference/executions/endpoint/execute-query POST /v1/query/{query_id}/execute Run a saved query by its query ID, optionally with parameter values and a performance tier. Returns an execution ID; poll its status and read its results with the execution endpoints. > [!NOTE] > > Minimum required API key scope: `Read` > [accordion] Execute query and get result in one call > > > [!TIP] > > > > If you are using the [Python SDK](https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38), you can directly execute and fetch result in one function call, like below: > > Use `run_query` to get result in JSON, > `run_query_csv` to get result in CSV format, > and `run_query_dataframe` to get result in Pandas dataframe > > ```python Python SDK theme={null} > > import json > from dune_client.types import QueryParameter > from dune_client.client import DuneClient > from dune_client.query import QueryBase > > # setup Dune Python client > dune = DuneClient() > > query = QueryBase( > name="Sample Query", > query_id=1215383, > ) > > result = dune.run_query( > query = query, > performance = 'large' # optionally define which tier to run the execution on (default is "medium") > ) > > # go over the results returned > for row in result.result.rows: > print (row) # as an example we print the rows > ``` If the query has parameters and you don't add them in your API call, it will just run with the default params. You may add query parameters as part of the POST params data. You can choose to include a `performance` parameter, by default it will use the "medium" performance tier. Credits are consumed based on actual compute resources used. "large" tier provides more resources for complex queries. Returns an execution_id associated with the triggered query execution and the state of the execution. ```bash cURL theme={null} curl -X POST "https://api.dune.com/api/v1/query/{{query_id}}/execute" \ -H "X-Dune-API-Key: {{api_key}}" \ -H "Content-Type: application/json" \ -d '{"query_parameters": {"param1":24}, "performance": "large"}' ``` ```python Python SDK theme={null} ''' Download Dune Python SDK by running `pip install dune-client` For more info, visit the GitHub repository: https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38 ''' import json from dune_client.types import QueryParameter from dune_client.client import DuneClient from dune_client.query import QueryBase # setup Dune Python client dune = DuneClient() # define the query to run query = QueryBase( name="Sample Query", query_id=1215383, params=[ QueryParameter.text_type(name="TextField", value="Word"), QueryParameter.number_type(name="NumberField", value=3.1415926535), QueryParameter.date_type(name="DateField", value="2022-05-04 00:00:00"), QueryParameter.enum_type(name="ListField", value="Option 1"), ], ) result = dune.execute_query(query = query # pass in the query we just defined , performance = "large" # define engine query is run on, default is "medium" ) ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/query/{query_id}/execute" headers = {"X-DUNE-API-KEY": ""} response = requests.request("POST", url, headers=headers) print(response.text) ``` ```javascript Javascript theme={null} const options = {method: 'POST', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/query/{query_id}/execute', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/query/{query_id}/execute" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/query/{query_id}/execute", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.post("https://api.dune.com/api/v1/query/{query_id}/execute") .header("X-DUNE-API-KEY", "") .asString(); ``` # Execute Query Pipeline Source: https://docs.dune.com/api-reference/executions/endpoint/execute-query-pipeline POST /v1/query/{query_id}/pipeline/execute Builds a query pipeline from the specified query and executes it. A pipeline allows you to chain multiple queries together and execute them as a single unit. > [!NOTE] > > Minimum required API key scope: `Read` This endpoint builds a query pipeline from the specified query and executes it. A pipeline allows you to chain multiple queries together and execute them as a single unit. ## What is a Query Pipeline? A query pipeline enables you to create a chain of dependencies between queries, where: * Each query in the pipeline can depend on the results of previous queries * The pipeline executes queries in the correct order based on their dependencies * All queries are executed as a single atomic operation ## Use Cases Query pipelines are ideal for: * **Complex Data Transformations**: Breaking down complex analysis into smaller, manageable queries * **Data Lineage**: Maintaining clear dependencies between related queries * **Coordinated Updates**: Ensuring multiple queries are executed together * **Incremental Processing**: Building data pipelines where each step depends on the previous one ## Response The endpoint returns a `pipeline_execution_id` which you can use to: 1. Check the status of the pipeline execution using the [Get Pipeline Execution Status](/api-reference/pipelines/endpoint/get-pipeline-status) endpoint 2. Monitor the progress of individual nodes in the pipeline 3. Retrieve results from each query in the pipeline once execution completes > [!NOTE] > > * Credits are consumed based on actual compute resources used for each query in the pipeline > * Use the `performance` parameter to specify execution tier (medium or large) > * Query parameters can be passed to parameterize queries in the pipeline ## Example Workflow ```bash theme={null} # 1. Execute the pipeline curl -X POST "https://api.dune.com/api/v1/query/1234567/pipeline/execute" \ -H "X-Dune-Api-Key: YOUR_API_KEY" # Response: { "pipeline_execution_id": "01HZABC123..." } # 2. Check pipeline status curl "https://api.dune.com/api/v1/pipelines/executions/01HZABC123.../status" \ -H "X-Dune-Api-Key: YOUR_API_KEY" ``` ## Related Endpoints * [Get Query Pipeline](/api-reference/queries/endpoint/get-query-pipeline) - Inspect pipeline structure before execution * [Get Pipeline Status](/api-reference/pipelines/endpoint/get-pipeline-status) - Check pipeline execution status * [Execute Pipeline](/api-reference/pipelines/endpoint/execute-pipeline) - Execute a lineage-based pipeline # Execute SQL Source: https://docs.dune.com/api-reference/executions/endpoint/execute-sql POST /v1/sql/execute Execute raw SQL queries directly without needing to create a saved query first > [!NOTE] > > Minimum required API key scope: `Read` > Run arbitrary SQL queries via API. This endpoint allows you to execute SQL directly without first creating a query object, perfect for dynamic analysis and automated workflows. > [!NOTE] > > When executing arbitrary SQL queries (queries not saved in Dune), the `query_id` in the response will always be `0`. This is a placeholder value since these queries are not stored in the Dune database. ## Pricing This endpoint is **usage-based** and consumes credits based on the computational resources used during execution. ```bash cURL theme={null} curl -X POST "https://api.dune.com/api/v1/sql/execute" \ -H "Content-Type: application/json" \ -H "X-Dune-Api-Key: YOUR_API_KEY" \ -d '{ "sql": "SELECT * FROM dex.trades WHERE block_time > now() - interval '\''1'\'' day LIMIT 10", "performance": "medium" }' ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/sql/execute" headers = { "X-DUNE-API-KEY": "YOUR_API_KEY", "Content-Type": "application/json" } data = { "sql": "SELECT * FROM dex.trades WHERE block_time > now() - interval '1' day LIMIT 10", "performance": "medium" } response = requests.post(url, json=data, headers=headers) print(response.json()) ``` ```javascript JavaScript theme={null} const response = await fetch('https://api.dune.com/api/v1/sql/execute', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-DUNE-API-KEY': 'YOUR_API_KEY' }, body: JSON.stringify({ sql: "SELECT * FROM dex.trades WHERE block_time > now() - interval '1' day LIMIT 10", performance: 'medium' }) }); const data = await response.json(); console.log(data); ``` ```bash Complete Workflow theme={null} # Step 1: Execute SQL and get execution ID EXECUTION_ID=$(curl -s -X POST "https://api.dune.com/api/v1/sql/execute" \ -H "Content-Type: application/json" \ -H "X-Dune-Api-Key: YOUR_API_KEY" \ -d '{"sql": "SELECT * FROM dex.trades LIMIT 10", "performance": "medium"}' \ | jq -r '.execution_id') # Step 2: Poll for completion while true; do STATE=$(curl -s "https://api.dune.com/api/v1/execution/$EXECUTION_ID/status" \ -H "X-Dune-Api-Key: YOUR_API_KEY" \ | jq -r '.state') echo "State: $STATE" [[ "$STATE" =~ (QUERY_STATE_COMPLETED|QUERY_STATE_FAILED|QUERY_STATE_CANCELLED) ]] && break sleep 2 done # Step 3: Get results curl -s "https://api.dune.com/api/v1/execution/$EXECUTION_ID/results" \ -H "X-Dune-Api-Key: YOUR_API_KEY" | jq ``` ```json theme={null} { "execution_id": "01HKZJ2683PHF9Q9PHHQ8FW4Q1", "state": "QUERY_STATE_PENDING" } ``` # Get Execution Result Source: https://docs.dune.com/api-reference/executions/endpoint/get-execution-result GET /v1/execution/{execution_id}/results Returns the result of an execution in JSON format, given the execution ID returned when the query or SQL was submitted for execution. Use the query parameters to page, filter, sort, and sample the result rows. > [!NOTE] > > Minimum required API key scope: `Read` You must pass the `execution_id` obtained from making an [execute query](/api-reference/executions/endpoint/execute-query) POST request. Result returns the status, metadata, and query results (in JSON) from a query execution. > [!TIP] > > * Read more on [Filtering](../filtering), [Sorting](../sorting), and [Sampling](../sampling) to learn more about flexibly grabbing query results. > * Read more on [Pagination](../pagination) to get the most out of the API and handle large results. > [!NOTE] > > * Results data from an execution are stored for 90 days. This is visible on the API response on the “expires_at” field in the execution status and results body. > * Dune internally has a maximum query result size limit (which currently is 32GB). If your query yields more than 32GB of data, the result will be truncated in storage. In such cases, pulling the result data (using pagination) but without specifying `allow_partial_results` set to true will trigger an error message: "error": "Partial Result, please request with 'allows_partial_results=true'". If you wish to retrieve partial results, you can pass the parameter `allow_partial_results=true`. But please make sure you indeed want to fetch the truncated result. > [accordion] Execute query and get result in one call > > > [!TIP] > > > > If you are using the [Python SDK](https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38) or community [Typescript SDK](https://github.com/bh2smith/ts-dune-client), you can directly execute and fetch a result in one function call, like below: > > > [tab] Python SDK > > > > ```python theme={null} > > > > import json > > from dune_client.types import QueryParameter > > from dune_client.client import DuneClient > > from dune_client.query import QueryBase > > > > # setup Dune Python client > > dune = DuneClient() > > > > ``` > > > > Use `run_query` to get result in JSON, > > `run_query_csv` to get result in CSV format, > > and `run_query_dataframe` to get result in Pandas dataframe > > > > ``` > > > > result = dune.run_query( > > query=query # pass in query to run > > , performance = 'large' # optionally define which tier to run the execution on (default is "medium") > > ) > > > > ``` > > > [tab] Typescript SDK > > > > ```typescript theme={null} > > import { QueryParameter, DuneClient } from "@duneanalytics/client-sdk"; > > const { DUNE_API_KEY } = process.env; > > const client = new DuneClient(DUNE_API_KEY ?? ""); > > ``` > > > > Use `refresh` to get result in JSON > > > > ```typescript theme={null} > > const queryID = 1215383; > > const parameters = [ > > QueryParameter.text("TextField", "Plain Text"), > > QueryParameter.number("NumberField", 3.1415926535), > > QueryParameter.date("DateField", "2022-05-04 00:00:00"), > > QueryParameter.enum("ListField", "Option 1"), > > ]; > > > > client > > .refresh(queryID, parameters) > > .then((executionResult) => console.log(executionResult.result?.rows)); > > > > // should look like > > // [ > > // { > > // date_field: "2022-05-04 00:00:00", > > // list_field: "Option 1", > > // number_field: "3.1415926535", > > // text_field: "Plain Text", > > // }, > > // ]; > > ``` ```bash cURL theme={null} curl -X GET "https://api.dune.com/api/v1/execution/{{execution_id}}/results" -H x-dune-api-key:{{api_key}} ``` ```python Python SDK theme={null} ''' Download Dune Python SDK by running `pip install dune-client` For more info, visit the GitHub repository: https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38 ''' import json from dune_client.types import QueryParameter from dune_client.client import DuneClient from dune_client.query import QueryBase # setup Dune Python client dune = DuneClient() result = dune.get_execution_results(job_id = '01HM79YYNXADPK66YWZK5X0NXB') # pass in the execution_id ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/execution/{execution_id}/results" headers = {"X-DUNE-API-KEY": ""} response = requests.request("GET", url, headers=headers) print(response.text) ``` ```javascript Javascript theme={null} const options = {method: 'GET', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/execution/{execution_id}/results', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/execution/{execution_id}/results" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/execution/{execution_id}/results", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.get("https://api.dune.com/api/v1/execution/{execution_id}/results") .header("X-DUNE-API-KEY", "") .asString(); ``` # Get Execution Result in CSV Source: https://docs.dune.com/api-reference/executions/endpoint/get-execution-result-csv GET /v1/execution/{execution_id}/results/csv Returns the result of an execution in CSV format, given the execution ID returned when the query or SQL was submitted for execution. > [!NOTE] > > Minimum required API key scope: `Read` You must pass the `execution_id` obtained from making an [execute query](/api-reference/executions/endpoint/execute-query) POST request. Result returns the status, metadata, and query results (in CSV) from a query execution. > [!TIP] > > * Read more on [Filtering](../filtering), [Sorting](../sorting), and [Sampling](../sampling) to learn more about flexibly grabbing query results. > * Read more on [Pagination](../pagination) to get the most out of the API and handle large results. > [!NOTE] > > * Results data from an execution are stored with an expiration date of 90 days. This is visible on the API response on the “expires_at” field in the execution status and results json body (not on the CSV endpoint). > * Dune internally has a maximum query result size limit (which currently is 32GB). If your query yields more than 32GB of data, the result will be truncated in storage. In such cases, pulling the result data (using pagination) but without specifying `allow_partial_results` set to true will trigger an error message: "error": "Partial Result, please request with 'allows_partial_results=true'". If you wish to retrieve partial results, you can pass the parameter `allow_partial_results=true`. But please make sure you indeed want to fetch the truncated result. > [accordion] Execute query and get result in one call > > > [!TIP] > > > > If you are using the [Python SDK](https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38), you can directly execute and fetch result in one function call, like below: > > ```python Python SDK theme={null} > > import json > from dune_client.types import QueryParameter > from dune_client.client import DuneClient > from dune_client.query import QueryBase > > # setup Dune Python client > dune = DuneClient() > > ``` > > Use `run_query` to get result in JSON, > `run_query_csv` to get result in CSV format, > and `run_query_dataframe` to get result in Pandas dataframe > > ``` > > result = dune.run_query( > query=query # pass in query to run > , performance = 'large' # optionally define which tier to run the execution on (default is "medium") > ) > > ``` ```bash cURL theme={null} curl -X GET "https://api.dune.com/api/v1/execution/{{execution_id}}/results/csv" -H x-dune-api-key:{{api_key}} ``` ```python Python SDK theme={null} ''' Download Dune Python SDK by running `pip install dune-client` For more info, visit the GitHub repository: https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38 ''' import json from dune_client.types import QueryParameter from dune_client.client import DuneClient from dune_client.query import QueryBase # setup Dune Python client dune = DuneClient() result = dune.get_execution_results_csv(job_id = '01HM7F50BXZVPHJNWJQM6GMS1M') # pass in the execution_id ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/execution/{execution_id}/results/csv" headers = {"X-DUNE-API-KEY": ""} response = requests.request("GET", url, headers=headers) print(response.text) ``` ```javascript Javascript theme={null} const options = {method: 'GET', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/execution/{execution_id}/results/csv', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/execution/{execution_id}/results/csv" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/execution/{execution_id}/results/csv", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.get("https://api.dune.com/api/v1/execution/{execution_id}/results/csv") .header("X-DUNE-API-KEY", "") .asString(); ``` # Get Execution Status Source: https://docs.dune.com/api-reference/executions/endpoint/get-execution-status GET /v1/execution/{execution_id}/status Returns the state of an execution, given the execution ID returned when the query or SQL was submitted for execution. Poll this until the execution completes, then read its results. > [!NOTE] > > Minimum required API key scope: `Read` You must pass the `execution_id` obtained from making an [execute query](/api-reference/executions/endpoint/execute-query) or [execute SQL](/api-reference/executions/endpoint/execute-sql) POST request. Returns the status of a query execution along with relevant metadata of the results if the execution is completed. **This endpoint now includes detailed error information when a query fails**, eliminating the need to call the results endpoint just to get error details. ## Pricing This endpoint has **no charge** and does not consume credits. When present, `execution_cost_credits` is the source of truth for the credits consumed by that execution. ## Execution States Once an execution is triggered, it can be in one of the following states: * `QUERY_STATE_PENDING`: The query execution is waiting for an execution slot. * `QUERY_STATE_EXECUTING`: The query is currently executing. * `QUERY_STATE_FAILED`: The query execution failed. This is a terminal state. **The response will include detailed error information.** * `QUERY_STATE_COMPLETED`: The query execution completed successfully. You can retrieve the query result for this execution_id. * `QUERY_STATE_CANCELED`: The query execution was canceled by the user. * `QUERY_STATE_EXPIRED`: The query execution expired, and the result is no longer available. * `QUERY_STATE_COMPLETED_PARTIAL`: The query execution was successful, but the result was truncated because it was too large. To receive the truncated result, set the `allow_partial_results` flag to `true` in the API request to fetch the result. ## Error Response Fields When a query execution fails (`QUERY_STATE_FAILED`), the response includes an `error` object with the following fields: * **type** (string): Error type classification (e.g., `FAILED_TYPE_EXECUTION_FAILED`) * **message** (string): Detailed error message explaining what went wrong, including line and column information * **metadata** (object): Additional error context * **line** (integer): Line number where the error occurred * **column** (integer): Column position where the error occurred > [!NOTE] > > Some failed executions return `execution_cost_credits: 0`, including SQL syntax/semantic errors, internal query-engine failures, and query-engine capacity-limit failures such as memory or stage limits. ```bash cURL theme={null} curl -X GET "https://api.dune.com/api/v1/execution/{{execution_id}}/status" -H x-dune-api-key:{{api_key}} ``` ```python Python SDK theme={null} ''' Download Dune Python SDK by running `pip install dune-client` For more info, visit the GitHub repository: https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38 ''' import json from dune_client.types import QueryParameter from dune_client.client import DuneClient from dune_client.query import QueryBase # setup Dune Python client dune = DuneClient() result = dune.get_execution_status(job_id = '01HM79YYNXADPK66YWZK5X0NXB') # pass in the execution_id ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/execution/{execution_id}/status" headers = {"X-DUNE-API-KEY": ""} response = requests.request("GET", url, headers=headers) print(response.text) ``` ```javascript Javascript theme={null} const options = {method: 'GET', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/execution/{execution_id}/status', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/execution/{execution_id}/status" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/execution/{execution_id}/status", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.get("https://api.dune.com/api/v1/execution/{execution_id}/status") .header("X-DUNE-API-KEY", "") .asString(); ``` ```json Success Response theme={null} { "execution_id": "01HKZJ2683PHF9Q9PHHQ8FW4Q1", "query_id": 3493826, "is_execution_finished": true, "state": "QUERY_STATE_COMPLETED", "submitted_at": "2025-10-22T10:31:04.222464Z", "expires_at": "2026-01-20T10:31:04.36241Z", "execution_started_at": "2025-10-22T10:31:05.123456Z", "execution_ended_at": "2025-10-22T10:31:15.789012Z", "execution_cost_credits": 10 } ``` ```json Error Response theme={null} { "execution_id": "01K85QHSS0RBGW4BHDM0RFCG9C", "query_id": 6012998, "is_execution_finished": true, "state": "QUERY_STATE_FAILED", "submitted_at": "2025-10-22T10:31:04.222464Z", "expires_at": "2026-01-20T10:31:04.36241Z", "execution_cost_credits": 0, "error": { "type": "FAILED_TYPE_EXECUTION_FAILED", "message": "line 1:8: Column 'x' cannot be resolved at line 1, position 8. Please verify that this column exists using the data explorer. Learn how to use the data explorer here: https://dune.com/docs/app/query-editor/data-explorer/ [Execution ID: 01K85QHSS0RBGW4BHDM0RFCG9C]", "metadata": { "line": 1, "column": 8 } } } ``` # Get Latest Query Result Source: https://docs.dune.com/api-reference/executions/endpoint/get-query-result GET /v1/query/{query_id}/results Given a query ID, returns the latest executed result of a query on Dune in JSON format > [!NOTE] > > Minimum required API key scope: `Read` You must pass parameter query_id. Returns the latest execution id and results (in JSON) of that latest run, regardless of the job id/run or if it is run in the app or the api. The query specified must either be public or a query you have ownership of (you or a team you belong to have ownership). > [!TIP] > > * This endpoint does NOT trigger an execution but does **consume credits based on the result size**. See [Billing](/api-reference/overview/billing) for details. > * Read more on [Filtering](../filtering), [Sorting](../sorting), and [Sampling](../sampling) to learn more about flexibly grabbing query results. > * Read more on [Pagination](../pagination) to get the most out of the API and handle large results. ## Parameterized queries If the query has [parameters](/web-app/query-editor/parameters), pass them in the query string prefixed with `params.` to fetch the latest result for those parameter values. **params.\** `string` Value of the query parameter `name`, e.g. `params.blockchain=ethereum`. Repeat the key to pass several values to a multi-select parameter, e.g. `params.chain=ethereum¶ms.chain=base`. ```bash cURL theme={null} curl --request GET \ --url 'https://api.dune.com/api/v1/query/{query_id}/results?params.blockchain=ethereum¶ms.days=7' \ --header 'X-DUNE-API-KEY: ' ``` > [!NOTE] > > * Parameter matching is partial — pass only the parameters you want to match on. Passing none returns the latest execution regardless of the parameter values it ran with. > * For a multi-select parameter, pass every selected value. Passing only one will not match an execution that ran with several. > * The lookup is scoped to the query's current SQL. If the query has been edited since it last ran there is no matching execution, and this endpoint returns a 404 (`No execution found for the latest version of the given query`) until the query is executed again. The same applies once a result has expired. > [!NOTE] > > * Dune internally has a maximum query result size limit (which currently is 32GB). If your query yields more than 32GB of data, the result will be truncated in storage. In such cases, pulling the result data (using pagination) but without specifying `allow_partial_results` set to true will trigger an error message: "error": "Partial Result, please request with 'allows_partial_results=true'". If you wish to retrieve partial results, you can pass the parameter `allow_partial_results=true`. But please make sure you indeed want to fetch the truncated result. > [accordion] Execute query and get result in one call > > > [!TIP] > > > > If you are using the [Python SDK](https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38), you can directly execute and fetch result in one function call, like below: > > ```python Python SDK theme={null} > > import json > from dune_client.types import QueryParameter > from dune_client.client import DuneClient > from dune_client.query import QueryBase > > # setup Dune Python client > dune = DuneClient() > > ``` > > Use `run_query` to get result in JSON, > `run_query_csv` to get result in CSV format, > and `run_query_dataframe` to get result in Pandas dataframe > > ``` > > result = dune.run_query( > query=query # pass in query to run > , performance = 'large' # optionally define which tier to run the execution on (default is "medium") > ) > > ``` ```bash cURL theme={null} curl --request GET \ --url https://api.dune.com/api/v1/query/{query_id}/results ``` ```python Python SDK theme={null} ''' Download Dune Python SDK by running `pip install dune-client` For more info, visit the GitHub repository: https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38 ''' import json from dune_client.types import QueryParameter from dune_client.client import DuneClient from dune_client.query import QueryBase # setup Dune Python client dune = DuneClient() # pass in the query_id # optionally specify a `max_age_hours` to re-run the query if the data is too outdated result = dune.get_latest_result('2363421', max_age_hours=8) # can also call `get_latest_result_dataframe` method to get latest result in Python Pandas dataframe format ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/query/{query_id}/results" headers = {"X-DUNE-API-KEY": ""} response = requests.request("GET", url, headers=headers) print(response.text) ``` ```javascript Javascript theme={null} const options = {method: 'GET', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/query/{query_id}/results', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/query/{query_id}/results" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/query/{query_id}/results", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.get("https://api.dune.com/api/v1/query/{query_id}/results") .header("X-DUNE-API-KEY", "") .asString(); ``` # Get Latest Query Result in CSV Source: https://docs.dune.com/api-reference/executions/endpoint/get-query-result-csv GET /v1/query/{query_id}/results/csv Given a query ID, returns the latest executed result of a query on Dune in CSV format, without triggering a new execution. > [!NOTE] > > Minimum required API key scope: `Read` You must pass parameter query_id. Returns the latest execution id and results (in CSV) of that latest run, regardless of the job id/run or if it is run in the app or the api. The query specified must either be public or a query you have ownership of (you or a team you belong to have ownership). > [!TIP] > > * This endpoint does NOT trigger an execution but does **consume credits based on the result size**. See [Billing](/api-reference/overview/billing) for details. > * Read more on [Filtering](../filtering), [Sorting](../sorting), and [Sampling](../sampling) to learn more about flexibly grabbing query results. > * Read more on [Pagination](../pagination) to get the most out of the API and handle large results. ## Parameterized queries If the query has [parameters](/web-app/query-editor/parameters), pass them in the query string prefixed with `params.` to fetch the latest result for those parameter values. **params.\** `string` Value of the query parameter `name`, e.g. `params.blockchain=ethereum`. Repeat the key to pass several values to a multi-select parameter, e.g. `params.chain=ethereum¶ms.chain=base`. ```bash cURL theme={null} curl --request GET \ --url 'https://api.dune.com/api/v1/query/{query_id}/results/csv?params.blockchain=ethereum¶ms.days=7' \ --header 'X-DUNE-API-KEY: ' ``` > [!NOTE] > > * Parameter matching is partial — pass only the parameters you want to match on. Passing none returns the latest execution regardless of the parameter values it ran with. > * For a multi-select parameter, pass every selected value. Passing only one will not match an execution that ran with several. > * The lookup is scoped to the query's current SQL. If the query has been edited since it last ran there is no matching execution, and this endpoint returns a 404 (`No execution found for the latest version of the given query`) until the query is executed again. The same applies once a result has expired. > [!NOTE] > > * Dune internally has a maximum query result size limit (which currently is 32GB). If your query yields more than 32GB of data, the result will be truncated in storage. In such cases, pulling the result data (using pagination) but without specifying `allow_partial_results` set to true will trigger an error message: "error": "Partial Result, please request with 'allows_partial_results=true'". If you wish to retrieve partial results, you can pass the parameter `allow_partial_results=true`. But please make sure you indeed want to fetch the truncated result. > [accordion] Execute query and get result in one call > > > [!TIP] > > > > If you are using the [Python SDK](https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38), you can directly execute and fetch result in one function call, like below: > > ```python Python SDK theme={null} > > import json > from dune_client.types import QueryParameter > from dune_client.client import DuneClient > from dune_client.query import QueryBase > > # setup Dune Python client > dune = DuneClient() > > ``` > > Use `run_query` to get result in JSON, > `run_query_csv` to get result in CSV format, > and `run_query_dataframe` to get result in Pandas dataframe. > > ``` > > result = dune.run_query( > query=query # pass in query to run > , performance = 'large' # optionally define which tier to run the execution on (default is "medium") > ) > > ``` ```bash cURL theme={null} curl --request GET \ --url https://api.dune.com/api/v1/query/{query_id}/results/csv ``` ```python Python SDK theme={null} ''' Download Dune Python SDK by running `pip install dune-client` For more info, visit the GitHub repository: https://github.com/duneanalytics/dune-client/tree/d2195b2a9577e2dcae5d2600cb3eddce20987f38 ''' import json from dune_client.types import QueryParameter from dune_client.client import DuneClient from dune_client.query import QueryBase # setup Dune Python client dune = DuneClient() # pass in the query_id result = dune.download_csv('2363421') # can also call `get_latest_result_dataframe` method to get latest result in Python Pandas dataframe format ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/query/{query_id}/results/csv" headers = {"X-DUNE-API-KEY": ""} response = requests.request("GET", url, headers=headers) print(response.text) ``` ```javascript Javascript theme={null} const options = {method: 'GET', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/query/{query_id}/results/csv', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/query/{query_id}/results/csv" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/query/{query_id}/results/csv", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.get("https://api.dune.com/api/v1/query/{query_id}/results/csv") .header("X-DUNE-API-KEY", "") .asString(); ``` # Overview Source: https://docs.dune.com/api-reference/executions/execution-object The executions and results endpoints facilitate the execution of saved queries, retrieval of results in various formats, and management of query executions. ## Queries, Executions, and Results Results are linked to executions, and executions are tied to queries. Each execution has an `execution_id`. An `execution_id` is generated when you initiate the execution of a query through the [execute query](./endpoint/execute-query) endpoint. Unlike a `query_id`, which identifies a specific query, an `execution_id` represents a particular execution of that query. With an `execution_id`, you can monitor the execution's status using the [check status](./endpoint/get-execution-status) endpoint. The status can be one of the following: pending, success, or failure. If an execution is successful, you can get the result using [get result](./endpoint/get-execution-result). Results are saved and can be retrieved multiple times. Results data from an execution are stored with an expiration date of 90 days (subject to change). This is visible on the API response on the “expires_at” field in the execution status and results json body (not on the CSV endpoint). > [!TIP] > > * Save your `execution_id` for later use without re-executing. > * Use the [get latest query result](./endpoint/get-query-result) endpoint to fetch the most recent result. > * Understanding the differences and relationships between query results filters, schedules, executions, and params is crucial. Further details are provided below. ## Query Filters vs. Execution Parameters Two primary methods exist for fetching data from the Dune API while applying specific conditions: **Option 1**: Utilize filters with the latest query result and employ schedules to maintain data freshness. 1. Obtain the `query_id`. 2. Use [get latest query result](./endpoint/get-query-result) endpoint to access the most recent results. 3. Apply [filters](./filtering) for desired data subsets. 4. Implement schedules for maintaining data freshness. **Option 2**: Execute a query with parameters to retrieve the desired subset of data. 1. Obtain the `query_id`. 2. Use [execute query](./endpoint/execute-query) endpoint with parameters to trigger fresh execution. 3. Grab the `execution_id` from the response. 4. Fetch results via [get execution result](./endpoint/get-execution-result) endpoint using the `execution_id`. ### Choosing Between Options * Option 1 offers speed, as it builds upon existing results with filters. Use it when quick results are essential. * Option 2 allows dynamic parameter passing for fresh executions. Employ it when real-time parameterization is required. ## Endpoints Below is an overview of each endpoint, providing a high-level understanding of their functionalities. | Endpoint Title | Endpoint | Description | | - | - | - | | [Execute SQL](./endpoint/execute-sql) | `POST /v1/sql/execute` | Executes arbitrary SQL queries directly. Returns an `execution_id` to track the query execution. | | [Execute Query](./endpoint/execute-query) | `POST /v1/query/{query_id}/execute` | Triggers an execution based on the `query_id`. Returns an `execution_id`. | | [Execute Query Pipeline](./endpoint/execute-query-pipeline) | `POST /v1/query/{query_id}/pipeline/execute` | Executes a query pipeline with all its dependencies. Returns a `pipeline_execution_id`. | | [Get Execution Status](./endpoint/get-execution-status) | `GET /v1/execution/{execution_id}/status` | Provides the status of a query execution given an `execution_id`. | | [Get Execution Result](./endpoint/get-execution-result) | `GET /v1/execution/{execution_id}/results` | Fetches the execution status, metadata, and results in JSON format. Similar data handling as CSV endpoint. | | [Get Execution Result in CSV](./endpoint/get-execution-result-csv) | `GET /v1/execution/{execution_id}/results/csv` | Retrieves the status, metadata, and results in CSV format. Includes data retention and limit information. | | [Get Latest Query Result](./endpoint/get-query-result) | `GET /v1/query/{query_id}/results` | Similar to the CSV endpoint but returns results in JSON format. Follows the same access and data limit policies. | | [Get Latest Query Result in CSV](./endpoint/get-query-result-csv) | `GET /v1/query/{query_id}/results/csv` | Returns the latest results of a query in CSV format, irrespective of the execution method. Queries must be public or owned. | | [Cancel Execution](./endpoint/cancel-execution) | `POST /v1/execution/{execution_id}/cancel` | Cancels an ongoing query execution. Requires the `execution_id`. Returns a success boolean. | # Result Filtering Source: https://docs.dune.com/api-reference/executions/filtering Filter query results server-side using SQL-like WHERE clauses - unique to Dune's API > [!NOTE] > > **Unique to Dune:** Server-side result filtering is a powerful feature that sets Dune's API apart. Filter millions of rows using SQL-like WHERE clauses without transferring unnecessary data or processing client-side. ## Overview Dune's API supports sophisticated filtering on all `/results` endpoints, allowing you to refine query results server-side. Apply filters on rows and columns to dramatically reduce bandwidth and processing time. **Benefits:** * **Reduce bandwidth:** Only transfer the data you need * **Save processing time:** Filter server-side before data transfer * **Simplify client code:** No need for complex client-side filtering logic * **Lower costs:** Minimize data transfer and API calls **Available on these endpoints:** * [Get Execution Results](./endpoint/get-execution-result) * [Get Execution Results CSV](./endpoint/get-execution-result-csv) * [Get Query Results](./endpoint/get-query-result) * [Get Query Results CSV](./endpoint/get-query-result-csv) Filtering can be effectively used in conjunction with [pagination](./pagination) and [sorting](./sorting) to further enhance query efficiency and relevance. See an example of filtering in action with [this Dune farcaster frame](/learning/how-tos/dune-frames). #### Example Filtering Request > [tab] Python SDK > > ```python theme={null} > from dune_client.client import DuneClient > > # setup Dune Python client > dune = DuneClient() > > query_result = dune.get_latest_result_dataframe( > query=3567562 # https://dune.com/queries/3567562 > , filters="overtip_amount > 0" > , columns=["donor_fname","overtip_amount","days_overtipped","overall_tip_given_amount","overall_avg_tip_amount"] > , sort_by=["overall_tip_given_amount desc"] > ) > > print(query_result) > > ``` > [tab] cURL > > ```bash theme={null} > curl -X GET 'https://api.dune.com/api/v1/query/{{query_id}}/results?limit=10&filters=block_time%3E%272024-03-01%27&columns=tx_from%2Ctx_to%2Ctx_hash%2Camount_usd&sort_by=amount_usd%20desc%2Cblock_time' \ > -H 'x-dune-api-key:{{api_key}}’ > ``` > [tab] Python > > ```python theme={null} > import requests > > url = "https://api.dune.com/api/v1/query/{query_id}/results" > > headers = {"X-DUNE-API-KEY": ""} > > params = { > "limit": 10, > "filters": "block_time > '2024-03-01'", > "columns": "tx_from,tx_to,tx_hash,amount_usd", > "sort_by": "amount_usd desc, block_time" > } > > response = requests.request("GET", url, headers=headers, params=params) > > print(response.text) > > ``` > [tab] Javascript > > ```javascript theme={null} > > const options = { > method: 'GET', > headers: { > 'X-DUNE-API-KEY': '' > } > }; > > const queryParams = new URLSearchParams({ > limit: 10, > filters: "block_time > '2024-03-01'", > columns: "tx_from,tx_to,tx_hash,amount_usd", > sort_by: "amount_usd desc, block_time" > }); > const url = `https://api.dune.com/api/v1/query/{query_id}/results?${queryParams}`; > > fetch(url, options) > .then(response => response.json()) > .then(response => console.log(response)) > .catch(err => console.error(err)); > > > ``` > [tab] Go > > ```go theme={null} > > package main > > import ( > "fmt" > "net/http" > "io/ioutil" > "net/url" > ) > > func main() { > url := "https://api.dune.com/api/v1/query/{query_id}/results" > > // Create query parameters > params := url.Values{} > params.Set("limit", "10") > params.Set("filters", "block_time > '2024-03-01'") > params.Set("columns", "tx_from,tx_to,tx_hash,amount_usd") > params.Set("sort_by", "amount_usd desc, block_time") > > // Add parameters to URL > fullURL := fmt.Sprintf("%s?%s", url, params.Encode()) > > req, _ := http.NewRequest("GET", fullURL, nil) > > req.Header.Add("X-DUNE-API-KEY", "") > > res, _ := http.DefaultClient.Do(req) > > defer res.Body.Close() > body, _ := ioutil.ReadAll(res.Body) > > fmt.Println(res) > fmt.Println(string(body)) > } > ``` > [tab] PHP > > ```php theme={null} > > $curl = curl_init(); > > $url = "https://api.dune.com/api/v1/query/{query_id}/results"; > $queryParams = http_build_query([ > 'limit' => 10, > 'filters' => "block_time > '2024-03-01'", > 'columns' => "tx_from,tx_to,tx_hash,amount_usd", > 'sort_by' => "amount_usd desc, block_time", > ]); > $url .= '?' . $queryParams; > > curl_setopt_array($curl, [ > CURLOPT_URL => $url, > CURLOPT_RETURNTRANSFER => true, > CURLOPT_ENCODING => "", > CURLOPT_MAXREDIRS => 10, > CURLOPT_TIMEOUT => 30, > CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, > CURLOPT_CUSTOMREQUEST => "GET", > CURLOPT_HTTPHEADER => [ > "X-DUNE-API-KEY: " > ], > ]); > > $response = curl_exec($curl); > $err = curl_error($curl); > > curl_close($curl); > > if ($err) { > echo "cURL Error #:" . $err; > } else { > echo $response; > } > ?> > ``` > [tab] Java > > ```java theme={null} > > import kong.unirest.HttpResponse; > import kong.unirest.Unirest; > > public class Main { > public static void main(String[] args) { > HttpResponse response = Unirest.get("https://api.dune.com/api/v1/query/{query_id}/results") > .header("X-DUNE-API-KEY", "") > .queryString("limit", 10) > .queryString("filters", "block_time > '2024-03-01'") > .queryString("columns", "tx_from,tx_to,tx_hash,amount_usd") > .queryString("sort_by", "amount_usd desc, block_time") > .asString(); > > System.out.println(response.getBody()); > } > } > ``` ### Filtering Parameters #### `filters` * **Type:** `string` * **Description:** Allows specifying criteria to filter rows in the result set. It functions similarly to a SQL `WHERE` clause. If omitted, all results are returned. > [!NOTE] > > * Use the format ` ` for criteria, for example, `block_time >= '2024-03-05 15:03'`. > * Combine criteria using parentheses and logical operators `AND` / `OR`, e.g., `block_time >= '2024-03-05 15:03' AND (project = 'uniswap' OR project = 'balancer')`. > * The `IN` operator is permitted, as in `tx_to IN (0x6a3e4b7e23661108aaec70266c468e6c679ae022, 0xdbf89389504e39f03fbb6bdd601aabb6bfbbed71)`. > * The `NOT` operator is not supported; using `NOT IN` or `NOT LIKE` will produce an error. > * For column names with special characters (e.g., spaces, emojis, dashes, dots), enclose them in double quotes: `"special, column" = 'ABC'`. > * Values must be strings or numbers. SQL expressions like `now() - interval '1' day` are not allowed. > * Dates and times should be formatted as strings, e.g., `block_time > '2023-01-03'`. #### `columns` * **Type:** `string` * **Description:** Specifies the column names to include in the result set. If omitted, all columns are returned. > [!NOTE] > > * List column names without spaces, e.g., use `project,block_time,amount_usd` instead of `project, block_time, amount_usd`. > * Specifying columns helps limit the results to essential data, reducing the data cost of the call. ## Common Filtering Patterns ### Filter by Time Range ```bash theme={null} # Last 24 hours filters="block_time > '2024-03-05'" # Specific time range filters="block_time >= '2024-03-01' AND block_time < '2024-04-01'" # Recent data (note: relative time expressions are NOT supported in filters) # Instead, calculate the date client-side filters="block_time > '2024-03-10 15:30'" ``` ### Filter by Value Thresholds ```bash theme={null} # Transactions above $1000 filters="amount_usd > 1000" # Volume between ranges filters="volume_usd >= 10000 AND volume_usd <= 100000" # Non-null values filters="amount_usd IS NOT NULL" ``` ### Filter by Category ```bash theme={null} # Single protocol filters="project = 'uniswap'" # Multiple protocols (using OR) filters="project = 'uniswap' OR project = 'sushiswap'" # Using IN operator filters="project IN ('uniswap', 'sushiswap', 'curve')" # Specific blockchain filters="blockchain = 'ethereum'" ``` ### Complex Conditions ```bash theme={null} # Combine multiple conditions filters="blockchain = 'ethereum' AND amount_usd > 1000 AND block_time > '2024-03-01'" # Use parentheses for grouping filters="(project = 'uniswap' OR project = 'sushiswap') AND amount_usd > 10000" # Filter with pattern matching filters="token_symbol LIKE 'WETH%'" # Address filtering filters="tx_to IN ('0x6a3e4b7e23661108aaec70266c468e6c679ae022', '0xdbf89389504e39f03fbb6bdd601aabb6bfbbed71')" ``` ### Filter with Column Selection ```python theme={null} # Python SDK example: Get only specific columns for large trades results = dune.get_latest_result_dataframe( query=3493826, filters="amount_usd > 10000 AND blockchain = 'ethereum'", columns="tx_hash,tx_from,tx_to,amount_usd,block_time" ) ``` > [!TIP] > > **Performance tip:** Combine filtering with column selection to minimize data transfer. For example, instead of fetching all 50 columns for millions of rows, fetch only the 5 columns you need for 1000 filtered rows. ## Real-World Examples ### Example 1: Whale Transactions ```python theme={null} from dune_client import DuneClient dune = DuneClient(api_key="YOUR_API_KEY") # Get large USDC transfers in the last day results = dune.get_latest_result_dataframe( query=3493826, filters="token_symbol = 'USDC' AND amount_usd > 1000000 AND block_time > '2024-03-10'", columns="tx_hash,tx_from,tx_to,amount_usd,block_time", sort_by="amount_usd desc" ) print(f"Found {len(results)} whale transactions") ``` ### Example 2: Protocol-Specific Analytics ```typescript theme={null} import { DuneClient } from '@duneanalytics/client'; const dune = new DuneClient('YOUR_API_KEY'); // Get Uniswap V3 trades on Arbitrum const results = await dune.getLatestResults({ queryId: 3493826, filters: "project = 'uniswap' AND version = '3' AND blockchain = 'arbitrum'", columns: "trader,token_bought_symbol,token_sold_symbol,amount_usd", limit: 100 }); ``` ### Example 3: Token-Specific Monitoring ```bash theme={null} # Monitor recent trades for a specific token pair curl -X GET \ 'https://api.dune.com/api/v1/query/3493826/results?filters=token_bought_symbol%20%3D%20%27WETH%27%20AND%20token_sold_symbol%20%3D%20%27USDC%27%20AND%20block_time%20%3E%20%272024-03-10%27&columns=amount_usd%2Cprice%2Cblock_time&sort_by=block_time%20desc' \ -H 'X-DUNE-API-KEY: YOUR_API_KEY' ``` ### Example 4: Multi-Chain Analysis ```python theme={null} # Compare volumes across chains for the same protocol blockchains = ['ethereum', 'polygon', 'arbitrum', 'optimism'] for chain in blockchains: results = dune.get_latest_result_dataframe( query=3493826, filters=f"blockchain = '{chain}' AND project = 'uniswap'", columns="blockchain,amount_usd" ) total_volume = results['amount_usd'].sum() print(f"{chain}: ${total_volume:,.2f}") ``` ## Filtering Best Practices > [accordion] Always filter time ranges > > Reduce the amount of data scanned by filtering by `block_time`: > > ```bash theme={null} > # ✅ Good - filters recent data > filters="block_time > '2024-03-01' AND amount_usd > 1000" > > # ❌ Less efficient - scans all historical data > filters="amount_usd > 1000" > ``` > [accordion] Combine filters with column selection > > Minimize bandwidth by only requesting needed columns: > > ```bash theme={null} > # ✅ Optimal - filtered rows, selected columns > filters="amount_usd > 10000"&columns="tx_hash,amount_usd,block_time" > > # ❌ Wasteful - fetches all columns > filters="amount_usd > 10000" > ``` > [accordion] Use IN for multiple values > > More efficient than multiple OR conditions: > > ```bash theme={null} > # ✅ Better > filters="blockchain IN ('ethereum', 'polygon', 'arbitrum')" > > # ✅ Also valid but longer > filters="blockchain = 'ethereum' OR blockchain = 'polygon' OR blockchain = 'arbitrum'" > ``` > [accordion] Be specific with data types > > Use proper quoting for strings, no quotes for numbers: > > ```bash theme={null} > # ✅ Correct > filters="blockchain = 'ethereum' AND amount_usd > 1000" > > # ❌ Wrong - amount_usd should not be quoted > filters="blockchain = 'ethereum' AND amount_usd > '1000'" > ``` > [accordion] Handle special column names > > Use double quotes for columns with special characters: > > ```bash theme={null} > # ✅ Correct for special characters > filters="\"token.symbol\" = 'USDC'" > > # ✅ No quotes needed for normal names > filters="token_symbol = 'USDC'" > ``` ## Limitations > [!WARNING] > > * **No SQL expressions:** Filters must use literal values. Expressions like `now() - interval '1' day` are not supported. Calculate values client-side instead. > * **No NOT operator:** `NOT IN` and `NOT LIKE` are not supported. Use positive conditions instead. > * **No subqueries:** Filters cannot contain subqueries. Use parameterized queries for complex logic. > * **String and number values only:** Filters only support string and numeric literals. ## Filtered Response > [accordion] Example filtered response > > ```json theme={null} > { > "execution_id": "01HR8AGD6CWGHGP1BN3Z1SJ4MD", > "query_id": 3493826, > "is_execution_finished": true, > "state": "QUERY_STATE_COMPLETED", > "submitted_at": "2024-03-05T22:07:22.828653Z", > "expires_at": "2024-06-03T22:07:53.36647Z", > "execution_started_at": "2024-03-05T22:07:24.013663281Z", > "execution_ended_at": "2024-03-05T22:07:53.366469062Z", > "result": { > "rows": [ > { > "amount_usd": null, > "block_time": "2024-03-05 20:50:59.000 UTC", > "tx_from": "0x38032f326436fdb9c7a9b359e90010f86b8ab482", > "tx_hash": "0xce6f59cf2f0b395d8fc33e49d1f5db5686be95555135fd8126bc7c59327cd9be", > "tx_to": "0x061b87122ed14b9526a813209c8a59a633257bab" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:49:33.000 UTC", > "tx_from": "0xb46b909be665d75f833be22c6e6285ba5ad74dfa", > "tx_hash": "0x1f1725ebe374b1ffb50047055b793b2be6a8cb07ab75fd685b95e842953da4ca", > "tx_to": "0x1111111254eeb25477b68fb85ed929f73a960582" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:48:53.000 UTC", > "tx_from": "0x40014275b332f38423fa0de39939d26c7294ffc0", > "tx_hash": "0xb4364656c20007fb1d7bfa93d87fc6fe345a91b10661835d1a54d1ac7761a244", > "tx_to": "0x1111111254eeb25477b68fb85ed929f73a960582" > }, > { > "amount_usd": 1397.903560808159, > "block_time": "2024-03-05 20:48:03.000 UTC", > "tx_from": "0xb46b909be665d75f833be22c6e6285ba5ad74dfa", > "tx_hash": "0x818f701a6c7dcf78a090cfd8324da5896005c2a6d8e3ec5ac2c29cfa5e67f5d9", > "tx_to": "0x1111111254eeb25477b68fb85ed929f73a960582" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:47:55.000 UTC", > "tx_from": "0x50758bdc1735e94401ed73eb7e8bde482766819c", > "tx_hash": "0x1dc342dc397ffa7b433fa64280fe9f4a7e0b51409e9abc9fde61bc9b85c938be", > "tx_to": "0x4c4af8dbc524681930a27b2f1af5bcc8062e6fb7" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:47:55.000 UTC", > "tx_from": "0x50758bdc1735e94401ed73eb7e8bde482766819c", > "tx_hash": "0x1dc342dc397ffa7b433fa64280fe9f4a7e0b51409e9abc9fde61bc9b85c938be", > "tx_to": "0x4c4af8dbc524681930a27b2f1af5bcc8062e6fb7" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:47:53.000 UTC", > "tx_from": "0xfa3dc8db10e7c2f7dfa87e86bba6257066731bc1", > "tx_hash": "0x0d34634a9438ce241e2870b23e70a008c8db839ba38daadc1074c9b1a52be7c7", > "tx_to": "0xba12222222228d8ba445958a75a0704d566bf2c8" > }, > { > "amount_usd": 2.753641952846242, > "block_time": "2024-03-05 20:47:53.000 UTC", > "tx_from": "0xfa3dc8db10e7c2f7dfa87e86bba6257066731bc1", > "tx_hash": "0x0d34634a9438ce241e2870b23e70a008c8db839ba38daadc1074c9b1a52be7c7", > "tx_to": "0xba12222222228d8ba445958a75a0704d566bf2c8" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:47:53.000 UTC", > "tx_from": "0xfa3dc8db10e7c2f7dfa87e86bba6257066731bc1", > "tx_hash": "0x0d34634a9438ce241e2870b23e70a008c8db839ba38daadc1074c9b1a52be7c7", > "tx_to": "0xba12222222228d8ba445958a75a0704d566bf2c8" > }, > { > "amount_usd": 1798.8186143812122, > "block_time": "2024-03-05 20:47:49.000 UTC", > "tx_from": "0xb46b909be665d75f833be22c6e6285ba5ad74dfa", > "tx_hash": "0xcf8d9873f017a8ba9e624c3bb61bede8e11c194965690026cd394f20c55f896a", > "tx_to": "0x1111111254eeb25477b68fb85ed929f73a960582" > } > ], > "metadata": { > "column_names": [ > "block_time", > "tx_from", > "tx_to", > "tx_hash", > "amount_usd" > ], > "row_count": 10, > "result_set_bytes": 2042, > "total_row_count": 100, > "total_result_set_bytes": 56496, > "datapoint_count": 50, > "pending_time_millis": 1185, > "execution_time_millis": 29352 > } > }, > "next_uri": "https://api.dune.com/api/v1/execution/01HR8AGD6CWGHGP1BN3Z1SJ4MD/results?columns=block_time%2Ctx_from%2Ctx_to%2Ctx_hash%2Camount_usd&filters=block_time+%3E+%272024-03-01%27&limit=10&offset=10", > "next_offset": 10 > } > ``` # Pagination Source: https://docs.dune.com/api-reference/executions/pagination Our API supports pagination on all `/results` endpoints to facilitate efficient data retrieval by dividing large datasets into smaller, manageable chunks. This feature helps prevent overload, ensures smoother performance, and enhances the user experience by making it easier to navigate through data, thus avoiding limit errors. Pagination is available for the following endpoints: * [Get Execution Results](./endpoint/get-execution-result) * [Get Execution Results CSV](./endpoint/get-execution-result-csv) * [Get Query Results](./endpoint/get-query-result) * [Get Query Results CSV](./endpoint/get-query-result-csv) Pagination can be effectively combined with [filtering](./filtering) and [sorting](./sorting) to optimize data fetching. #### Example Paginating Request > [tab] Python SDK > > ```python theme={null} > # When using higher level functions like `get_latest_result_dataframe`, > # pagination via `limit` param is done automatically behind the scenes > # to get all rows in the result set. > # > # To actually paginate manually, i.e., > # limit the number of rows each call returns, > # use a lower level function like `get_execution_results_csv`. > > from dune_client.client import DuneClient > > # setup Dune Python client > dune = DuneClient() > > # Higher level function, let pagination be handled automatically and get full query result > query = QueryBase( > query_id=3567562 # https://dune.com/queries/3568055 -> DEX Pair Stats > ) > > query_result = dune.get_latest_result_dataframe( > query=query > , filters="overtip_amount > 0" > , sort_by=["overall_tip_given_amount desc"] > ) > > print(query_result) > > # Lower level function, paginate manually to actually get a subset of results one chunk at a time > query_result2 = dune.get_execution_results( > job_id = '01HTJ5J9R1D366ZQ08S5B40P0W' > , limit = 100 > , filters="overtip_amount > 0" > , sort_by=["overall_tip_given_amount desc"] > ) > > print("next_uri = " + query_result2.next_uri + "\n") > print("next_offset = " + str(query_result2.next_offset) + "\n") > print(query_result2.result.rows) > > ``` > [tab] cURL > > ```bash theme={null} > curl -X GET 'https://api.dune.com/api/v1/query/{{query_id}}/results?limit=1000' -H 'x-dune-api-key: {{api_key}}' > ``` > [tab] Python > > ```python theme={null} > import requests > > url = "https://api.dune.com/api/v1/query/{query_id}/results" > > headers = {"X-DUNE-API-KEY": ""} > > params = {"limit": 1000, "offset": 0} # Define limit and offset parameters > > response = requests.request("GET", url, headers=headers, params=params) > > print(response.text) > > ``` > [tab] Javascript > > ```javascript theme={null} > > const options = { > method: 'GET', > headers: { > 'X-DUNE-API-KEY': '' > } > }; > > const queryParams = new URLSearchParams({limit: 1000, offset: 0}); // Define limit and offset parameters > const url = `https://api.dune.com/api/v1/query/{query_id}/results?${queryParams}`; > > fetch(url, options) > .then(response => response.json()) > .then(response => console.log(response)) > .catch(err => console.error(err)); > > > ``` > [tab] Go > > ```go theme={null} > > package main > > import ( > "fmt" > "net/http" > "io/ioutil" > "net/url" > ) > > func main() { > url := "https://api.dune.com/api/v1/query/{query_id}/results" > > // Create query parameters > params := url.Values{} > params.Set("limit", "1000") > > // Add parameters to URL > fullURL := fmt.Sprintf("%s?%s", url, params.Encode()) > > req, _ := http.NewRequest("GET", fullURL, nil) > > req.Header.Add("X-DUNE-API-KEY", "") > > res, _ := http.DefaultClient.Do(req) > > defer res.Body.Close() > body, _ := ioutil.ReadAll(res.Body) > > fmt.Println(res) > fmt.Println(string(body)) > } > ``` > [tab] PHP > > ```php theme={null} > > $curl = curl_init(); > > $url = "https://api.dune.com/api/v1/query/{query_id}/results"; > $queryParams = http_build_query([ > 'limit' => 1000, > 'offset' => 0 > ]); > $url .= '?' . $queryParams; > > curl_setopt_array($curl, [ > CURLOPT_URL => $url, > CURLOPT_RETURNTRANSFER => true, > CURLOPT_ENCODING => "", > CURLOPT_MAXREDIRS => 10, > CURLOPT_TIMEOUT => 30, > CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, > CURLOPT_CUSTOMREQUEST => "GET", > CURLOPT_HTTPHEADER => [ > "X-DUNE-API-KEY: " > ], > ]); > > $response = curl_exec($curl); > $err = curl_error($curl); > > curl_close($curl); > > if ($err) { > echo "cURL Error #:" . $err; > } else { > echo $response; > } > ?> > ``` > [tab] Java > > ```java theme={null} > > import kong.unirest.HttpResponse; > import kong.unirest.Unirest; > > public class Main { > public static void main(String[] args) { > HttpResponse response = Unirest.get("https://api.dune.com/api/v1/query/{query_id}/results") > .header("X-DUNE-API-KEY", "") > .queryString("limit", 1000) > .queryString("offset", 0) > .asString(); > > System.out.println(response.getBody()); > } > } > ``` To paginate through results: 1. Use the `limit` parameter to set the maximum number of results per request. 2. The `offset` parameter defines the starting point for the data retrieval, with a default value of 0 (the first row). 3. For JSON responses, the `next_offset` and `next_uri` fields in the response body indicate how to fetch the next page. For CSV responses, look for the `X-Dune-Next-Offset` and `X-Dune-Next-Uri` headers. The server may adjust the provided limit if deemed too large, ensuring efficient data handling. Follow these indicators to navigate through the dataset seamlessly. ### Pagination Parameters #### `limit` (required) * **Type:** `integer` * **Description:** Specifies the maximum number of rows to return in a single request, controlling the page size for pagination. #### `offset` * **Type:** `integer` * **Description:** Determines the starting point for data retrieval, allowing for sequential access through the dataset. * **Default:** 0 (the first row) * **Usage:** Use in conjunction with `limit` to navigate through results in an efficient, incremental manner. ### Pagination in Response The following fields in the response body are related to pagination and can be utilized when doing paginated get results request. If they are available, you can use them to paginate the next page. If they are not available, that means there are no more results to be fetched. > [tab] JSON response endpoints > > **`next_offset`** > > * Type: Integer > * Description: Provides the offset to use for retrieving the next page of results, if available. > > **`next_uri`** > > * Type: String (URL) > * Description: Specifies the complete URI to retrieve the next page of results, if available. > [tab] CSV response endpoints > > **`x-dune-next-offset`** > > * Type: Integer > * Description: Provides the offset to use for retrieving the next page of results, if available. > > **`x-dune-next-uri`** > > * Type: String (URL) > * Description: Specifies the complete URI to retrieve the next page of results, if available. > [!NOTE] > > If you pass in an invalid `offset` parameter value, you will get an empty result set. For example, if there are only 25 rows of result data, and you pass in `offset=30`, you will **not** receive an error, but rather an empty result with metadata like this. Note the response field `result.total_row_count`, indicating this result has only 25 rows. > > > [accordion] Example empty response > > > > ```json theme={null} > > { > > "execution_id": "01HPF1299EV69Z08DBKW1B6MJR", > > "query_id": 2616430, > > "is_execution_finished": true, > > "state": "QUERY_STATE_COMPLETED", > > "submitted_at": "2024-02-12T16:05:40.270193Z", > > "expires_at": "2024-05-12T16:05:40.654018Z", > > "execution_started_at": "2024-02-12T16:05:40.312207906Z", > > "execution_ended_at": "2024-02-12T16:05:40.654017085Z", > > "result": { > > "rows": [], > > "metadata": { > > "column_names": [ > > "foo" > > ], > > "row_count": 0, > > "result_set_bytes": 0, > > "total_row_count": 25, > > "total_result_set_bytes": 28, > > "datapoint_count": 0, > > "pending_time_millis": 42, > > "execution_time_millis": 341 > > } > > } > > } > > ``` > [accordion] Example paginated response > > ```json theme={null} > { > "execution_id": "01HPFJ7VSFXPTA8WPMDKBXE167", > "query_id": 3426636, > "is_execution_finished": true, > "state": "QUERY_STATE_COMPLETED", > "submitted_at": "2024-02-12T21:05:48.848069Z", > "expires_at": "2024-05-12T21:05:50.199443Z", > "execution_started_at": "2024-02-12T21:05:48.863094766Z", > "execution_ended_at": "2024-02-12T21:05:50.199442351Z", > "result": { > "rows": [ > { > "amount_usd": null, > "block_date": "2021-06-07 00:00:00.000 UTC", > "block_month": "2021-06-01T00:00:00Z", > "block_time": "2021-06-07 13:21:10.000 UTC", > "blockchain": "bnb", > "evt_index": 432, > "maker": null, > "project": "pancakeswap", > "project_contract_address": "0xa41e57459f09a126f358e118b693789d088ea8a0", > "taker": "0x88bf5a2e82510847e5dcbf33f44a9f611f1c1df5", > "token_bought_address": "0x85e76cbf4893c1fbcb34dcf1239a91ce2a4cf5a7", > "token_bought_amount": 2985.646787349244, > "token_bought_amount_raw": "2985646787349243786078", > "token_bought_symbol": "USDG", > "token_pair": "GMT-USDG", > "token_sold_address": "0x99e92123eb77bc8f999316f622e5222498438784", > "token_sold_amount": 192.8996462242313, > "token_sold_amount_raw": "192899646224231304314", > "token_sold_symbol": "GMT", > "tx_from": "0x88bf5a2e82510847e5dcbf33f44a9f611f1c1df5", > "tx_hash": "0xcee1e51083f28655fd9cc434238e2a243aa8f9bad20e717d145f246b5e73e231", > "tx_to": "0x10ed43c718714eb63d5aa57b78b54704e256024e" > }, > { > "amount_usd": 0.0038254393551350966, > "block_date": "2021-06-27 00:00:00.000 UTC", > "block_month": "2021-06-01T00:00:00Z", > "block_time": "2021-06-27 19:21:48.000 UTC", > "blockchain": "bnb", > "evt_index": 38, > "maker": null, > "project": "pancakeswap", > "project_contract_address": "0x73c6542f8a529bf7bf0ac27a1d232a8525748738", > "taker": "0x10ed43c718714eb63d5aa57b78b54704e256024e", > "token_bought_address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", > "token_bought_amount": 0.00001404037053195, > "token_bought_amount_raw": "14040370531950", > "token_bought_symbol": "WBNB", > "token_pair": null, > "token_sold_address": "0x3da1fd918a4c56b1cf6280ba37018c211db0d943", > "token_sold_amount": null, > "token_sold_amount_raw": "23274980840704048977780", > "token_sold_symbol": null, > "tx_from": "0xc0ffee00d263df1ecb44ece29f63a1e7479b7420", > "tx_hash": "0xa37ab410b4802e4d4aab950d1c3ce186abf4dbc98f7d7dbc54af17cf23519444", > "tx_to": "0x17f07d78e432b91ccfbed98f0617a83a4bfcc446" > }, > { > "amount_usd": 229.4023072060263, > "block_date": "2021-06-29 00:00:00.000 UTC", > "block_month": "2021-06-01T00:00:00Z", > "block_time": "2021-06-29 23:23:56.000 UTC", > "blockchain": "bnb", > "evt_index": 51, > "maker": null, > "project": "pancakeswap", > "project_contract_address": "0x58f876857a02d6762e0101bb5c46a8c1ed44dc16", > "taker": "0xd7d116d7535aa724f8be9c482d2c768bc425a23c", > "token_bought_address": "0xe9e7cea3dedca5984780bafc599bd69add087d56", > "token_bought_amount": 229.23954712756574, > "token_bought_amount_raw": "229239547127565734569", > "token_bought_symbol": "BUSD", > "token_pair": "BUSD-WBNB", > "token_sold_address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", > "token_sold_amount": 0.761872346852129, > "token_sold_amount_raw": "761872346852129018", > "token_sold_symbol": "WBNB", > "tx_from": "0xd7d116d7535aa724f8be9c482d2c768bc425a23c", > "tx_hash": "0x21429506dd0323b9ec40f4cf9314e58579aa25620bf95130f3a275a356ecd64c", > "tx_to": "0x10ed43c718714eb63d5aa57b78b54704e256024e" > }, > { > "amount_usd": 2.668233112736453, > "block_date": "2021-06-04 00:00:00.000 UTC", > "block_month": "2021-06-01T00:00:00Z", > "block_time": "2021-06-04 00:11:44.000 UTC", > "blockchain": "bnb", > "evt_index": 384, > "maker": null, > "project": "pancakeswap", > "project_contract_address": "0x16b9a82891338f9ba80e2d6970fdda79d1eb0dae", > "taker": "0x452c012e55f7a27d3c25caf15fddfc5d63004cd5", > "token_bought_address": "0x55d398326f99059ff775485246999027b3197955", > "token_bought_amount": 2.662657507914879, > "token_bought_amount_raw": "2662657507914878729", > "token_bought_symbol": "USDT", > "token_pair": "USDT-WBNB", > "token_sold_address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", > "token_sold_amount": 0.00632140891710662, > "token_sold_amount_raw": "6321408917106620", > "token_sold_symbol": "WBNB", > "tx_from": "0x452c012e55f7a27d3c25caf15fddfc5d63004cd5", > "tx_hash": "0x540ae87272f0fcce54595e7c2b67b9ef32cf2d0b5ccfa23c73a21727ae3350ba", > "tx_to": "0x10ed43c718714eb63d5aa57b78b54704e256024e" > }, > { > "amount_usd": 46.95293131078031, > "block_date": "2021-06-25 00:00:00.000 UTC", > "block_month": "2021-06-01T00:00:00Z", > "block_time": "2021-06-25 18:24:20.000 UTC", > "blockchain": "bnb", > "evt_index": 105, > "maker": null, > "project": "pancakeswap", > "project_contract_address": "0x446f87f15d9a9f15b39d1b24d1d6d7e606e9d32d", > "taker": "0x10ed43c718714eb63d5aa57b78b54704e256024e", > "token_bought_address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", > "token_bought_amount": 0.16652337675833562, > "token_bought_amount_raw": "166523376758335622", > "token_bought_symbol": "WBNB", > "token_pair": null, > "token_sold_address": "0x384f5a9b720349015a27251684c7a1510dd151ba", > "token_sold_amount": null, > "token_sold_amount_raw": "299011495590365081887", > "token_sold_symbol": null, > "tx_from": "0x60e028a06d04ecfd041ba415c3b8a63258a6506e", > "tx_hash": "0xf5e24e5024ff047210127c87cd12b475354ff84afc4bebc159066f9522daac73", > "tx_to": "0x10ed43c718714eb63d5aa57b78b54704e256024e" > } > ], > "metadata": { > "column_names": [ > "amount_usd", > "block_date", > "token_bought_symbol", > "token_pair", > "block_time", > "blockchain", > "evt_index", > "block_month", > "maker", > "project", > "project_contract_address", > "taker", > "token_bought_address", > "token_bought_amount", > "token_bought_amount_raw", > "token_sold_address", > "token_sold_amount", > "token_sold_amount_raw", > "token_sold_symbol", > "tx_from", > "tx_hash", > "tx_to" > ], > "row_count": 5, > "result_set_bytes": 0, > "total_row_count": 10, > "total_result_set_bytes": 5639, > "datapoint_count": 110, > "pending_time_millis": 15, > "execution_time_millis": 1336 > } > }, > "next_uri": "https://api.dune.com/api/v1/execution/01HPFJ7VSFXPTA8WPMDKBXE167/results?limit=1000&offset=5", > "next_offset": 5 > } > ``` > [!TIP] > > **Data Returned Limit** > > When using pagination, our intention is to use sizes that work well on mobile, with lower data and ram consumption. For this, and to avoid more work on the developer, when the client specifies a very large limit value (for example 500000 rows), instead of returning an error, the server will override this limit to a lower, safer value (for example 30000 rows) and *will always provide* the correct next `offset` and `limit` value to use on the next paginated requests. The exact maximum limit value is subject to change. > > **Data Size Limit** > > Dune internally has a maximum query result size limit (which currently is 32GB). If your query yields more than 32GB of data, the result will be truncated in storage. In such cases, pulling the result data (using pagination) but without specifying `allow_partial_results` set to true will trigger an error message: "error": "Partial Result, please request with 'allows_partial_results=true'". If you wish to retrieve partial results, you can pass the parameter `allow_partial_results=true`. But please make sure you indeed want to fetch the truncated result. > > So what? Related to pagination, this means that > > * For query results under 32GB, use the API as normal. > * When your query results exceed 32GB, in addition to `limit` and `offset` parameters in order to read the partial result (the first 32GB of data), set `allow_partial_results=true` > * You can use the [Get Status API](./endpoint/get-execution-status) to check the size of your result, `result.result_set_size` # Sampling Source: https://docs.dune.com/api-reference/executions/sampling Our API supports sampling on all `/results` endpoints to provide a uniform sample of the dataset for efficient data analysis and visualization. This feature is particularly useful for use cases like charting (if you only have 4 000 pixels on the chart, then 10 000 datapoints are plenty), where analyzing a full dataset isn't necessary. Sampling returns a subset (with a uniform distribution) of data, optimizing usage of very large results with reduced latency and costs. You can apply sampling to the following endpoints: * [Get Execution Results](./endpoint/get-execution-result) * [Get Execution Results CSV](./endpoint/get-execution-result-csv) * [Get Query Results](./endpoint/get-query-result) * [Get Query Results CSV](./endpoint/get-query-result-csv) #### Example Sampling Request > [tab] Python SDK > > ```python theme={null} > from dune_client.client import DuneClient > > # setup Dune Python client > dune = DuneClient() > > query_result = dune.get_latest_result_dataframe( > query=3582296 # https://dune.com/queries/3582296 -> OHLC Price > , sample_count = 5000 > ) > > print(query_result) > > ``` > [tab] cURL > > ```bash theme={null} > curl -X GET "https://api.dune.com/api/v1/query/{{query_id}}/results?sample_count=10000" -H "x-dune-api-key: {{api_key}}" > ``` > [tab] Python > > ```python theme={null} > import requests > > url = "https://api.dune.com/api/v1/query/{query_id}/results" > > headers = {"X-DUNE-API-KEY": ""} > > params = {"sample_count": 10_000} > > response = requests.request("GET", url, headers=headers, params=params) > > print(response.text) > > ``` > [tab] Javascript > > ```javascript theme={null} > > const options = { > method: 'GET', > headers: { > 'X-DUNE-API-KEY': '' > } > }; > > const queryParams = new URLSearchParams({ > sample_count: 10000 > }); > const url = `https://api.dune.com/api/v1/query/{query_id}/results?${queryParams}`; > > fetch(url, options) > .then(response => response.json()) > .then(response => console.log(response)) > .catch(err => console.error(err)); > > > ``` ### Sampling Parameters #### `sample_count` * **Type:** `integer` * **Description:** Determines the number of rows to return as a sample from the result set. If the available dataset contains fewer rows than the specified `sample_count`, the entire dataset is returned. > [!NOTE] > > * Sampling is designed to provide a randomized subset of data, with each request potentially producing different outcomes. > * When specifying `sample_count` (e.g., `sample_count = 10000`), the number is approximate. The actual number of rows returned may vary slightly (e.g., 10013, 10017), reflecting the probabilistic nature of the sampling process. > * `sample_count` is incompatible with `offset`, `limit`, and `filters` parameters. > * `sample_count` can be used with `columns` to specify which data fields to include in the sample. > * Specifying a low `sample_count` relative to total rows, being probabilistic, may return 0 rows due to the probability based sampling calculation (e.g., 10 in 100,000, means each row has \~0.01% chance to be included) ### Sampling Response > [accordion] Example sampling response > > *Showing trimmed response for `sample_count=200` instead of specified `sample_count=10000` in example request to not overwhelm the doc.* > > ```json theme={null} > { > "execution_id": "01HR8D39V7N8WM653SVDW2G9WB", > "query_id": 3494402, > "is_execution_finished": true, > "state": "QUERY_STATE_COMPLETED", > "submitted_at": "2024-03-05T22:52:39.144099Z", > "expires_at": "2024-06-03T22:54:03.004092Z", > "execution_started_at": "2024-03-05T22:52:39.348798256Z", > "execution_ended_at": "2024-03-05T22:54:03.00409093Z", > "result": { > "rows": [ > { > "amount_usd": 28.517144710689454, > "block_time": "2024-03-02 12:51:19.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 4892.433, > "block_time": "2024-03-05 13:42:59.000 UTC", > "blockchain": "ethereum" > }, > { > "amount_usd": 31.579160400723985, > "block_time": "2024-03-04 20:17:56.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 84.162, > "block_time": "2024-03-05 07:26:54.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 1.5276341414539407, > "block_time": "2024-03-03 12:32:44.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 876.1714568508686, > "block_time": "2024-03-05 02:14:47.000 UTC", > "blockchain": "fantom" > }, > { > "amount_usd": 4529.057, > "block_time": "2024-03-04 00:18:11.000 UTC", > "blockchain": "ethereum" > }, > { > "amount_usd": 201.94357555355361, > "block_time": "2024-02-25 22:33:23.000 UTC", > "blockchain": "ethereum" > }, > { > "amount_usd": 145.27394384575086, > "block_time": "2024-03-04 10:54:32.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 1070.7173780527592, > "block_time": "2024-03-04 13:57:21.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 223.82524240905198, > "block_time": "2024-03-02 08:31:15.000 UTC", > "blockchain": "polygon" > }, > { > "amount_usd": 1950.3639893741088, > "block_time": "2024-03-03 05:09:47.000 UTC", > "blockchain": "ethereum" > }, > { > "amount_usd": 719.5529722030446, > "block_time": "2024-03-05 09:27:23.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 6.89141479932381, > "block_time": "2024-03-01 03:35:39.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 368.6550396139464, > "block_time": "2024-03-04 11:05:35.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 105.21798800684901, > "block_time": "2024-03-05 16:04:47.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 31.17956089030626, > "block_time": "2024-03-05 18:17:05.000 UTC", > "blockchain": "polygon" > }, > { > "amount_usd": 43.21002361278373, > "block_time": "2024-03-03 14:40:21.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 1448.8800596106462, > "block_time": "2024-03-02 12:47:21.000 UTC", > "blockchain": "base" > }, > { > "amount_usd": 0.01001462, > "block_time": "2024-03-03 02:18:02.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 43.94295029931569, > "block_time": "2024-03-02 13:25:28.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 608.562, > "block_time": "2024-02-25 13:13:11.000 UTC", > "blockchain": "ethereum" > }, > { > "amount_usd": 85.02994808708173, > "block_time": "2024-02-25 15:36:48.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 2849.089609803931, > "block_time": "2024-02-25 21:21:23.000 UTC", > "blockchain": "ethereum" > }, > { > "amount_usd": 742.1382966435165, > "block_time": "2024-02-26 09:23:10.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 1523.857600998093, > "block_time": "2024-02-26 21:29:40.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 1.000853, > "block_time": "2024-02-25 22:25:16.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 187.32483603639648, > "block_time": "2024-02-26 05:38:59.000 UTC", > "blockchain": "ethereum" > }, > { > "amount_usd": 9.365232080867631, > "block_time": "2024-03-04 21:59:33.000 UTC", > "blockchain": "polygon" > }, > { > "amount_usd": 7.85318483149416, > "block_time": "2024-02-28 02:39:53.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 62.43033115744735, > "block_time": "2024-02-27 06:40:47.000 UTC", > "blockchain": "base" > }, > { > "amount_usd": 245.49353625178662, > "block_time": "2024-02-27 08:02:35.000 UTC", > "blockchain": "bnb" > }, > { > "amount_usd": 2.1101359357968, > "block_time": "2024-02-28 17:24:20.000 UTC", > "blockchain": "polygon" > }, > { > "amount_usd": 887.988462523146, > "block_time": "2024-02-29 08:56:34.000 UTC", > "blockchain": "polygon" > }, > { > "amount_usd": null, > "block_time": "2024-02-27 16:20:57.000 UTC", > "blockchain": "optimism" > }, > { > "amount_usd": 0.9971501669140281, > "block_time": "2024-03-05 20:28:38.000 UTC", > "blockchain": "polygon" > }, > { > "amount_usd": 16.03705776420069, > "block_time": "2024-03-03 23:27:03.000 UTC", > "blockchain": "base" > }, > { > "amount_usd": 5.38636576521727, > "block_time": "2024-03-01 23:00:13.000 UTC", > "blockchain": "base" > }, > { > "amount_usd": 30.130297357061917, > "block_time": "2024-02-27 02:20:07.000 UTC", > "blockchain": "bnb" > } > ], > "metadata": { > "column_names": [ > "blockchain", > "block_time", > "amount_usd" > ], > "row_count": 213, > "result_set_bytes": 12119, > "total_row_count": 22325371, > "total_result_set_bytes": 1175314615, > "datapoint_count": 639, > "pending_time_millis": 204, > "execution_time_millis": 83655 > } > } > } > ``` # Sorting Source: https://docs.dune.com/api-reference/executions/sorting Our API allows for sorting on all `/results` endpoints to organize query results in a specified order. This sorting functionality enables users to retrieve data in a manner that best suits their needs, whether ascending or descending. The feature is designed to work in a similar fashion to a SQL `ORDER BY` clause and is available for the following endpoints: * [Get Execution Results](./endpoint/get-execution-result) * [Get Execution Results CSV](./endpoint/get-execution-result-csv) * [Get Query Results](./endpoint/get-query-result) * [Get Query Results CSV](./endpoint/get-query-result-csv) Sorting can be effectively combined with [pagination](./pagination), [filtering](./filtering) and [sampling](./sampling) to optimize data retrieval. #### Example Sorting Request > [tab] Python SDK > > ```python theme={null} > from dune_client.client import DuneClient > > # setup Dune Python client > dune = DuneClient() > > query_result = dune.get_latest_result_dataframe( > query=3567562 # https://dune.com/queries/3567562 > , filters="overtip_amount > 0" > , columns=["donor_fname","overtip_amount","days_overtipped","overall_tip_given_amount","overall_avg_tip_amount"] > , sort_by=["overall_tip_given_amount desc"] > ) > > print(query_result) > > ``` > [tab] cURL > > ```bash theme={null} > curl -X GET 'https://api.dune.com/api/v1/query/{{query_id}}/results?limit=100&filters=chain%20in%20(%27base%27%2C%20%27optimism%27)%20and%20token_pair%20like%20%27%USDC%%27&sort_by=thirty_day_volume%20desc' \ > -H 'x-dune-api-key:{{api_key}}’ > ``` > [tab] Python > > ```python theme={null} > import requests > > url = "https://api.dune.com/api/v1/query/{query_id}/results" > > headers = {"X-DUNE-API-KEY": ""} > > params = { > "limit": 10, > "filters": "block_time > '2024-03-01'", > "columns": "tx_from,tx_to,tx_hash,amount_usd", > "sort_by": "amount_usd desc, block_time" > } > > response = requests.request("GET", url, headers=headers, params=params) > > print(response.text) > > ``` > [tab] Javascript > > ```javascript theme={null} > > const options = { > method: 'GET', > headers: { > 'X-DUNE-API-KEY': '' > } > }; > > const queryParams = new URLSearchParams({ > limit: 10, > filters: "block_time > '2024-03-01'", > columns: "tx_from,tx_to,tx_hash,amount_usd", > sort_by: "amount_usd desc, block_time" > }); > const url = `https://api.dune.com/api/v1/query/{query_id}/results?${queryParams}`; > > fetch(url, options) > .then(response => response.json()) > .then(response => console.log(response)) > .catch(err => console.error(err)); > > > ``` > [tab] Go > > ```go theme={null} > > package main > > import ( > "fmt" > "net/http" > "io/ioutil" > "net/url" > ) > > func main() { > url := "https://api.dune.com/api/v1/query/{query_id}/results" > > // Create query parameters > params := url.Values{} > params.Set("limit", 10) > params.Set("filters", "block_time > '2024-03-01'") > params.Set("columns", "tx_from,tx_to,tx_hash,amount_usd") > params.Set("sort_by", "amount_usd desc, block_time") > > // Add parameters to URL > fullURL := fmt.Sprintf("%s?%s", url, params.Encode()) > > req, _ := http.NewRequest("GET", fullURL, nil) > > req.Header.Add("X-DUNE-API-KEY", "") > > res, _ := http.DefaultClient.Do(req) > > defer res.Body.Close() > body, _ := ioutil.ReadAll(res.Body) > > fmt.Println(res) > fmt.Println(string(body)) > } > ``` > [tab] PHP > > ```php theme={null} > > $curl = curl_init(); > > $url = "https://api.dune.com/api/v1/query/{query_id}/results"; > $queryParams = http_build_query([ > 'limit' => 10, > 'filters' => "block_time > '2024-03-01'", > 'columns' => "tx_from,tx_to,tx_hash,amount_usd", > 'sort_by' => "amount_usd desc, block_time", > ]); > $url .= '?' . $queryParams; > > curl_setopt_array($curl, [ > CURLOPT_URL => $url, > CURLOPT_RETURNTRANSFER => true, > CURLOPT_ENCODING => "", > CURLOPT_MAXREDIRS => 10, > CURLOPT_TIMEOUT => 30, > CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, > CURLOPT_CUSTOMREQUEST => "GET", > CURLOPT_HTTPHEADER => [ > "X-DUNE-API-KEY: " > ], > ]); > > $response = curl_exec($curl); > $err = curl_error($curl); > > curl_close($curl); > > if ($err) { > echo "cURL Error #:" . $err; > } else { > echo $response; > } > ?> > ``` > [tab] Java > > ```java theme={null} > > import kong.unirest.HttpResponse; > import kong.unirest.Unirest; > > public class Main { > public static void main(String[] args) { > HttpResponse response = Unirest.get("https://api.dune.com/api/v1/query/{query_id}/results") > .header("X-DUNE-API-KEY", "") > .queryString("limit", 10) > .queryString("filters", "block_time > '2024-03-01'") > .queryString("columns", "tx_from,tx_to,tx_hash,amount_usd") > .queryString("sort_by", "amount_usd desc, block_time") > .asString(); > > System.out.println(response.getBody()); > } > } > ``` ### Sorting Parameters #### `sort_by` * **Type:** `string` * **Description:** Specifies the order in which query results are returned. It directly mirrors the functionality of an SQL `ORDER BY` clause. > [!NOTE] > > * Specify the sorting criteria using the format ` asc|desc`. For example, `block_time desc`. > * If a column name contains special characters, enclose it in double quotes, e.g., `"special,column" asc`. > * You can sort by multiple columns by separating them with a comma, exactly like in SQL. For instance, `amount_usd desc, block_time`. > * By default, sorting is in ascending order if not explicitly specified. Explicitly include `asc` or `desc` to define the sorting order. ### Sorted Response > [accordion] Example sorted response > > ```json theme={null} > { > "execution_id": "01HR8AGD6CWGHGP1BN3Z1SJ4MD", > "query_id": 3493826, > "is_execution_finished": true, > "state": "QUERY_STATE_COMPLETED", > "submitted_at": "2024-03-05T22:07:22.828653Z", > "expires_at": "2024-06-03T22:07:53.36647Z", > "execution_started_at": "2024-03-05T22:07:24.013663281Z", > "execution_ended_at": "2024-03-05T22:07:53.366469062Z", > "result": { > "rows": [ > { > "amount_usd": null, > "block_time": "2024-03-05 20:50:59.000 UTC", > "tx_from": "0x38032f326436fdb9c7a9b359e90010f86b8ab482", > "tx_hash": "0xce6f59cf2f0b395d8fc33e49d1f5db5686be95555135fd8126bc7c59327cd9be", > "tx_to": "0x061b87122ed14b9526a813209c8a59a633257bab" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:49:33.000 UTC", > "tx_from": "0xb46b909be665d75f833be22c6e6285ba5ad74dfa", > "tx_hash": "0x1f1725ebe374b1ffb50047055b793b2be6a8cb07ab75fd685b95e842953da4ca", > "tx_to": "0x1111111254eeb25477b68fb85ed929f73a960582" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:48:53.000 UTC", > "tx_from": "0x40014275b332f38423fa0de39939d26c7294ffc0", > "tx_hash": "0xb4364656c20007fb1d7bfa93d87fc6fe345a91b10661835d1a54d1ac7761a244", > "tx_to": "0x1111111254eeb25477b68fb85ed929f73a960582" > }, > { > "amount_usd": 1397.903560808159, > "block_time": "2024-03-05 20:48:03.000 UTC", > "tx_from": "0xb46b909be665d75f833be22c6e6285ba5ad74dfa", > "tx_hash": "0x818f701a6c7dcf78a090cfd8324da5896005c2a6d8e3ec5ac2c29cfa5e67f5d9", > "tx_to": "0x1111111254eeb25477b68fb85ed929f73a960582" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:47:55.000 UTC", > "tx_from": "0x50758bdc1735e94401ed73eb7e8bde482766819c", > "tx_hash": "0x1dc342dc397ffa7b433fa64280fe9f4a7e0b51409e9abc9fde61bc9b85c938be", > "tx_to": "0x4c4af8dbc524681930a27b2f1af5bcc8062e6fb7" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:47:55.000 UTC", > "tx_from": "0x50758bdc1735e94401ed73eb7e8bde482766819c", > "tx_hash": "0x1dc342dc397ffa7b433fa64280fe9f4a7e0b51409e9abc9fde61bc9b85c938be", > "tx_to": "0x4c4af8dbc524681930a27b2f1af5bcc8062e6fb7" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:47:53.000 UTC", > "tx_from": "0xfa3dc8db10e7c2f7dfa87e86bba6257066731bc1", > "tx_hash": "0x0d34634a9438ce241e2870b23e70a008c8db839ba38daadc1074c9b1a52be7c7", > "tx_to": "0xba12222222228d8ba445958a75a0704d566bf2c8" > }, > { > "amount_usd": 2.753641952846242, > "block_time": "2024-03-05 20:47:53.000 UTC", > "tx_from": "0xfa3dc8db10e7c2f7dfa87e86bba6257066731bc1", > "tx_hash": "0x0d34634a9438ce241e2870b23e70a008c8db839ba38daadc1074c9b1a52be7c7", > "tx_to": "0xba12222222228d8ba445958a75a0704d566bf2c8" > }, > { > "amount_usd": null, > "block_time": "2024-03-05 20:47:53.000 UTC", > "tx_from": "0xfa3dc8db10e7c2f7dfa87e86bba6257066731bc1", > "tx_hash": "0x0d34634a9438ce241e2870b23e70a008c8db839ba38daadc1074c9b1a52be7c7", > "tx_to": "0xba12222222228d8ba445958a75a0704d566bf2c8" > }, > { > "amount_usd": 1798.8186143812122, > "block_time": "2024-03-05 20:47:49.000 UTC", > "tx_from": "0xb46b909be665d75f833be22c6e6285ba5ad74dfa", > "tx_hash": "0xcf8d9873f017a8ba9e624c3bb61bede8e11c194965690026cd394f20c55f896a", > "tx_to": "0x1111111254eeb25477b68fb85ed929f73a960582" > } > ], > "metadata": { > "column_names": [ > "block_time", > "tx_from", > "tx_to", > "tx_hash", > "amount_usd" > ], > "row_count": 10, > "result_set_bytes": 2042, > "total_row_count": 100, > "total_result_set_bytes": 56496, > "datapoint_count": 50, > "pending_time_millis": 1185, > "execution_time_millis": 29352 > } > }, > "next_uri": "https://api.dune.com/api/v1/execution/01HR8AGD6CWGHGP1BN3Z1SJ4MD/results?columns=block_time%2Ctx_from%2Ctx_to%2Ctx_hash%2Camount_usd&filters=block_time+%3E+%272024-03-01%27&limit=10&offset=10", > "next_offset": 10 > } > ``` # Create Folder Source: https://docs.dune.com/api-reference/folders/endpoint/create POST /v1/folders Create a folder at the root of the library or inside parent_folder_id. Team folders need an editor or admin behind the API key. When a folder already exists at the same path the response is 409 with code folder_already_exists and details.existing_folder_id, so a retry can use that folder. > [!NOTE] > > Minimum required API key scope: `Read/Write` # Use Cases * **Set Up a Project**: Create a folder tree for a new project or client. * **Safe Retries**: When the folder already exists, the `409` response includes `existing_folder_id`, so a script or agent can use that folder and continue. # Delete Folder Source: https://docs.dune.com/api-reference/folders/endpoint/delete DELETE /v1/folders/{folder_id} Delete a folder. An empty folder is deleted right away. A folder that still holds subfolders, queries or dashboards is refused with 409 folder_not_empty and the counts, unless recursive=true. A recursive delete removes every subfolder and archives the queries and dashboards inside, as deleting a folder in the Dune app does; move content out first with POST /v1/content/move to keep it in the library. > [!NOTE] > > Minimum required API key scope: `Read/Write` # Use Cases * **Remove Empty Folders**: An empty folder is deleted right away. * **Remove a Folder Tree**: Pass `recursive=true` to delete all subfolders and archive the queries and dashboards inside. To keep the content, move it out first with [Move Queries and Dashboards](/api-reference/folders/endpoint/move-content). # Get Folder Source: https://docs.dune.com/api-reference/folders/endpoint/get GET /v1/folders/{folder_id} Get a folder, its direct subfolders, and the queries and dashboards directly inside it that are not archived, ordered by name. Page through the items with limit and next_offset. > [!NOTE] > > Minimum required API key scope: `Read` # Use Cases * **See Folder Contents**: Get the subfolders, queries, and dashboards inside a folder. * **Check Before Deleting**: Confirm what a folder holds before you delete it. # List Folders Source: https://docs.dune.com/api-reference/folders/endpoint/list GET /v1/folders List the folders directly inside a folder, or at the root of the library, ordered by name. A team API key works on the team's folders as the team member who created the key; a personal key works on the user's own folders. Page with limit and the next_offset returned by the previous response. > [!NOTE] > > Minimum required API key scope: `Read` # Use Cases * **Browse the Library**: List top-level folders, or the subfolders of a folder with `parent_folder_id`. * **Find a Folder by Name**: Use `name_contains` to find the folder an agent should file content into. * **Check Folder Size**: Each folder returns an `item_count` of the queries and dashboards inside it. # Move Folder Source: https://docs.dune.com/api-reference/folders/endpoint/move POST /v1/folders/{folder_id}/move Move a folder, with everything inside it, under another folder, or to the root of the library with parent_folder_id null. A folder cannot move into itself or into one of its subfolders. Moving a folder where it already is changes nothing. > [!NOTE] > > Minimum required API key scope: `Read/Write` # Use Cases * **Reorganize**: Move a folder, with everything inside it, under another folder. * **Move to the Top Level**: Pass `parent_folder_id: null` to move a folder to the top level of the library. # Move Queries and Dashboards Source: https://docs.dune.com/api-reference/folders/endpoint/move-content POST /v1/content/move Move up to 100 queries and 100 dashboards into a folder, or out of folders with target_folder_id null. All or nothing: every item must belong to the API key's library and be editable through it; otherwise nothing moves. > [!NOTE] > > Minimum required API key scope: `Read/Write` # Use Cases * **File New Work**: Move queries and dashboards an agent just created into the right folder. * **Bulk Moves**: Move up to 100 queries and 100 dashboards in one call. The move is all or nothing. * **Take Content Out of Folders**: Pass `target_folder_id: null` to move items out of all folders. # Update Folder Source: https://docs.dune.com/api-reference/folders/endpoint/update PATCH /v1/folders/{folder_id} Change a folder's name, description, icon or color. Fields that are omitted keep their value. Renaming a folder also renames the paths of every folder below it. > [!NOTE] > > Minimum required API key scope: `Read/Write` # Use Cases * **Rename**: Change a folder's name. The paths of all its subfolders update with it. * **Label Folders**: Set a description, a color, or an icon to make folders easier to find. # Overview Source: https://docs.dune.com/api-reference/folders/introduction Use the Folders API to organize your library of queries and dashboards from code or from an AI agent. Create folder trees, rename and recolor folders, move folders, and file queries and dashboards into them. These are the same folders you see in the Dune app library, so a change made through the API appears in the app right away. The same operations are available as tools in the [Dune MCP server](/docs/agents/mcp). ## Use Cases * **AI Agents**: Let an agent file the queries and dashboards it creates into the right folder, without manual cleanup afterwards. * **Library Organization**: Build a folder structure for a project or a client in one script. * **Team Workflows**: Keep team folders consistent across many members and many queries. * **Cleanup**: Find and remove old folders and the content inside them. ## Behavior * A folder belongs to a personal or team library. The API key decides which library you work in. * Team folders need an editor or admin behind the API key to create, change, or delete them. * Folder names are unique per parent folder. Creating a folder that already exists returns `409` with `folder_already_exists` and the ID of the existing folder, so a retry can use it. * Deleting a folder that still holds content returns `409` with `folder_not_empty` and the counts, unless you pass `recursive=true`. A recursive delete archives the queries and dashboards inside, as it does in the Dune app. > [card] [List Folders](/api-reference/folders/endpoint/list) > > List folders at the top level or inside a parent folder, with item counts. > [card] [Get Folder](/api-reference/folders/endpoint/get) > > Get a folder with its subfolders, queries, and dashboards. > [card] [Create Folder](/api-reference/folders/endpoint/create) > > Create a folder at the top level or inside a parent folder. > [card] [Update Folder](/api-reference/folders/endpoint/update) > > Rename a folder or change its description, color, or icon. > [card] [Move Folder](/api-reference/folders/endpoint/move) > > Move a folder under another folder or to the top level. > [card] [Delete Folder](/api-reference/folders/endpoint/delete) > > Delete a folder, or a folder and everything inside it. > [card] [Move Queries and Dashboards](/api-reference/folders/endpoint/move-content) > > File queries and dashboards into a folder, or take them out of folders. # Upsert Materialized View Source: https://docs.dune.com/api-reference/materialized-views/create POST /v1/materialized-views This upserts a materialized view from an existing query. If the materialized view with the given name already exists, it will update any metadata given that the query ID matches. If the query ID doesn't match, an error is returned, as the matview will have to be deleted and recreated instead. > [!NOTE] > > Minimum required API key scope: `Read/Write` > [!NOTE] > > * This endpoint will create a new matview if none exists for the given query ID, or update an existing one if the query ID matches. > * It will fail to create a matview with the same name as an existing one, but for a different query ID > * The name of the matview is just the last part of the matview, not including `dune..` and must be prefixed with `result_` > * The `cron_expression` parameter must be passed in as a valid 5 section cron expression. [See here](https://crontab.guru/) for how to write them. > [!TIP] > > * The cron expression interval must be at least 15 minutes and at most weekly # Delete Materialized View Source: https://docs.dune.com/api-reference/materialized-views/delete DELETE /v1/materialized-views/{name} Deletes a materialized view given its full name, such as dune.dune.result_erc_20_token_summary. > [!NOTE] > > Minimum required API key scope: `Read/Write` > [!NOTE] > > * The name must be the full name qualifier for the materialized view, i.e. `dune..` # Get Materialized View Source: https://docs.dune.com/api-reference/materialized-views/get GET /v1/materialized-views/{name} Returns a materialized view given its full name, including its source query, size, latest executions, and schedule. > [!NOTE] > > Minimum required API key scope: `Read` > [!NOTE] > > * The name must be the full name qualifier for the materialized view, i.e. `dune..` # List Materialized Views Source: https://docs.dune.com/api-reference/materialized-views/list GET /v1/materialized-views Returns a paginated list of the materialized views owned by the account tied to the API key. > [!NOTE] > > Minimum required API key scope: `Read` > [!NOTE] > > * This endpoint will list all the materialized views under the ownership of the account tied to the API key used # Overview Source: https://docs.dune.com/api-reference/materialized-views/overview The materialized views endpoints allow you to create, manage, and refresh materialized views programmatically via the API. > [!NOTE] > > Materialized views store the results of a query as a table that can be queried like any other table, enabling you to build data pipelines within Dune. To learn more about how materialized views work, see the [Materialized Views page](/query-engine/materialized-views). > [!NOTE] > > Creating and refreshing materialized views requires an active trial or a paid plan and consumes credits. Materialized views count toward your plan's storage quota. Free access is view-only. See [plan limits](https://dune.com/pricing). ## Naming Convention Materialized view names must follow these rules: * The full name qualifier is `dune..` * The name (last part) must be prefixed with `result_` * Example: `dune.myteam.result_daily_volume` ## Endpoints Below is an overview of each endpoint for managing materialized views. | Endpoint Title | Endpoint | Description | | - | - | - | | [Get Materialized View](./get) | `GET /v1/materialized-views/{name}` | Retrieves details about a specific materialized view | | [Upsert Materialized View](./create) | `POST /v1/materialized-views` | Creates a new materialized view or updates an existing one | | [Delete Materialized View](./delete) | `DELETE /v1/materialized-views/{name}` | Removes a materialized view | | [List Materialized Views](./list) | `GET /v1/materialized-views` | Lists all materialized views for your account | | [Refresh Materialized View](./refresh) | `POST /v1/materialized-views/{name}/refresh` | Triggers a refresh to update the materialized view with latest data | ## Refresh and Performance Tiers Each refresh of a materialized view triggers a query execution and consumes credits based on the performance level: * **Medium**: Extended timeout, 1x compute, priority queue. Best for most queries. * **Large**: Extended timeout, 2x compute, priority queue. For complex queries with joins across large tables. You can set a refresh schedule using cron expressions (minimum 15 minutes, maximum weekly) when creating or updating a materialized view. # Refresh Materialized View Source: https://docs.dune.com/api-reference/materialized-views/refresh POST /v1/materialized-views/{name}/refresh Starts an execution of the materialized view's source query that refreshes its data, optionally on a chosen performance tier. Returns the ID of that execution. > [!NOTE] > > Minimum required API key scope: `Read` This endpoint refreshes a materialized view, triggering a new execution to update its data. > [!NOTE] > > * By default, the refresh runs on the `medium` engine. To boost performance, pass in a JSON body with `{{"performance": "large"}}`. Credits are consumed based on actual compute resources used for the refresh operation. > * If you prefer `medium` performance, you can omit the `performance` parameter. > * You must own the materialized view to refresh it. ## Path Parameters **name** `string` *required* The name of the materialized view to refresh ## Request Body **performance** `string` Performance level of the refresh. Available options: `medium`, `large`. Defaults to `medium`. * `medium`: Extended timeout, 1x compute, priority queue. Best for most queries. * `large`: Extended timeout, 2x compute, priority queue. For complex queries. ## Response **execution_id** `string` Unique identifier for the execution triggered to refresh the materialized view Example: `01HZ065JVE23C23FM2HKWQP2RT` **sql_id** `string` Unique identifier for the materialized view Example: `dune.dune.result_erc_20_token_summary` ```bash cURL theme={null} curl -X POST "https://api.dune.com/api/v1/materialized-views/my_matview/refresh" \ -H "X-Dune-Api-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "performance": "medium" }' ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/materialized-views/my_matview/refresh" headers = { "X-Dune-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json" } data = { "performance": "medium" } response = requests.post(url, headers=headers, json=data) print(response.json()) ``` ```javascript JavaScript theme={null} const response = await fetch( 'https://api.dune.com/api/v1/materialized-views/my_matview/refresh', { method: 'POST', headers: { 'X-Dune-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ performance: 'medium' }) } ); const data = await response.json(); console.log(data); ``` ```json 200 OK theme={null} { "execution_id": "01HZ065JVE23C23FM2HKWQP2RT", "sql_id": "dune.dune.result_erc_20_token_summary" } ``` ```json 400 Bad Request theme={null} { "error": "Bad Request" } ``` ```json 401 Unauthorized theme={null} { "error": "Invalid API Key" } ``` ```json 404 Not Found theme={null} { "error": "Object not found" } ``` ```json 500 Internal Server Error theme={null} { "error": "Internal error" } ``` ## Notes * Refreshing a materialized view triggers a query execution to update the view with the latest data * Use the returned `execution_id` to check the status of the refresh operation * Credits are consumed based on actual compute resources used, the performance tier selected, and the amount of data written (e.g., table creation and data insertion) # Authentication Source: https://docs.dune.com/api-reference/overview/authentication The Dune API relies on API keys for authentication. Your API key grants access and determines billing details for private queries, so safeguard it diligently! ## Generate an API key In order to generate a new API key, go to settings -> API -> create new API key. > [!NOTE] > > * Dune has two types of account: `user` account and `team` account. A team can have many users. A user can join many teams. > * Each user or team account has its own context. Queries created under a team account can only be managed within the team account context. > * An API key belongs to a specific context, and is either associated with a user account or a team account. > [tab] Create key for user account > > [Generate a New API Key in Dune](https://demo.arcade.software/3Ki5RMUR9aYu1pzq8Tde?embed\&embed_mobile=tab\&embed_desktop=inline\&show_copy_link=true) > [tab] Create key for team account > > [Create a New API Key in Dune](https://demo.arcade.software/qjqHlpybEvBWHd7BLy5u?embed\&embed_mobile=tab\&embed_desktop=inline\&show_copy_link=true) > [!WARNING] > > Never share your secret API keys in public repositories or other accessible areas. ## API key scopes Each Dune API key is issued with a **scope** that controls what it can do. Endpoints in this reference list the **minimum required API key scope** — keys with broader scopes can also call them. | Scope | Access | | - | - | | `Read` | Read-only endpoints (query results, datasets, usage, status checks). | | `Read/Write` | Everything `Read` allows, plus mutating endpoints (create/update/archive queries, manage uploads, materialized views, pipelines). | ## Authentication & making API calls You can authenticate either with the API header or with query parameter to start making API calls. We illustrate below with [execute query endpoint](../executions/endpoint/execute-query) as an example. > [tab] Header Authentication > > To authenticate via the API header, include an `x-dune-api-key` property in your request header. > > > [tab] cURL (bash) > > > > ```bash theme={null} > > curl -X POST -H x-dune-api-key:{{api_key}} "https://api.dune.com/api/v1/query/{{query_id}}/execute" > > ``` > > > [tab] Python > > > > ```python theme={null} > > import requests > > > > url = "https://api.dune.com/api/v1/query/{{query_id}}/execute" > > > > headers = {"X-DUNE-API-KEY": ""} > > > > response = requests.request("POST", url, headers=headers) > > > > print(response.text) > > ``` > > > [tab] JavaScript > > > > ```javascript theme={null} > > const options = {method: 'POST', headers: {'X-DUNE-API-KEY': ''}}; > > > > fetch('https://api.dune.com/api/v1/query/{{query_id}}/execute', options) > > .then(response => response.json()) > > .then(response => console.log(response)) > > .catch(err => console.error(err)); > > ``` > > > [tab] Go > > > > ```go theme={null} > > package main > > > > import ( > > "fmt" > > "net/http" > > "io/ioutil" > > ) > > > > func main() { > > > > url := "https://api.dune.com/api/v1/query/{{query_id}}/execute" > > > > req, _ := http.NewRequest("POST", url, nil) > > > > req.Header.Add("X-DUNE-API-KEY", "") > > > > res, _ := http.DefaultClient.Do(req) > > > > defer res.Body.Close() > > body, _ := ioutil.ReadAll(res.Body) > > > > fmt.Println(res) > > fmt.Println(string(body)) > > > > } > > ``` > > > [tab] PHP > > > > ```php theme={null} > > > > > $curl = curl_init(); > > > > curl_setopt_array($curl, [ > > CURLOPT_URL => "https://api.dune.com/api/v1/query/{{query_id}}/execute", > > CURLOPT_RETURNTRANSFER => true, > > CURLOPT_ENCODING => "", > > CURLOPT_MAXREDIRS => 10, > > CURLOPT_TIMEOUT => 30, > > CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, > > CURLOPT_CUSTOMREQUEST => "POST", > > CURLOPT_HTTPHEADER => [ > > "X-DUNE-API-KEY: " > > ], > > ]); > > > > $response = curl_exec($curl); > > $err = curl_error($curl); > > > > curl_close($curl); > > > > if ($err) { > > echo "cURL Error #:" . $err; > > } else { > > echo $response; > > } > > ?> > > ``` > > > [tab] Java > > > > ```java theme={null} > > HttpResponse response = Unirest.post("https://api.dune.com/api/v1/query/{{query_id}}/execute") > > .header("X-DUNE-API-KEY", "") > > .asString(); > > ``` > [tab] Query Parameter Authentication > > Alternatively, use an `api_key` query parameter for authentication. > > > [tab] cURL (bash) > > > > ```bash theme={null} > > curl -X POST "https://api.dune.com/api/v1/query/{{query_id}}/execute?api_key={{api_key}}" > > ``` > > > [tab] Python > > > > ```python theme={null} > > import requests > > > > url = "https://api.dune.com/api/v1/query/{{query_id}}/execute" > > > > querystring = {"api_key": ""} > > > > response = requests.request("POST", url, params=querystring) > > > > print(response.text) > > ``` > > > [tab] JavaScript > > > > ```javascript theme={null} > > const options = { > > method: 'POST', > > }; > > > > const apiKey = ''; > > const queryId = '{{query_id}}'; > > const url = `https://api.dune.com/api/v1/query/${queryId}/execute?api_key=${apiKey}`; > > > > fetch(url, options) > > .then(response => response.json()) > > .then(response => console.log(response)) > > .catch(err => console.error(err)); > > ``` > > > [tab] Go > > > > ```go theme={null} > > package main > > > > import ( > > "fmt" > > "net/http" > > "io/ioutil" > > ) > > > > func main() { > > url := "https://api.dune.com/api/v1/query/{{query_id}}/execute?api_key=" > > > > req, _ := http.NewRequest("POST", url, nil) > > > > res, _ := http.DefaultClient.Do(req) > > > > defer res.Body.Close() > > body, _ := ioutil.ReadAll(res.Body) > > > > fmt.Println(res) > > fmt.Println(string(body)) > > } > > ``` > > > [tab] PHP > > > > ```php theme={null} > > > > > $curl = curl_init(); > > > > curl_setopt_array($curl, [ > > CURLOPT_URL => "https://api.dune.com/api/v1/query/{{query_id}}/execute?api_key=", > > CURLOPT_RETURNTRANSFER => true, > > CURLOPT_ENCODING => "", > > CURLOPT_MAXREDIRS => 10, > > CURLOPT_TIMEOUT => 30, > > CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, > > CURLOPT_CUSTOMREQUEST => "POST", > > ]); > > > > $response = curl_exec($curl); > > $err = curl_error($curl); > > > > curl_close($curl); > > > > if ($err) { > > echo "cURL Error #:" . $err; > > } else { > > echo $response; > > } > > ?> > > ``` > > > [tab] Java > > > > ```java theme={null} > > HttpResponse response = Unirest.post("https://api.dune.com/api/v1/query/{{query_id}}/execute?api_key=") > > .asString(); > > ``` # Billing Source: https://docs.dune.com/api-reference/overview/billing API access requires an active trial or a paid plan. Free access after a trial is view-only and does not include API exports, data writes, or alerts. Pricing for API usage is charged along several dimensions. All details can be found at [dune.com/pricing](https://dune.com/pricing). > [!NOTE] > > Failed executions are not always charged. Queries that run until Dune's execution timeout, executions stopped by a user-defined resource/cost cap, and user-cancelled executions after compute has been used may consume credits for resources already used. > > Dune does not charge for SQL syntax/semantic errors, internal query-engine failures, or query-engine capacity-limit failures such as memory or stage limits. For a specific execution, check `execution_cost_credits` on the [status endpoint](/api-reference/executions/endpoint/get-execution-status). ## Executions Credits are consumed based on actual compute resources used for each query execution. The performance tier you select affects credit consumption. If you execute a query but never pull the results, you are only charged for the execution. ## Data Export Credits are consumed when exporting query results via API or CSV. | Plan | Credits per MB Exported | | - | - | | Free (view-only) | Not available | | Analyst | 10 | | Plus | 2 | | Enterprise | Custom | ## Data Writes Credits are consumed when writing data (table creation, data insertion, uploads). | Plan | Credits per GB Written | | - | - | | Free (view-only) | Not available | | Analyst | 3 | | Plus | 3 | | Enterprise | Custom | > [!NOTE] > > Minimum charge is 1 credit per write operation. ## Storage Storage limits are per-plan caps, not charged per-credit. | Plan | Storage Limit | | - | - | | Free (view-only) | No data writes | | Analyst | 1 GB | | Plus | 15 GB | | Enterprise | Unlimited | ## Webhooks (Alerts) | Plan | Webhooks | | - | - | | Free (view-only) | Not available | | Analyst | 5 | | Plus | 5 | | Enterprise | Custom | ## Queries Endpoint Available on Plus and Enterprise plans. ## Data Transformations Billing Data Transformations is an Enterprise-only feature with usage-based credit consumption. ### Credit Consumption #### Compute Credits * Same as Fluid Engine credits for query execution * Charged based on actual compute resources used * Depends on query complexity and execution time #### Write Operations * **Minimum 1 credit** per write operation * Scales with data volume (GB written) * Applied to INSERT, MERGE, CREATE TABLE AS SELECT, etc. #### Maintenance Operations * OPTIMIZE, VACUUM, and ANALYZE operations consume credits * Based on compute resources and data written during maintenance * Can be automated with dbt post-hooks See [dbt Connector documentation](/api-reference/connectors/dbt/overview) for more details. # FAQ Source: https://docs.dune.com/api-reference/overview/faq #### What are the differences between the Dune API and the Dune web app? There are no major performance differences within a specific performance tier when used through the Dune API or Dune web app. The Dune API gives you programmatic access to the capabilities and data sets that can already be accessed from the Dune web app. The same queries and results exist in the web app, even if created/executed from the API (and vice versa). #### How many Requests Per Minute can I make? The API rate limit currently varies by [subscription plan](https://dune.com/pricing). It's currently 40 per minute on Free, 200 per minute on Plus, and custom limits on Enterprise plans. #### Does Dune support GraphQL on endpoints? No, we currently don't support GraphQL queries. #### How do I paginate on my query results? You currently cannot paginate through the API, we are working on enabling this soon. For now, try and use LIMIT and OFFSET in your query with parameters to paginate manually. #### Are there specified SLAs? SLAs are only available on Enterprise pricing plans. #### How do I find a query id? When navigating to a query, it’s the first number after “/queries/” in the URL. For example in `https://dune.com/queries/241/388`, "241" is the query id. #### Does the API support Query Parameters? Yes, check out [this page](../queries/endpoint/query-object). #### What is the execution timeout limit and can I request a longer limit? The query execution timeout limit matches the Dune web app - 30 minutes. You can't request a longer limit. #### What is the difference between the states “Executing” and “Pending”? Pending means, the execution is waiting for an available execution connection slot. Executing means the query is currently executing against the database. #### Can I ingest data by getting a direct connection to the database instead? Not currently. #### Are query results data saved for faster retrieval? Yes! #### How long are the results data from an execution stored for? The results storage period can be found on the API response on the “expires_at” field in the execution status and results body. #### How do I import Dune data into a google sheet? Use "Import Data" to import your CSV results into a google sheet using "api_key" as a param. (We advise against doing this any public document where your API key can be viewed and compromised.) `=importData("https://api.dune.com/api/v1/query/{{query_id}}/results/csv?api_key={{api_key}}")`. Then, [schedule a query execution](https://dune.com/docs/app/query-editor/query-scheduler/?h=scheduling) to have your results regularly updated on a set schedule. # Getting Started Source: https://docs.dune.com/api-reference/overview/getting-started Learn how to authenticate and make your first API request to Dune This guide will walk you through everything you need to get started with Dune's APIs, from creating an API key to making your first request. ## 1. Sign Up Create your account at [dune.com/auth/register](https://dune.com/auth/register) New accounts start with a 7-day trial with Plus plan features and 2,500 total credits. Adding a card places a hold for the plan amount. Cancelling releases the hold. Keeping the plan captures it when the trial ends. The trial ends after 7 days or when the credits run out, whichever comes first. API access then requires a paid plan; Free access is view-only. See [how credits work](/resources/credits-billing/how-credits-work). ## 2. Generate API Key 1. Navigate to [API settings page](https://dune.com/apis?tab=keys) 2. Click **Create API Key** 3. Give your key a descriptive name (e.g., "Production API", "Development") 4. Copy and securely store your API key > [!NOTE] > > * Dune has two types of account: **user** account and **team** account. A team can have many users. A user can join many teams. > * Each user or team account has its own context. Queries created under a team account can only be managed within the team account context. > * An API key belongs to a specific context, and is either associated with a user account or a team account. [Create a New API Key in Dune](https://demo.arcade.software/J3MdgJJsH2EmVkeTJPO8?embed\&embed_mobile=tab\&embed_desktop=inline\&show_copy_link=true) > [!NOTE] > > **Keep your API key secure!** Treat it like a password. Never commit it to version control or share it publicly. Anyone with your API key can make requests on your behalf and consume your credits. ## 3. Authenticate Use your API key to authenticate requests to Dune's APIs. Include it in your request headers: ```bash theme={null} X-DUNE-API-KEY: your-api-key-here ``` ### Initialize the SDK ```python Python theme={null} from dune_client import DuneClient # DuneClient will read the DUNE_API_KEY environment variable dune = DuneClient() ``` ```typescript TypeScript theme={null} import { DuneClient } from '@duneanalytics/client-sdk'; // Use environment variable for security const dune = new DuneClient(process.env.DUNE_API_KEY); ``` ```go Go theme={null} import "github.com/duneanalytics/duneapi-client-go" import "os" // Use environment variable for security client := duneapi.New(os.Getenv("DUNE_API_KEY")) ``` > [!TIP] > > **Best practices:** > > * Store API keys in environment variables > * Create separate keys for development and production > * Rotate keys periodically > * Revoke keys immediately if compromised ## 4. Get Started Use your API key to make requests to Dune's APIs. Here's a simple example to get recent DEX trades: ```bash cURL theme={null} # Execute a SQL query curl -X POST "https://api.dune.com/api/v1/sql/execute" \ -H "Content-Type: application/json" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" \ -d '{ "sql": "SELECT * FROM dex.trades WHERE block_time > now() - interval '\''1'\'' day LIMIT 10", "performance": "medium" }' ``` ```python Python theme={null} from dune_client import DuneClient dune = DuneClient(api_key="YOUR_API_KEY") # Execute a SQL query sql = """ SELECT * FROM dex.trades WHERE block_time > now() - interval '1' day LIMIT 10 """ results = dune.run_sql(query_sql=sql) print(results.get_rows()) ``` ```typescript TypeScript theme={null} import { DuneClient } from '@duneanalytics/client-sdk'; const dune = new DuneClient('YOUR_API_KEY'); // Execute a saved query const executionResult = await dune.runQuery({ queryId: 3493826 }); console.log(executionResult.result?.rows); ``` ### Understanding the Response The API returns an execution object with your query status: ```json theme={null} { "execution_id": "01K9AHMWSJZD59KAGB3WY45895", "state": "QUERY_STATE_EXECUTING", "submitted_at": "2025-11-05T17:39:48.146829Z", "expires_at": "2026-02-03T17:39:48.329665Z" } ``` > [!NOTE] > > Queries execute asynchronously. Use the `execution_id` to check status and retrieve results. Our SDKs handle polling automatically. ### Getting Results Once execution completes, fetch the results: ```bash theme={null} curl "https://api.dune.com/api/v1/execution/{execution_id}/results" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" ``` *** ## Next Steps Now that you've made your first request, explore common use cases: > [card] [Analyze onchain data](/api-reference/apis/quickstart-analyze) > > Build custom analytics pipelines and reports > [card] [Use connectors](/api-reference/connectors/overview) > > Connect with Trino Connector or DBT Connector for maximum flexibility ## Additional Resources > [card] [API Reference](/api-reference/executions/execution-object) > > Complete endpoint documentation > [card] [Rate Limits](/api-reference/overview/rate-limits) > > Understand API rate limits > [card] [Troubleshooting](/api-reference/overview/troubleshooting) > > Common issues and solutions ## Getting Help > [card] [Support](mailto:support@dune.com) > > Contact our support team > [card] [Status Page](https://status.dune.com) > > Check API status and uptime # Overview Source: https://docs.dune.com/api-reference/overview/introduction Build blockchain analytics workflows with Dune's comprehensive API suite. Access the same data that powers thousands of Dune dashboards, available programmatically for your data pattern needs. Dune API provides a variety of endpoints for **analysts**, **data engineers**, and **data scientists**, ranging from low-level, customizable options to connectors ready for immediate use. Queries saved in the Dune App UI can be executed via API and results retrieved in your environment, enabling bulk data extraction and automated workflows. > [!NOTE] > > **New to Dune?** **[Create a free account](https://dune.com/auth/register)** or **[get your API key](https://dune.com/apis?tab=keys)** to get started. ## What do you want to build? > [card] [Analyze onchain data programmatically](/api-reference/apis/quickstart-analyze) > > Execute SQL queries, retrieve results, and build custom analytics pipelines with Dune's query execution engine. Perfect for data teams and analysts. > > → Start with query execution > [card] [Run queries in your environment](/api-reference/connectors/overview) > > Connect directly to Dune's data warehouse using Trino Connector for maximum flexibility. Perfect for enterprise teams with existing BI tools. > > → Set up Trino connector > [card] [Build custom dashboards & reports](/api-reference/apis/quickstart-dashboards) > > Fetch query results, manage executions, and create dynamic visualizations in your own applications. Perfect for teams embedding analytics. > > → Create your first dashboard > [card] [Transform data with dbt](/api-reference/connectors/dbt/overview) > > Build production-grade data transformation pipelines with write access to DuneSQL. Perfect for data engineering teams using dbt. > > → Set up dbt connector > [card] [BI Visualization Tools](/api-reference/connectors/trino/overview) > > Connect Dune to your favorite BI tools like Hex, Metabase, and DBeaver using the Trino/Presto connector. > > → Connect BI tools > [card] [Get started with the basics](/api-reference/overview/getting-started) > > New to APIs? Start here to make your first request and see results in minutes. > > Learn how to execute a simple SQL query, authenticate your requests, and retrieve blockchain data programmatically. > > → Make your first request ## Quick Start with SDKs Our SDKs handle authentication, polling, pagination, and error handling automatically. The new `execute()` function manages the entire workflow for you. > [card] [Python](/api-reference/overview/sdks#python) > > ```bash theme={null} > pip install dune-client > ``` > > ```python theme={null} > from dune_client import DuneClient > > dune = DuneClient(api_key="your-key") > results = dune.execute(query_id=3493826) > ``` > > [Full Python documentation →](/api-reference/overview/sdks#python) > [card] [TypeScript](/api-reference/overview/sdks#typescript) > > ```bash theme={null} > npm install @duneanalytics/client > ``` > > ```typescript theme={null} > import { DuneClient } from '@duneanalytics/client'; > > const dune = new DuneClient('your-key'); > const results = await dune.execute({ queryId: 3493826 }); > ``` > > [Full TypeScript documentation →](/api-reference/overview/sdks#typescript) > [card] [Go](/api-reference/overview/sdks#go) > > ```bash theme={null} > go get github.com/duneanalytics/duneapi-client-go > ``` > > ```go theme={null} > client := duneapi.New("your-key") > results := client.Execute(3493826) > ``` > > [Full Go documentation →](/api-reference/overview/sdks#go) > [!NOTE] > > **New:** All SDKs now include an `execute()` function that handles polling and pagination automatically. No more managing multiple API calls! ## Additional Resources > [card] [API Reference](/api-reference/api-overview) > > Complete documentation for all endpoints, parameters, response formats, and status codes. > > * Execute & Results endpoints > * Query management > * Dataset metadata > * Usage & billing > * Webhooks > [card] [Troubleshooting Errors](/api-reference/overview/troubleshooting) > > Common API errors and how to resolve them. > > * Authentication issues > * Rate limit errors > * Query execution failures > * Response format errors > [card] [API Pricing](/api-reference/overview/billing) > > Understand credit consumption and costs for different endpoints. > > * Execution endpoints: Credit-based > * Metadata endpoints: Free > * Usage tracking available via API > [card] [Authentication](/api-reference/overview/authentication) > > Get started with API keys and authentication. > > * Auto-generated keys for new teams > * Manage keys in settings > * Best practices for key security ## Getting Help > [card] [Quickstarts](/api-reference/overview/getting-started) > > Step-by-step guides for common use cases > [card] [Support](mailto:support@dune.com) > > Contact our support team # Rate Limits Source: https://docs.dune.com/api-reference/overview/rate-limits **Rate Limits** Our rate limits are implemented in three ways: IP, low vs. high limit endpoints and [subscription plan](https://dune.com/pricing). * Low limit endpoints *(write-heavy operations)* * [create query](../queries/endpoint/create) * [update query](../queries/endpoint/update) * [private query](../queries/endpoint/private) * [unprivate query](../queries/endpoint/unprivate) * [archive query](../queries/endpoint/archive) * [unarchive query](../queries/endpoint/unarchive) * [execute query](../executions/endpoint/execute-query) * [create table](../tables/endpoint/create) * [insert into table](../tables/endpoint/insert) * [upload CSV](../tables/endpoint/upload) * [delete table](../tables/endpoint/delete) * High limit endpoints *(read-heavy operations)* * [read query](../queries/endpoint/read) * [get execution result](../executions/endpoint/get-execution-result) * [get execution result CSV](../executions/endpoint/get-execution-result-csv) * [get execution status](../executions/endpoint/get-execution-status) * [cancel execution](../executions/endpoint/cancel-execution) | Dimension | | Limit | | - | - | - | | Per IP | | 1000 requests per second (rps) | | Free (view-only) | API access | Not available | | Plus | Low limit | 70 rpm | | Plus | High limit | 200 rpm | | Enterprise | Low limit | 350+ rpm | | Enterprise | High limit | 1000+ rpm | | Enterprise | | Please contact us! | > [!NOTE] > > Rate limits for different dimensions are separate but can be utilized independently. > For example, on the Plus plan, the low limit is 70 requests per minute and the high limit is 200 requests per minute. Each limit applies independently. Free access is view-only; API usage requires an active trial or a paid plan. Every rate-limited response reports your current limits in the `RateLimit` and `RateLimit-Policy` headers, and a `429 Too Many Requests` response includes `Retry-After`. See [Response Headers](./response-headers). **Data Return Limit** Dune internally has a maximum query result size limit (which currently is 32GB). If your query yields more than 32GB of data, the result will be truncated in storage. In such cases, pulling the result data (using pagination) but without specifying `allow_partial_results` set to true will trigger an error message: "error": "Partial Result, please request with 'allow_partial_results=true'". If you wish to retrieve partial results, you can pass the parameter `allow_partial_results=true`. But please make sure you indeed want to fetch the truncated result. # Response Headers Source: https://docs.dune.com/api-reference/overview/response-headers Rate limit and deprecation headers returned by the Dune API The Dune API uses standard HTTP headers to tell clients about their rate limits and about endpoints that are being retired. Browser clients can read all of these headers. ## Rate limit headers Responses to authenticated requests include the [rate limits](./rate-limits) that applied to the request. The headers follow the IETF [RateLimit header fields draft](https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/). | Header | Format | Meaning | | - | - | - | | `RateLimit-Policy` | `"";q=;w=` | The limit that applies: `q` requests per window of `w` seconds. | | `RateLimit` | `"";r=;t=` | `r` requests left in the current window, which resets in `t` seconds. | | `Retry-After` | `` | Sent only with `429 Too Many Requests`. Wait at least this many seconds before retrying. | A request can be subject to more than one policy. Each policy appears as a separate entry in the list, and the most restrictive one applies. | Policy | Applies to | | - | - | | `ip` | Every request from your IP address | | `write` | [Low limit endpoints](./rate-limits) (write-heavy operations) | | `read` | [High limit endpoints](./rate-limits) (read-heavy operations) | | `default` | The Dune MCP server | For example, a read request on the Plus plan that hit its limit returns: ```http theme={null} HTTP/1.1 429 Too Many Requests RateLimit-Policy: "ip";q=1000;w=1, "read";q=200;w=60 RateLimit: "ip";r=999;t=1, "read";r=0;t=37 Retry-After: 37 ``` > [!NOTE] > > A positive `r` does not guarantee that the next request will be accepted. If the headers are missing, for example on a `401 Unauthorized` response, back off exponentially before retrying. ## Deprecation headers Endpoints that are being retired send these headers on every response. See the [versioning and deprecation policy](./versioning). | Header | Format | Meaning | | - | - | - | | `Deprecation` | `@` | When the endpoint was or will be deprecated ([RFC 9745](https://www.rfc-editor.org/rfc/rfc9745)). | | `Sunset` | HTTP date, such as `Mon, 23 Nov 2026 00:00:00 GMT` | When the endpoint stops working ([RFC 8594](https://www.rfc-editor.org/rfc/rfc8594)). Sent once a removal date is set. | | `Link` | `; rel="deprecation"` | The page that explains the deprecation and names the replacement. | Log or alert on these headers in your client so you notice a deprecation before the endpoint is removed. # Troubleshooting Errors Source: https://docs.dune.com/api-reference/overview/troubleshooting Dune uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the `2xx` range indicate success. Codes in the `4xx` range indicate an error that failed given the information provided. Codes in the `5xx` range indicate an error with Dune's servers. | HTTP Status Code | Status | Description | | - | - | - | | 200 | OK | Everything worked as expected. | | 400 | Bad Request | The request was unacceptable, often due to missing a required parameter. | | 401 | Unauthorized | No valid API key provided. | | 402 | Payment Required | This request would exceed your configured limits per billing cycle. | | 403 | Forbidden | The API key doesn’t have permissions to perform the request. | | 404 | Not Found | The requested resource doesn’t exist. | | 409 | Conflict | The request conflicts with another request. | | 429 | Too Many Requests | Too many requests hit the API too quickly (rate limited). | | 500 | Server Errors | Generic internal server error. | For specific error code information, please refer to each of the endpoints themselves. Here we list some common errors and suggest possible solutions: #### Invalid API key ```json theme={null} { "error": "invalid API Key" } ``` You did not input a valid API key. You can go generate a new key and make sure you save it in a safe place and paste the key over. #### Permission error ```json theme={null} { "error": "not found: Query not found or private" } ``` When you perform an action on a private query your API key doesn't have access to, you will get this error. If you indeed own this query, please check that the context of the API key and the query owner are the same. #### Credit limit error ```json theme={null} { "error": "This api request would exceed your configured limits per billing cycle. Please visit your settings on dune.com and adjust your limits to continue usage." } ``` You are trying to make a request but don't have enough credits (configured) on your account. If you'd like to incur extra credits, head over to settings -> subscription and adjust the limit you have set within "limit extra credits" toggle. # Versioning and Deprecation Source: https://docs.dune.com/api-reference/overview/versioning How the Dune API changes and how endpoints are retired ## Versioning The API version is part of the URL path, such as `/api/v1/...`. Within a version we only make backward-compatible changes: * new endpoints * new optional request parameters * new fields in responses * new values in enums Your client should ignore response fields and enum values it does not recognize. Breaking changes, such as removing a field or changing its type, go into a new version or a new endpoint. ## Deprecating an endpoint When we retire an endpoint, we: 1. Announce it in the changelog and on the endpoint's docs page, and name the replacement. 2. Send the `Deprecation` and `Link` [response headers](./response-headers) on the endpoint from that day. 3. Set a removal date at least **6 months** after the announcement, and send it in the `Sunset` header. Security fixes may need a shorter period, with at least **30 days'** notice. 4. Remove the endpoint after the sunset date. Deprecated endpoints keep working until their sunset date. To find out early, watch for the `Deprecation` and `Sunset` headers in your client. ## Currently deprecated endpoints | Endpoint | Replacement | Sunset | | - | - | - | | `/v1/table/*` | `/v1/uploads/*`, see the [migration guide](../tables/endpoint/migration) | November 23, 2026 | # Execute Pipeline Source: https://docs.dune.com/api-reference/pipelines/endpoint/execute-pipeline POST /v1/pipelines/execute Executes a specified pipeline. A pipeline allows you to chain multiple queries and materialized view refreshes together and execute them as a single unit. > [!NOTE] > > Minimum required API key scope: `Read` This endpoint builds an execution pipeline from a specified query and executes it. The pipeline will automatically include all materialized views in the query's lineage, ensuring coordinated execution of dependent queries. ## How It Works When you execute a pipeline using this endpoint: 1. **Lineage Detection**: Dune analyzes the query to identify all materialized views it depends on 2. **Pipeline Construction**: A pipeline is automatically built that includes all dependencies in the correct order 3. **Coordinated Execution**: All queries and materialized view refreshes are executed as a single unit 4. **Status Tracking**: Returns a `pipeline_execution_id` for monitoring progress ## Key Differences from Query Pipeline Execute This endpoint differs from the [Execute Query Pipeline](/api-reference/executions/endpoint/execute-query-pipeline) endpoint: | Feature | Execute Pipeline | Execute Query Pipeline | | - | - | - | | **Endpoint** | `POST /v1/pipelines/execute` | `POST /v1/query/{query_id}/pipeline/execute` | | **Query ID** | In request body | In URL path | | **Lineage** | Automatically includes all materialized views | Executes predefined pipeline | | **Use Case** | Dynamic pipeline based on query dependencies | Predefined pipeline execution | ## Request Body The request body accepts: * `query_id` (required): The unique identifier of the query to execute * `performance` (optional): Execution tier - `medium` (default) or `large` * `query_parameters` (optional): SQL query parameters as JSON key-value pairs ## Use Cases This endpoint is ideal for: * **Dependency Management**: Automatically refreshing all materialized views a query depends on * **Consistent Updates**: Ensuring all dependent data is fresh before query execution * **Dynamic Pipelines**: When you want to execute based on runtime query dependencies * **Simplified Workflow**: No need to manually define pipeline structure ## Monitoring Pipeline Execution After executing the pipeline: 1. Save the returned `pipeline_execution_id` 2. Use the [Get Pipeline Execution Status](/api-reference/pipelines/endpoint/get-pipeline-status) endpoint to monitor progress 3. Track the status of each materialized view refresh and query execution 4. Retrieve results once the pipeline completes ## Example Workflow ```bash theme={null} # 1. Execute pipeline for query ID 1234567 curl -X POST "https://api.dune.com/api/v1/pipelines/execute" \ -H "X-Dune-Api-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query_id": 1234567, "performance": "medium", "query_parameters": { "start_date": "2024-01-01", "end_date": "2024-12-31" } }' # Response: { "pipeline_execution_id": "01HZABC123..." } # 2. Check pipeline status curl "https://api.dune.com/api/v1/pipelines/executions/01HZABC123.../status" \ -H "X-Dune-Api-Key: YOUR_API_KEY" ``` > [!NOTE] > > This endpoint automatically determines which materialized views need to be refreshed based on the query's lineage. You don't need to manually specify dependencies. ## Performance Considerations * **Medium tier**: Best for most queries with standard dependencies * **Large tier**: Use for complex queries with many dependencies or large materialized views * Credits are consumed based on actual compute resources used for each node in the pipeline > [!TIP] > > If your query depends on multiple materialized views, this endpoint will refresh all of them in the correct order before executing your query, ensuring data consistency. # Get Pipeline Execution Status Source: https://docs.dune.com/api-reference/pipelines/endpoint/get-pipeline-status GET /v1/pipelines/executions/{pipeline_execution_id}/status Retrieves the status of a pipeline execution, including the status of each node in the pipeline. > [!NOTE] > > Minimum required API key scope: `Read` This endpoint retrieves the status of a pipeline execution, including the status of each node (query or materialized view refresh) in the pipeline. ## Understanding Pipeline Status A pipeline execution contains multiple nodes, each representing either: * **Query Execution**: A query that's part of the pipeline * **Materialized View Refresh**: A materialized view that's refreshed as part of the pipeline Each node has its own status and can be tracked independently. ## Pipeline States The overall pipeline can be in one of the following states: * `pending`: Pipeline execution has been queued but not yet started * `executing`: Pipeline is currently running * `completed`: All nodes in the pipeline have completed successfully ## Node Status Each node in the pipeline includes: * `node_id`: Unique identifier for the node * `status`: Current state of the node execution * `query_execution_status` or `materialized_view_refresh_status`: Detailed status information ## Response Structure The 200 response includes: * `status`: Overall pipeline execution status (pending, executing, or completed) * `node_executions`: Array of individual node executions with their status and results ## Example Usage ```bash theme={null} # Check pipeline status curl "https://api.dune.com/api/v1/pipelines/executions/01HZABC123.../status" \ -H "X-Dune-Api-Key: YOUR_API_KEY" ``` > [!TIP] > > Poll this endpoint periodically to monitor pipeline execution progress. Each node's status will update as the pipeline progresses through its execution. ## Monitoring Pipeline Progress You can use this endpoint to: * Track which nodes have completed and which are still running * Identify any nodes that have failed * Retrieve execution IDs for individual queries to fetch their results * Monitor overall pipeline health > [!NOTE] > > Once a pipeline execution completes, you can retrieve the results of individual queries using their respective execution IDs from the node status. # Overview Source: https://docs.dune.com/api-reference/pipelines/overview The pipeline endpoints enable you to execute and monitor query pipelines - a powerful feature that allows you to chain multiple queries together and execute them as a coordinated workflow. ## What are Query Pipelines? Query pipelines are sequences of related queries that execute in a specific order based on their dependencies. Instead of executing individual queries separately, pipelines allow you to: * **Define Dependencies**: Specify which queries depend on the results of other queries * **Atomic Execution**: Execute all queries in the pipeline as a single unit * **Coordinated Updates**: Ensure related queries are always executed together * **Track Progress**: Monitor the status of each query in the pipeline ## How Pipelines Work 1. **Inspect Pipeline**: Use the [Get Query Pipeline](/api-reference/queries/endpoint/get-query-pipeline) endpoint to view the pipeline structure 2. **Execute Pipeline**: Use the [Execute Pipeline](./endpoint/execute-pipeline) endpoint or [Execute Query Pipeline](/api-reference/executions/endpoint/execute-query-pipeline) endpoint 3. **Monitor Progress**: Poll the [Get Pipeline Execution Status](./endpoint/get-pipeline-status) endpoint to track execution 4. **Retrieve Results**: Once complete, access results for each query using their individual execution IDs ## Pipeline Components A pipeline execution consists of multiple **nodes**, where each node can be: * **Query Execution**: A DuneSQL query that runs as part of the pipeline * **Materialized View Refresh**: A materialized view that gets refreshed during pipeline execution Each node has its own execution status and can be tracked independently. ## Common Use Cases ### Data Transformation Pipelines Build multi-stage data processing workflows where each stage depends on the previous one: * Stage 1: Extract raw data * Stage 2: Transform and clean data * Stage 3: Aggregate results * Stage 4: Generate final metrics ### Coordinated Dashboard Updates Ensure all queries powering a dashboard are executed together with fresh data: * Execute all dependent queries in the correct order * Maintain consistency across related metrics * Update materialized views that feed into dashboard queries ### Incremental Data Processing Process data incrementally through multiple dependent steps: * Process new transactions * Update aggregated tables * Refresh summary statistics * Update trend indicators ## Endpoints | Endpoint | Method | Description | | - | - | - | | [Execute Pipeline](./endpoint/execute-pipeline) | `POST /v1/pipelines/execute` | Builds and executes a pipeline including all materialized views in the query's lineage | | [Get Pipeline Execution Status](./endpoint/get-pipeline-status) | `GET /v1/pipelines/executions/{pipeline_execution_id}/status` | Retrieves the status of a pipeline execution including all nodes | ## Related Endpoints | Endpoint | Method | Description | | - | - | - | | [Get Query Pipeline](/api-reference/queries/endpoint/get-query-pipeline) | `GET /v1/query/{query_id}/pipeline` | Retrieves the pipeline definition for a query, including all dependencies and execution order | | [Execute Query Pipeline](/api-reference/executions/endpoint/execute-query-pipeline) | `POST /v1/query/{query_id}/pipeline/execute` | Executes a predefined query pipeline starting from the specified query | ## Pipeline vs. Regular Query Execution | Feature | Regular Execution | Pipeline Execution | | - | - | - | | **Queries** | Single query | Multiple dependent queries | | **Coordination** | Manual | Automatic | | **Dependencies** | None | Enforced by pipeline | | **Monitoring** | Per-query | Unified view of all nodes | | **Use Case** | Independent analysis | Complex workflows | > [!TIP] > > Use [Execute Pipeline](./endpoint/execute-pipeline) for automatic lineage-based execution or [Execute Query Pipeline](/api-reference/executions/endpoint/execute-query-pipeline) for predefined pipelines. Then monitor progress with the [Get Pipeline Execution Status](./endpoint/get-pipeline-status) endpoint using the returned `pipeline_execution_id`. ## Credits and Performance Pipeline executions consume credits based on: * The performance tier selected (medium or large) * Actual compute resources used by each query in the pipeline * Number of queries and complexity of operations You can specify the performance tier when executing the pipeline to optimize for speed or cost. > [!NOTE] > > Pipelines are created and configured in the Dune web application. The API endpoints allow you to execute and monitor existing pipelines programmatically. # Archive Query Source: https://docs.dune.com/api-reference/queries/endpoint/archive POST /v1/query/{queryId}/archive This API allows for anyone to archive a query. Only the API key generated under the context of the owner of that query will work. This does not delete the query, but will make it uneditable/unexecutable > [!NOTE] > > Minimum required API key scope: `Read/Write` > [!TIP] > > In Dune context, delete action is replaced by archive as deletion of queries is not possible. > [!NOTE] > > To access Query endpoints, an [Analyst plan](https://dune.com/pricing) or higher is required. ```bash cURL theme={null} curl --request POST \ --url https://api.dune.com/api/v1/query/{queryId}/archive \ --header 'X-DUNE-API-KEY: ' ``` ```python Python SDK theme={null} from dune_client.client import DuneClient dune = DuneClient() query = dune.archive_query(1252207) ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/query/{queryId}/archive" headers = {"X-DUNE-API-KEY": ""} response = requests.request("POST", url, headers=headers) print(response.text) ``` ```javascript JavaScript theme={null} const options = {method: 'POST', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/query/{queryId}/archive', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/query/{queryId}/archive" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/query/{queryId}/archive", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.post("https://api.dune.com/api/v1/query/{queryId}/archive") .header("X-DUNE-API-KEY", "") .asString(); ``` # Create Query Source: https://docs.dune.com/api-reference/queries/endpoint/create POST /v1/query This API allows for anyone to create a query. The owner of the query will be under the context of the API key. > [!NOTE] > > Minimum required API key scope: `Read/Write` > [!NOTE] > > To access Query endpoints, an [Analyst plan](https://dune.com/pricing) or higher is required. ```bash cURL theme={null} curl --request POST \ --url https://api.dune.com/api/v1/query \ --header 'Content-Type: application/json' \ --header 'X-DUNE-API-KEY: ' \ --data '{ "name": "erc20 balances (user address) API", "description": "Example Blockchain Query", "parameters": [ { "key": "address", "value": "0x2ae8c972fb2e6c00dded8986e2dc672ed190da06", "type": "text" }, { "key": "blocknumber", "value": "0", "type": "number" }, { "key": "chain", "value": "ethereum", "type": "enum", "enumOptions": [ "ethereum", "polygon", "optimism", "arbitrum", "avalanche_c", "gnosis", "bnb" ] } ], "query_sql": "SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}", "is_private": true }' ``` ```python Python SDK theme={null} from dune_client.types import QueryParameter from dune_client.client import DuneClient from dune_client.query import QueryBase dune = DuneClient() query = dune.create_query( name="Example Blockchain Query", query_sql="SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}", params=[ QueryParameter.number_type(name="blocknumber", value=0), QueryParameter.text_type(name="address", value="0x2ae8c972fb2e6c00dded8986e2dc672ed190da06"), QueryParameter.text_type(name="blockchain", value="ethereum"), ], is_private=False ) ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/query" payload = { "name": "erc20 balances (user address) API", "description": "Example Blockchain Query", "parameters": [ { "key": "address", "value": "0x2ae8c972fb2e6c00dded8986e2dc672ed190da06", "type": "text" }, { "key": "blocknumber", "value": "0", "type": "number" }, { "key": "chain", "value": "ethereum", "type": "enum", "enumOptions": ["ethereum", "polygon", "optimism", "arbitrum", "avalanche_c", "gnosis", "bnb"] } ], "query_sql": "SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}", "is_private": True } headers = { "X-DUNE-API-KEY": "", "Content-Type": "application/json" } response = requests.request("POST", url, json=payload, headers=headers) print(response.text) ``` ```javascript JavaScript theme={null} const options = { method: 'POST', headers: {'X-DUNE-API-KEY': '', 'Content-Type': 'application/json'}, body: '{"name":"erc20 balances (user address) API","description":"Example Blockchain Query","parameters":[{"key":"address","value":"0x2ae8c972fb2e6c00dded8986e2dc672ed190da06","type":"text"},{"key":"blocknumber","value":"0","type":"number"},{"key":"chain","value":"ethereum","type":"enum","enumOptions":["ethereum","polygon","optimism","arbitrum","avalanche_c","gnosis","bnb"]}],"query_sql":"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}","is_private":true}' }; fetch('https://api.dune.com/api/v1/query', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.dune.com/api/v1/query" payload := strings.NewReader("{\n \"name\": \"erc20 balances (user address) API\",\n \"description\": \"Example Blockchain Query\",\n \"parameters\": [\n {\n \"key\": \"address\",\n \"value\": \"0x2ae8c972fb2e6c00dded8986e2dc672ed190da06\",\n \"type\": \"text\"\n },\n {\n \"key\": \"blocknumber\",\n \"value\": \"0\",\n \"type\": \"number\"\n },\n {\n \"key\": \"chain\",\n \"value\": \"ethereum\",\n \"type\": \"enum\",\n \"enumOptions\": [\n \"ethereum\",\n \"polygon\",\n \"optimism\",\n \"arbitrum\",\n \"avalanche_c\",\n \"gnosis\",\n \"bnb\"\n ]\n }\n ],\n \"query_sql\": \"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\",\n \"is_private\": true\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("X-DUNE-API-KEY", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/query", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\n \"name\": \"erc20 balances (user address) API\",\n \"description\": \"Example Blockchain Query\",\n \"parameters\": [\n {\n \"key\": \"address\",\n \"value\": \"0x2ae8c972fb2e6c00dded8986e2dc672ed190da06\",\n \"type\": \"text\"\n },\n {\n \"key\": \"blocknumber\",\n \"value\": \"0\",\n \"type\": \"number\"\n },\n {\n \"key\": \"chain\",\n \"value\": \"ethereum\",\n \"type\": \"enum\",\n \"enumOptions\": [\n \"ethereum\",\n \"polygon\",\n \"optimism\",\n \"arbitrum\",\n \"avalanche_c\",\n \"gnosis\",\n \"bnb\"\n ]\n }\n ],\n \"query_sql\": \"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\",\n \"is_private\": true\n}", CURLOPT_HTTPHEADER => [ "Content-Type: application/json", "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.post("https://api.dune.com/api/v1/query") .header("X-DUNE-API-KEY", "") .header("Content-Type", "application/json") .body("{\n \"name\": \"erc20 balances (user address) API\",\n \"description\": \"Example Blockchain Query\",\n \"parameters\": [\n {\n \"key\": \"address\",\n \"value\": \"0x2ae8c972fb2e6c00dded8986e2dc672ed190da06\",\n \"type\": \"text\"\n },\n {\n \"key\": \"blocknumber\",\n \"value\": \"0\",\n \"type\": \"number\"\n },\n {\n \"key\": \"chain\",\n \"value\": \"ethereum\",\n \"type\": \"enum\",\n \"enumOptions\": [\n \"ethereum\",\n \"polygon\",\n \"optimism\",\n \"arbitrum\",\n \"avalanche_c\",\n \"gnosis\",\n \"bnb\"\n ]\n }\n ],\n \"query_sql\": \"SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\",\n \"is_private\": true\n}") .asString(); ``` # Get Query Pipeline Source: https://docs.dune.com/api-reference/queries/endpoint/get-query-pipeline GET /v1/query/{query_id}/pipeline Builds a query pipeline from the specified query and returns the pipeline definition containing all the nested materialized views that the query depends on. A pipeline allows you to chain multiple queries together and execute them as a single unit. > [!NOTE] > > Minimum required API key scope: `Read` Retrieve the pipeline definition for a specific query, including all nested materialized views that the query depends on. ## Overview This endpoint returns the pipeline structure that would be executed for a given query, allowing you to inspect the lineage and execution order before running the pipeline. This is useful for understanding dependencies and planning pipeline executions. The pipeline definition contains all the nodes (queries and materialized view refreshes) in the correct dependency order. > [!NOTE] > > The `query_parameters` should be passed as a URL-encoded JSON string in the query parameter, where keys are parameter names and values are parameter values. ## Use Cases ### Inspect Pipeline Before Execution Check what queries and materialized views will be executed: ```bash theme={null} curl "https://api.dune.com/api/v1/query/3493826/pipeline?performance=medium" \ -H "X-Dune-Api-Key: $DUNE_API_KEY" ``` ### Validate Dependencies with Parameters Understand query dependencies before running a pipeline with specific parameters: ```bash theme={null} # Query parameters as JSON string curl "https://api.dune.com/api/v1/query/3493826/pipeline?performance=large&query_parameters=%7B%22blockchain%22%3A%22ethereum%22%7D" \ -H "X-Dune-Api-Key: $DUNE_API_KEY" ``` ## Response Structure The response contains a `pipeline` object with a `nodes` array. Each node represents either a query execution or materialized view refresh, along with its dependencies. Example response: ```json theme={null} { "pipeline": { "nodes": [ { "id": 1, "dependencies": [], "materialized_view_refresh": { "name": "dune.analyst.mv_base_data", "performance": "medium" } }, { "id": 2, "dependencies": [1], "query_execution": { "query_id": 3493826, "performance": "medium" } } ] } } ``` ## Best Practices > [accordion] Use Before Pipeline Execution > > Call this endpoint before executing a pipeline to understand what will be executed and in what order. This helps with planning and cost estimation. > [accordion] Validate Complex Dependencies > > For queries with many dependencies, use this endpoint to visualize the execution graph and identify potential bottlenecks. > [accordion] Test with Parameters > > When using query parameters, test the pipeline structure with different parameter values to ensure the lineage is resolved correctly. ## Related Endpoints * [Execute Query Pipeline](/api-reference/executions/endpoint/execute-query-pipeline) - Execute a query's pipeline * [Execute Pipeline](/api-reference/pipelines/endpoint/execute-pipeline) - Execute a pipeline based on lineage * [Get Pipeline Status](/api-reference/pipelines/endpoint/get-pipeline-status) - Check pipeline execution status # List Queries Source: https://docs.dune.com/api-reference/queries/endpoint/list GET /v1/queries Retrieve a paginated list of queries owned by the account tied to the API key > [!NOTE] > > Minimum required API key scope: `Read` > [!NOTE] > > To access Query endpoints, an [Analyst plan](https://dune.com/pricing) or higher is required. Retrieve a paginated list of queries owned by the account associated with the API key. This endpoint is useful for: * Discovering all queries in your account * Building custom query management interfaces * Auditing query ownership and metadata * Syncing query information to external systems ## Response The endpoint returns a list of query overview objects containing: * `id`: Unique identifier of the query * `name`: Name of the query * `description`: Description of the query * `owner`: Owner handle (username or team handle) * `tags`: Tags associated with the query * `created_at`: Timestamp of when the query was created * `updated_at`: Timestamp of when the query was last updated * `total`: Total number of queries available (for pagination) ## Pagination Use the `limit` and `offset` parameters to paginate through large result sets: * `limit`: Number of queries to return per page (default: 20) * `offset`: Number of queries to skip (default: 0) ```bash cURL theme={null} curl --request GET \ --url 'https://api.dune.com/api/v1/queries?limit=20&offset=0' \ --header 'X-DUNE-API-KEY: ' ``` ```python Python SDK theme={null} from dune_client.client import DuneClient dune = DuneClient() # List all queries (first page) queries = dune.list_queries(limit=20, offset=0) print(f"Total queries: {queries['total']}") for query in queries['queries']: print(f"Query {query['id']}: {query['name']}") ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/queries" params = { "limit": 20, "offset": 0 } headers = {"X-DUNE-API-KEY": ""} response = requests.get(url, headers=headers, params=params) data = response.json() print(f"Total queries: {data['total']}") for query in data['queries']: print(f"Query {query['id']}: {query['name']}") ``` ```javascript JavaScript theme={null} const url = new URL('https://api.dune.com/api/v1/queries'); url.searchParams.append('limit', '20'); url.searchParams.append('offset', '0'); const options = { method: 'GET', headers: {'X-DUNE-API-KEY': ''} }; fetch(url, options) .then(response => response.json()) .then(data => { console.log(`Total queries: ${data.total}`); data.queries.forEach(query => { console.log(`Query ${query.id}: ${query.name}`); }); }) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/queries?limit=20&offset=0" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/queries?limit=20&offset=0", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.get("https://api.dune.com/api/v1/queries?limit=20&offset=0") .header("X-DUNE-API-KEY", "") .asString(); ``` # Private Query Source: https://docs.dune.com/api-reference/queries/endpoint/private POST /v1/query/{queryId}/private This API allows for anyone to private a query. Only the API key generated under the context of the owner of that query will work. > [!NOTE] > > Minimum required API key scope: `Read/Write` > [!NOTE] > > To access Query endpoints, an [Analyst plan](https://dune.com/pricing) or higher is required. ```bash cURL theme={null} curl --request POST \ --url https://api.dune.com/api/v1/query/{queryId}/private \ --header 'X-DUNE-API-KEY: ' ``` ```python Python SDK theme={null} from dune_client.client import DuneClient dune = DuneClient() query = dune.private_query(1252207) ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/query/{queryId}/private" headers = {"X-DUNE-API-KEY": ""} response = requests.request("POST", url, headers=headers) print(response.text) ``` ```javascript JavaScript theme={null} const options = {method: 'POST', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/query/{queryId}/private', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/query/{queryId}/private" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/query/{queryId}/private", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.post("https://api.dune.com/api/v1/query/{queryId}/private") .header("X-DUNE-API-KEY", "") .asString(); ``` # Overview Source: https://docs.dune.com/api-reference/queries/endpoint/query-object These query management endpoints help you programmatically create and manage Dune SQL queries via the API, ideal for integration with GitHub or other CI/CD pipelines. ### Queries Queries all have a `query id` which is returned when you read/create a query. You can also find it within a url, i.e. `https://dune.com/queries//`. Each query comes with fields you can edit such as: * `name`: query name text * `description`: query description text * `query_sql`: the raw sql text * `params`: parameters within the query, using the `{{ foo }}` syntax. See the section below for more details. * `is_private`: boolean for if query is private or not. Private queries cannot be found or queried by others. * `archived`: boolean for if query is archived or not. Archived queries cannot be run or edited by anyone. ### Query Parameters There are four kinds of parameters you can use in a Dune query (these are not API parameters). * number * text * date * enum (called a list in the UI) For passing these parameters through the API request body, you can use the following format for executions: ```json theme={null} { "foo": "value", "bar":1000, "baz": "2020-12-01T01:20:30Z" } ``` Where "foo", "bar", and "baz" are three params in a query. If you leave one out, it goes with the default param value. For Queries endpoints, you'll need to define the type and more: ```json theme={null} [ { "key": "block_time_start", "type": "datetime", "value": "2017-01-01 00:00:00" }, { "key": "from", "type": "text", "value": "0xae2fc483527b8ef99eb5d9b44875f005ba1fae13" }, { "key": "limit", "type": "number", "value": "20" }, { "key": "type", "type": "enum", "value": "DynamicFee", "enumOptions": [ "DynamicFee", "Legacy" ] } ] ``` Note that the `datetime` parameter type requires you use the syntax `timestamp '{{block_time_start}}'` to cast the parameter to a timestamp. If you are using bytearrays/binary (`0x1234...`), then you will still pass it as text through the API but ensure your SQL text puts the parameter without any quotes around it. > [!TIP] > > If you're using the Dune Python SDK, check out the [sdk doc page](/api-reference/overview/sdks) for an example. ## Endpoints | Endpoint Title | Endpoint | Description | | - | - | - | | [List Queries](./list) | `GET /v1/queries` | Retrieves a paginated list of queries | | [Get Query Pipeline](./get-query-pipeline) | `GET /v1/query/{query_id}/pipeline` | Retrieves the pipeline definition for a query, including dependencies and execution order | | [Read Query](./read) | `GET /v1/query/{query_id}` | Fetches details of a specific query by ID | | [Create Query](./create) | `POST /v1/query` | Creates a new query with specified parameters | | [Update Query](./update) | `PATCH /v1/query/{query_id}` | Updates an existing query's properties | | [Archive Query](./archive) | `PATCH /v1/query/{query_id}/archive` | Archives a query, preventing it from being run or edited | | [Unarchive Query](./unarchive) | `PATCH /v1/query/{query_id}/unarchive` | Unarchives a previously archived query | | [Make Query Private](./private) | `PATCH /v1/query/{query_id}/private` | Makes a query private, restricting access | | [Make Query Public](./unprivate) | `PATCH /v1/query/{query_id}/unprivate` | Makes a private query public | # Read Query Source: https://docs.dune.com/api-reference/queries/endpoint/read GET /v1/query/{queryId} This API allows for anyone to read the sql text, parameters, name, tags, and state of a query. For private queries, only the API key generated under the context of the owner of that query will work. > [!NOTE] > > Minimum required API key scope: `Read` > [!NOTE] > > To access Query endpoints, an [Analyst plan](https://dune.com/pricing) or higher is required. ```bash cURL theme={null} curl --request GET \ --url https://api.dune.com/api/v1/query/{queryId} \ --header 'X-DUNE-API-KEY: ' ``` ```python Python SDK theme={null} from dune_client.client import DuneClient dune = DuneClient() query = dune.get_query(1252207) ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/query/{queryId}" headers = {"X-DUNE-API-KEY": ""} response = requests.request("GET", url, headers=headers) print(response.text) ``` ```javascript JavaScript theme={null} const options = {method: 'GET', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/query/{queryId}', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/query/{queryId}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/query/{queryId}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.get("https://api.dune.com/api/v1/query/{queryId}") .header("X-DUNE-API-KEY", "") .asString(); ``` # Unarchive Query Source: https://docs.dune.com/api-reference/queries/endpoint/unarchive POST /v1/query/{queryId}/unarchive This API allows for anyone to unarchive a query. Only the API key generated under the context of the owner of that query will work. > [!NOTE] > > Minimum required API key scope: `Read/Write` > [!NOTE] > > To access Query endpoints, an [Analyst plan](https://dune.com/pricing) or higher is required. > [!TIP] > > In Dune context, delete action is replaced by archive as deletion of queries is not possible. ```bash cURL theme={null} curl --request GET \ --url https://api.dune.com/api/v1/query/{queryId}/unarchive \ --header 'X-DUNE-API-KEY: ' ``` ```python Python SDK theme={null} from dune_client.client import DuneClient dune = DuneClient() query = dune.unarchive_query(1252207) ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/query/{queryId}/unarchive" headers = {"X-DUNE-API-KEY": ""} response = requests.request("GET", url, headers=headers) print(response.text) ``` ```javascript JavaScript theme={null} const options = {method: 'GET', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/query/{queryId}/unarchive', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/query/{queryId}/unarchive" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/query/{queryId}/unarchive", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.get("https://api.dune.com/api/v1/query/{queryId}/unarchive") .header("X-DUNE-API-KEY", "") .asString(); ``` # Unprivate Query Source: https://docs.dune.com/api-reference/queries/endpoint/unprivate POST /v1/query/{queryId}/unprivate This API allows for anyone to unprivate a query. Only the API key generated under the context of the owner of that query will work. > [!NOTE] > > Minimum required API key scope: `Read/Write` > [!NOTE] > > To access Query endpoints, an [Analyst plan](https://dune.com/pricing) or higher is required. ```bash cURL theme={null} curl --request POST \ --url https://api.dune.com/api/v1/query/{queryId}/unprivate \ --header 'X-DUNE-API-KEY: ' ``` ```python Python SDK theme={null} from dune_client.client import DuneClient dune = DuneClient() query = dune.unprivate_query(1252207) ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/query/{queryId}/unprivate" headers = {"X-DUNE-API-KEY": ""} response = requests.request("POST", url, headers=headers) print(response.text) ``` ```javascript JavaScript theme={null} const options = {method: 'POST', headers: {'X-DUNE-API-KEY': ''}}; fetch('https://api.dune.com/api/v1/query/{queryId}/unprivate', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/query/{queryId}/unprivate" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("X-DUNE-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/query/{queryId}/unprivate", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.post("https://api.dune.com/api/v1/query/{queryId}/unprivate") .header("X-DUNE-API-KEY", "") .asString(); ``` # Update Query Source: https://docs.dune.com/api-reference/queries/endpoint/update PATCH /v1/query/{queryId} This API allows for anyone to update the sql text, parameters, name, tags, and state of a query. Only the API key generated under the context of the owner of that query will work. > [!NOTE] > > Minimum required API key scope: `Read/Write` > [!NOTE] > > To access Query endpoints, an [Analyst plan](https://dune.com/pricing) or higher is required. ```bash cURL theme={null} curl --request PATCH \ --url https://api.dune.com/api/v1/query/{queryId} \ --header 'Content-Type: application/json' \ --header 'X-DUNE-API-KEY: ' \ --data '{ "query_id": 1252207, "query_sql": "SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}", }' ``` ```python Python SDK theme={null} from dune_client.types import QueryParameter from dune_client.client import DuneClient from dune_client.query import QueryBase dune = DuneClient() query = dune.update_query( query_sql="SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}" ) ``` ```python Python theme={null} curl --request PATCH \ --url https://api.dune.com/api/v1/query/{queryId} \ --header 'Content-Type: application/json' \ --header 'X-DUNE-API-KEY: ' \ --data '{ "query_id": 1252207, "query_sql": "{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}" }' ``` ```javascript JavaScript theme={null} const options = { method: 'PATCH', headers: {'X-DUNE-API-KEY': '', 'Content-Type': 'application/json'}, body: '{"query_id":1252207,"query_sql":"{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}"}' }; fetch('https://api.dune.com/api/v1/query/{queryId}', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/query/{queryId}" payload := strings.NewReader("{\n \"query_id\": 1252207,\n ,\n \"query_sql\": \"{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("X-DUNE-API-KEY", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/query/{queryId}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PATCH", CURLOPT_POSTFIELDS => "{\n \"query_id\": 1252207,\n \"query_sql\": \"{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}", CURLOPT_HTTPHEADER => [ "Content-Type: application/json", "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.patch("https://api.dune.com/api/v1/query/{queryId}") .header("X-DUNE-API-KEY", "") .header("Content-Type", "application/json") .body("{\n \"query_id\": 1252207,\n \"query_sql\": \"{{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}\"}") .asString(); ``` # Query Management Source: https://docs.dune.com/api-reference/quickstart/queries-eg In this quickstart, we will walk through how to turn any dashboard (or set of queries) into a GitHub repository that uses our query management API. ### Set up a new repo from the GitHub template Use [this GitHub template](https://github.com/duneanalytics/DuneQueryRepo) to create your own repository, then follow these steps: 1. Generate an API key from your Dune account and put that in both your `.env` file and [github action secrets](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) (name it `DUNE_API_KEY`). You can create a key under your Dune team settings. *The api key must be from a plus plan for this repo to work.* 2. Type your intended query ids into the `queries.yml` file. The id can be found from the link `https://dune.com/queries//...`. If you're creating this for a dashboard, go to the dashboard you want to create a repo and click on the "github" button in the top right of your dashboard to see the query ids. 3. Then, run `pull_from_dune.py` to bring in all queries into `/query_{id}.sql` files within the `/queries` folder. Directions to setup and run this python script are below. ### Updating Queries or CSV Tables 1. Make any changes you need to directly in the repo. Any time you push a commit to MAIN branch, `push_to_dune.py` will save your changes into Dune directly. You can run this manually too if you want. 2. For CSVs, update the files in the `/uploads` folder. `upload_to_dune.py` will run on commit, or can be run manually. The table name in Dune will be `dune.team_name.dataset_`. > [!TIP] > > You can press the "github" button on your own dashboard to get a list of query ids, or you can just paste in any query ids yourself. The query id comes from the url, `dune.com/queries//`. Anytime you commit a change to the repo, it will now update your queries in the app too. You can run `pull_from_dune.py` anytime to update the repo with any changes from the app. # Execution & Results Source: https://docs.dune.com/api-reference/quickstart/results-eg In this quickstart, we will walk through how to fetch Dune data in Python. > [!NOTE] > > ⌨️ For a quickstart on TypeScript, please [download Dune TypeScript SDK](https://github.com/bh2smith/ts-dune-client?tab=readme-ov-file) and [follow this demo project](https://github.com/bh2smith/demo-ts-dune-client). ### Prerequisites * Python environment set up (check out [uv](https://github.com/astral-sh/uv) if you want somewhere to start.) * Have a Dune API key from the team/user who's queries you want to manage (to obtain one [follow the steps here](../overview/authentication#generate-an-api-key)) ### Step 1: Prepare your Dune query Have a Dune query you'd like to pull data from. Here, we'll use [this query](https://dune.com/queries/3373921/5660178) to get the DAI token balance for vitalik.eth. ### Step 2: Install Dune Python SDK Ensure the [Dune Python SDK](https://pypi.org/project/dune-client/) is installed in your environment. You can install it using pip: ``` pip install dune-client ``` ### Step 3: Get data from Dune query #### Set up a Dune Python client The API key might either be supplied in the constructor or read through environment variables. The follow env variables might be supplied: `DUNE_API_KEY`, `DUNE_API_BASE_URL`, `DUNE_API_REQUEST_TIMEOUT`. ```python theme={null} from dune_client.client import DuneClient dune = DuneClient( api_key='', base_url="https://api.dune.com", request_timeout=300 ) ``` #### Get query result You can choose to either get the latest query result without triggering an execution or to trigger an execution and get the result to ensure freshest data. > [tab] Get latest result without execution > > ```python theme={null} > query_result = dune.get_latest_result(3373921) # get latest result in json format > # query_result = dune.get_latest_result_dataframe(3373921) # get latest result in Pandas dataframe format > ``` > [tab] Query a query > > ```python theme={null} > query = QueryBase( > query_id=3373921, > > # uncomment and change the parameter values if needed > # params=[ > # QueryParameter.text_type(name="contract", value="0x6B175474E89094C44Da98b954EedeAC495271d0F"), # default is DAI > # QueryParameter.text_type(name="owner", value="owner"), # default using vitalik.eth's wallet > # ], > ) > > query_result = dune.run_query_dataframe( > query=query > # , ping_frequency = 10 # uncomment to change the seconds between checking execution status, default is 1 second > # , performance="large" # uncomment to run query on large engine, default is medium > # , batch_size = 5_000 # uncomment to change the maximum number of rows to retrieve per batch of results, default is 32_000 > ) > > # Note: to get the result in csv format, call run_query_csv(); for json format, call run_query(). > ``` > [!NOTE] > > * To paginate query results, please visit the [pagination page](../executions/pagination) to get more info. > * If you are using the [Python SDK](https://github.com/duneanalytics/dune-client/tree/main): > * For [higher level functions](https://github.com/duneanalytics/dune-client/blob/main/dune_client/api/extensions.py) like `run_query()`, pagination is handled for you automatically behind the scene, so you will get the entire dataset as the returned result. You can pass in parameter `batch_size` to define the maximum number of rows per batch or pagination call. > * For [lower level functions](https://github.com/duneanalytics/dune-client/blob/main/dune_client/api/execution.py) like `get_execution_results()`, you can pass in pagination parameters `limit` and `offset` directly, as instructed [here](../executions/pagination#pagination-parameters). ### Putting it all together ```python theme={null} from dune_client.client import DuneClient from dune_client.query import QueryBase # setup Dune Python client dune = DuneClient() # get the latest executed result without triggering a new execution query_result = dune.get_latest_result(3373921) # get latest result in json format # query the query (execute and get latest result) query = QueryBase( query_id=3373921, # uncomment and change the parameter values if needed # params=[ # QueryParameter.text_type(name="contract", value="0x6B175474E89094C44Da98b954EedeAC495271d0F"), # default is DAI # QueryParameter.text_type(name="owner", value="owner"), # default using vitalik.eth's wallet # ], ) query_result = dune.run_query_dataframe( query=query # , ping_frequency = 10 # uncomment to change the seconds between checking execution status, default is 1 second # , performance="large" # uncomment to run query on large engine, default is medium # , batch_size = 5_000 # uncomment to change the maximum number of rows to retrieve per batch of results, default is 32_000 ) ``` # Tables Management Source: https://docs.dune.com/api-reference/quickstart/tables-eg In this quickstart, we will walk through how to upload a CSV file to Dune via Python. ### Upload the CSV Follow below steps to upload your CSV. ```python theme={null} from dune_client.client import DuneClient # setup Dune Python client dune = DuneClient() # define path to your CSV file csv_file_path = '' with open(csv_file_path) as open_file: data = open_file.read() table = dune.upload_csv( data=str(data), description="Data about 80 cereals, sourced from https://www.kaggle.com/datasets/crawford/80-cereals", table_name="cereal_table", # define your table name here is_private=False ) ``` Once the upload is successful, you will see the data show up under [Your Data](https://dune.com/queries?category=uploaded_data) in the Data Explorer. You can query your uploaded table under the name `dune..dataset_
`. For example, here I defined the table name to be "cereal_table" and my team name is "dune", so to access the uploaded table we will do `select * from dune.dune.dataset_cereal_table` For more information on upload endpoint, please [visit this page](../tables/endpoint/upload). # Delete Dashboard Schedule Source: https://docs.dune.com/api-reference/schedules/endpoint/delete-dashboard DELETE /v1/dashboards/{dashboard_id}/schedule Stop refreshing a dashboard on a schedule. Returns deleted false when the dashboard has no schedule. > [!NOTE] > > Minimum required API key scope: `Read/Write` # Use Cases * **Stop Credit Use**: Stop refreshing a dashboard that no longer needs fresh data. * **Safe Retries**: When the dashboard has no schedule, the call returns `deleted: false` and not an error. # Delete Query Schedule Source: https://docs.dune.com/api-reference/schedules/endpoint/delete-query DELETE /v1/queries/{query_id}/schedule Stop running a saved query on a schedule. Alerts that depend on the schedule are deleted with it. Returns deleted false when the query has no schedule. > [!NOTE] > > Minimum required API key scope: `Read/Write` # Use Cases * **Stop Credit Use**: Stop a query that no longer needs to run. * **Safe Retries**: When the query has no schedule, the call returns `deleted: false` and not an error. > [!WARNING] > > Alerts that use the schedule are deleted with it. # List Schedules Source: https://docs.dune.com/api-reference/schedules/endpoint/list GET /v1/schedules List the schedules owned by the API key's account: scheduled query runs, scheduled dashboard refreshes, and materialized view refreshes. A schedule belongs to the owner of its query or dashboard. > [!NOTE] > > Minimum required API key scope: `Read` # Use Cases * **Audit Credit Use**: See every schedule, with its frequency and performance tier, in one call. * **Read Before You Change**: Get the current settings of a schedule before a `PUT`, because a `PUT` replaces all of them. * **Find Expiring Schedules**: Each schedule returns its `expires_at` and `next_execution_time`. # Set Dashboard Schedule Source: https://docs.dune.com/api-reference/schedules/endpoint/set-dashboard PUT /v1/dashboards/{dashboard_id}/schedule Refresh the queries of a dashboard on a schedule. Creates the schedule, or replaces all the settings of the one the dashboard has. Every refresh is charged credits at the chosen performance tier. You need to own the dashboard or be an editor or admin of the team that owns it; a team API key can only schedule its own team's dashboards. > [!NOTE] > > Minimum required API key scope: `Read/Write` # Use Cases * **Keep a Dashboard Fresh**: Refresh all the queries of a dashboard on a schedule, so viewers see recent data. * **Change a Schedule**: Change the frequency or performance tier. The response has `created: false` when it replaced a schedule. # Set Query Schedule Source: https://docs.dune.com/api-reference/schedules/endpoint/set-query PUT /v1/queries/{query_id}/schedule Run a saved query on a schedule. Creates the schedule, or replaces all the settings of the one the query has. Every run is charged credits at the chosen performance tier. You need to own the query or be an editor or admin of the team that owns it; a team API key can only schedule its own team's queries. > [!NOTE] > > Minimum required API key scope: `Read/Write` # Use Cases * **Keep Results Fresh**: Run a query every few hours, then read the latest result without executing it yourself. * **Change a Schedule**: Change the frequency or performance tier. The response has `created: false` when it replaced a schedule. * **Safe Retries**: The call is idempotent. Sending the same settings again leaves one schedule with those settings. # Overview Source: https://docs.dune.com/api-reference/schedules/introduction Use the Schedules API to run saved queries and refresh dashboards on a schedule, from code or from an AI agent. List the schedules you can see, set a schedule on a query or a dashboard, and delete it. These are the same schedules you set in the [query scheduler](/web-app/query-editor/query-scheduler) in the Dune app, so a change made through the API appears in the app right away. The same operations are available as tools in the [Dune MCP server](/docs/agents/mcp). ## Use Cases * **AI Agents**: Let an agent keep the queries and dashboards it builds fresh, without a manual step in the app. * **Fresh Results for Apps**: Run a query on a schedule, then read its latest result with [Get Latest Query Result](/api-reference/executions/endpoint/get-query-result). * **Bulk Changes**: Move many schedules to a lower frequency or a smaller performance tier in one script. * **Cleanup**: Find and delete schedules you no longer need, to stop their credit use. ## Behavior * A query or a dashboard has at most one schedule. You address it by the query ID or the dashboard ID. * `PUT` creates the schedule, or replaces all the settings of the one that exists. Send every setting you want to keep. An omitted `expires_at` means no expiry date. * Every scheduled run costs credits at the chosen performance tier: `small`, `medium`, or `large`. The tier must be available to the API on the owner's plan. * The schedule belongs to the owner of the query or dashboard. You must own it, or be an editor or admin of the team that owns it. A team API key can only change its own team's content. * The owner's plan limits how many schedules it can have. When that limit is reached, `PUT` returns `402`. * On the free plan, a schedule expires after at most 3 months. A later or omitted `expires_at` is set to that limit. * Materialized view refreshes are listed, but you change them with the [Materialized Views API](/api-reference/materialized-views/overview). ## Cron Expressions Schedules use 5-part cron expressions in UTC. Only these forms are supported: | Expression | Runs | | - | - | | `*/15 * * * *`, `*/20 * * * *`, `*/30 * * * *` | Every 15, 20, or 30 minutes | | `0 * * * *` | Every hour | | `0 */N * * *`, with N one of 2, 3, 4, 6, 8, 12 | Every N hours | | `M H * * *` | Every day at H:M | | `M H * * D` | Every week on day D (0 is Sunday) at H:M | M is `0` or `30`, and H is `0` to `23`. Other expressions return `400`. > [card] [List Schedules](/api-reference/schedules/endpoint/list) > > List the query, dashboard, and materialized view schedules you can see. > [card] [Set Query Schedule](/api-reference/schedules/endpoint/set-query) > > Run a saved query on a schedule, or change its schedule. > [card] [Delete Query Schedule](/api-reference/schedules/endpoint/delete-query) > > Stop running a saved query on a schedule. > [card] [Set Dashboard Schedule](/api-reference/schedules/endpoint/set-dashboard) > > Refresh a dashboard on a schedule, or change its schedule. > [card] [Delete Dashboard Schedule](/api-reference/schedules/endpoint/delete-dashboard) > > Stop refreshing a dashboard on a schedule. # Go Source: https://docs.dune.com/api-reference/sdks/go Go SDK for Dune Data API We have a Go client available at [github.com/duneanalytics/duneapi-client-go](https://github.com/duneanalytics/duneapi-client-go). ## Installation To install the SDK, run the following command: ```bash theme={null} go get github.com/duneanalytics/duneapi-client-go ``` ## Quick Start Initialize the client and execute a query: ```go theme={null} package main import ( "fmt" "os" "github.com/duneanalytics/duneapi-client-go" ) func main() { // Initialize client with API key client := duneapi.New(os.Getenv("DUNE_API_KEY")) // Execute a query queryID := 1215383 results, err := client.ExecuteQuery(queryID) if err != nil { panic(err) } // Process results fmt.Printf("Got %d rows\n", len(results.Rows)) for _, row := range results.Rows { fmt.Printf("%+v\n", row) } } ``` ## Error Handling The Go client follows idiomatic Go error handling patterns: ```go theme={null} results, err := client.ExecuteQuery(queryID) if err != nil { // Handle error log.Printf("Error executing query: %v", err) return } // Use results fmt.Println(results) ``` ## Additional Resources > [card] [GitHub Repository](https://github.com/duneanalytics/duneapi-client-go) > > View source code and documentation > [card] [Go Package](https://pkg.go.dev/github.com/duneanalytics/duneapi-client-go) > > View on pkg.go.dev > [card] [Report Issues](https://github.com/duneanalytics/duneapi-client-go/issues) > > Report bugs or request features > [card] [API Reference](/api-reference/executions/execution-object) > > View full API documentation # Python Source: https://docs.dune.com/api-reference/sdks/python Official Python SDK for Dune Data API We currently support a [Python SDK](https://github.com/duneanalytics/dune-client) for working with our API. You'll find `Python SDK` snippets on all endpoint pages. If you want to go deeper into the code, check out [these files](https://github.com/duneanalytics/dune-client/tree/main/dune_client/api). ## Installation To install the SDK, run the following command in your terminal: ```bash theme={null} pip install dune-client ``` > [!WARNING] > > Be sure you are using the latest release. You can find all release versions [here](https://github.com/duneanalytics/dune-client/releases) - there may be code added to the repo that has not been put into a release yet. ## Quick Start Initialize the client with your API key: ```python theme={null} from dune_client.client import DuneClient # Initialize client dune = DuneClient(api_key="YOUR_API_KEY") ``` ## Working with Queries You will commonly work with the `QueryBase` class which can be created like this: ```python theme={null} from dune_client.query import QueryBase from dune_client.types import QueryParameter query = QueryBase( name="Sample Query", query_id=1215383, params=[ QueryParameter.text_type(name="TextField", value="Word"), QueryParameter.number_type(name="NumberField", value=3.1415926535), QueryParameter.date_type(name="DateField", value="2022-05-04 00:00:00"), QueryParameter.enum_type(name="EnumField", value="Option 1"), ], ) print("Results available at", query.url()) ``` The query object is defined as `QueryBase` and all properties can be found [in this file](https://github.com/duneanalytics/dune-client/blob/main/dune_client/query.py). ## Executing Queries Execute a query and get results: ```python theme={null} from dune_client.client import DuneClient from dune_client.query import QueryBase dune = DuneClient(api_key="YOUR_API_KEY") query = QueryBase( name="Sample Query", query_id=1215383, ) # Execute the query results = dune.run_query(query) ``` ## Working with Results Other classes such as execution results can be [found here](https://github.com/duneanalytics/dune-client/blob/main/dune_client/models.py#L244C7-L244C22), detailing operations like `ResultsResponse.get_rows()` for getting the data out of a GET request. ### Using Pandas DataFrames If you are trying to load data into a Pandas DataFrame, you can use the following function from the SDK: ```python theme={null} # Get results as a DataFrame results_df = dune.run_query_dataframe(query) ``` ## Additional Resources > [card] [GitHub Repository](https://github.com/duneanalytics/dune-client) > > View source code, examples, and full documentation > [card] [API Files](https://github.com/duneanalytics/dune-client/tree/main/dune_client/api) > > Explore the API implementation > [card] [Releases](https://github.com/duneanalytics/dune-client/releases) > > Check the latest release versions > [card] [Report Issues](https://github.com/duneanalytics/dune-client/issues) > > Report bugs or request features # TypeScript Source: https://docs.dune.com/api-reference/sdks/typescript TypeScript/JavaScript SDK for Dune Data API We have a community client that can be [found here](https://www.npmjs.com/package/@duneanalytics/client-sdk). ## Installation To install, run this command: ```bash theme={null} yarn add @duneanalytics/client-sdk ``` Or with npm: ```bash theme={null} npm install @duneanalytics/client-sdk ``` > [!NOTE] > > Currently this client only supports the execution based endpoints, and not Query Endpoints or uploads. ## Quick Start Initialize the client and run a query: ```typescript theme={null} import { QueryParameter, DuneClient } from "@duneanalytics/client-sdk"; const { DUNE_API_KEY } = process.env; const client = new DuneClient(DUNE_API_KEY ?? ""); const queryID = 1215383; const params = { query_parameters: [ QueryParameter.text("TextField", "Plain Text"), QueryParameter.number("NumberField", 3.1415926535), QueryParameter.date("DateField", "2022-05-04 00:00:00"), QueryParameter.enum("ListField", "Option 1"), ] }; client .runQuery(queryID, params) .then((executionResult) => console.log(executionResult.result?.rows)); ``` ## Working with Query Parameters The SDK provides helper functions for creating typed query parameters: * `QueryParameter.text(name, value)` - For text parameters * `QueryParameter.number(name, value)` - For number parameters * `QueryParameter.date(name, value)` - For date parameters * `QueryParameter.enum(name, value)` - For enum/list parameters ## Additional Resources > [card] [NPM Package](https://www.npmjs.com/package/@duneanalytics/client-sdk) > > View package on NPM > [card] [GitHub Repository](https://github.com/duneanalytics/ts-dune-client) > > View source code and documentation > [card] [Report Issues](https://github.com/duneanalytics/ts-dune-client/issues) > > Report bugs or request features > [card] [API Reference](/api-reference/executions/execution-object) > > View full API documentation # Migration Guide Source: https://docs.dune.com/api-reference/tables/endpoint/migration Migrate from deprecated /v1/table/* endpoints to /v1/uploads/* # Endpoint Migration Guide The table endpoints have been migrated from `/v1/table/*` to `/v1/uploads/*` for better discoverability and consistency. The old `/v1/table/*` endpoints are deprecated but remain functional until November 23, 2026. `GET /v1/tables` has already been removed. > [!WARNING] > > **Deprecated endpoints will be removed in a future version.** Please migrate > to the new endpoints as soon as possible. ## Endpoint Mapping | Old Endpoint (Deprecated) | New Endpoint | | - | - | | `POST /v1/table/create` | [`POST /v1/uploads`](./uploads-create) | | `POST /v1/table/:namespace/:table_name/insert` | [`POST /v1/uploads/:namespace/:table_name/insert`](./uploads-insert) | | `POST /v1/table/upload/csv` | [`POST /v1/uploads/csv`](./uploads-csv) | | `POST /v1/table/:namespace/:table_name/clear` | [`POST /v1/uploads/:namespace/:table_name/clear`](./uploads-clear) | | `DELETE /v1/table/:namespace/:table_name` | [`DELETE /v1/uploads/:namespace/:table_name`](./uploads-delete) | | `GET /v1/tables` (removed) | [`GET /v1/uploads`](./uploads-list) | ## What Changed? ### URL Structure All table management endpoints now use the `/v1/uploads` base path instead of `/v1/table` or `/v1/tables`. This change makes it clearer that these endpoints are specifically for managing uploaded tables. ## Migration Examples ### Create Table **Before:** ```bash theme={null} curl -X POST "https://api.dune.com/api/v1/table/create" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "namespace": "my_user", "table_name": "interest_rates", "schema": [ {"name": "date", "type": "timestamp"}, {"name": "rate", "type": "double"} ] }' ``` **After:** ```bash theme={null} curl -X POST "https://api.dune.com/api/v1/uploads" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "namespace": "my_user", "table_name": "interest_rates", "schema": [ {"name": "date", "type": "timestamp"}, {"name": "rate", "type": "double"} ] }' ``` ### Insert Data **Before:** ```bash theme={null} curl -X POST "https://api.dune.com/api/v1/table/my_user/interest_rates/insert" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" \ -H "Content-Type: text/csv" \ --upload-file data.csv ``` **After:** ```bash theme={null} curl -X POST "https://api.dune.com/api/v1/uploads/my_user/interest_rates/insert" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" \ -H "Content-Type: text/csv" \ --upload-file data.csv ``` ### Upload CSV **Before:** ```bash theme={null} curl -X POST "https://api.dune.com/api/v1/table/upload/csv" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "table_name": "my_table", "data": "col1,col2\nval1,val2", "is_private": false }' ``` **After:** ```bash theme={null} curl -X POST "https://api.dune.com/api/v1/uploads/csv" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "table_name": "my_table", "data": "col1,col2\nval1,val2", "is_private": false }' ``` ### Clear Table **Before:** ```bash theme={null} curl -X POST "https://api.dune.com/api/v1/table/my_user/interest_rates/clear" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" ``` **After:** ```bash theme={null} curl -X POST "https://api.dune.com/api/v1/uploads/my_user/interest_rates/clear" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" ``` ### Delete Table **Before:** ```bash theme={null} curl -X DELETE "https://api.dune.com/api/v1/table/my_user/interest_rates" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" ``` **After:** ```bash theme={null} curl -X DELETE "https://api.dune.com/api/v1/uploads/my_user/interest_rates" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" ``` ### List Tables **Before (removed):** ```bash theme={null} curl -X GET "https://api.dune.com/api/v1/tables?limit=10&offset=0" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" ``` **After:** ```bash theme={null} curl -X GET "https://api.dune.com/api/v1/uploads?limit=10&offset=0" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" ``` ## SDK Support ### Python SDK The Dune Python SDK will be updated to support the new endpoints. Check the [Python SDK documentation](https://github.com/duneanalytics/dune-client) for the latest version and migration guidance. ### TypeScript SDK The Dune TypeScript SDK will be updated to support the new endpoints. Check the [TypeScript SDK documentation](https://github.com/duneanalytics/dune-client-ts) for the latest version and migration guidance. ## Backward Compatibility `GET /v1/tables` has already been removed. The other `/v1/table/*` endpoints continue to function until November 23, 2026. However, we strongly recommend migrating to the new endpoints to ensure compatibility with future versions of the API. ## Timeline * **Backend Migration**: ✅ Complete * **Documentation Migration**: ✅ Complete * **Deprecation Period**: until November 23, 2026 * **Old Endpoint Removal**: **November 23, 2026** ## Need Help? If you encounter any issues during migration, please: * Check the [current endpoint documentation](./uploads-list) * Review the [API reference overview](./overview) * Contact [Dune support](mailto:support@dune.com) # Overview Source: https://docs.dune.com/api-reference/tables/endpoint/overview > [!NOTE] > > **Endpoint Migration Notice**: The table upload endpoints have been updated from `/v1/table/*` to `/v1/uploads/*`. The old `/v1/table/*` endpoints are deprecated but still fully functional and **will be removed on November 23, 2026**. `GET /v1/tables` has already been removed. **Request parameters and response bodies remain unchanged.** > > | Old Endpoint (Deprecated) | New Endpoint | > | - | - | > | `POST /v1/table/create` | `POST /v1/uploads` | > | `POST /v1/table/:namespace/:table_name/insert` | `POST /v1/uploads/:namespace/:table_name/insert` | > | `POST /v1/table/upload/csv` | `POST /v1/uploads/csv` | > | `POST /v1/table/:namespace/:table_name/clear` | `POST /v1/uploads/:namespace/:table_name/clear` | > | `DELETE /v1/table/:namespace/:table_name` | `DELETE /v1/uploads/:namespace/:table_name` | > | `GET /v1/tables` (removed) | `GET /v1/uploads` | > > For detailed migration examples, see the [Migration Guide](./migration). # Table Upload Methods: Two Approaches Dune provides two distinct methods for uploading data to create queryable tables. Each method serves different use cases and offers unique advantages and trade-offs. ## Method 1: CSV Upload - Simple but Inflexible The CSV upload method is the most straightforward way to get data into Dune, designed for users who want quick and easy data uploads without complex setup requirements. ### How It Works * **UI Upload**: Click "Upload Data" in Dune interface, select CSV file, name your table, add description, and save * **API Upload**: Use the [`/upload endpoint`](./uploads-csv) to programmatically upload CSV files * **Schema**: Automatically inferred from CSV data (no manual schema definition required) * **Table Naming**: Results in `dune.team_name.dataset_name` format ### Key Characteristics **Advantages:** * **Simplicity**: Minimal setup required - just upload and go * **User-Friendly**: Perfect for non-technical users * **Quick Start**: Immediate data availability for querying * **Automatic Processing**: Schema inference handles data types automatically * **Both UI and API**: Available through web interface or programmatic upload **Limitations:** * **Size Constraint**: Maximum 200MB file size limit * **No Incremental Updates**: Must replace entire table to update data * **Limited Control**: Cannot modify schema after upload * **File Format**: Only supports CSV format * **Inflexible Schema**: Stuck with automatically inferred data types * **No Append Operations**: Cannot add new rows to existing data ### Best Use Cases * Small to medium datasets (under 200MB) * One-time data uploads * Static datasets that don't need frequent updates * Prototyping and experimentation * Users without programming experience ### Credit Usage Free access is view-only and cannot upload data. Use an active trial or a paid plan. Trial accounts receive 2,500 total credits for up to 7 days. Adding a card places a hold for the plan amount, which is released if you cancel. See [how credits work](/resources/credits-billing/how-credits-work). * Analyst Plan: 1,000 data points per credit (4,000 credits total) * Plus Plan: 5,000 data points per credit (25,000 credits total) *** ## Method 2: Programmatic Table Management - Flexible but Complex The programmatic approach uses a combination of four API endpoints ([`create`](./uploads-create), [`insert`](./uploads-insert), [`clear`](./uploads-clear), [`delete`](./uploads-delete)) to provide full control over table lifecycle and data management. ### Core Operations #### 1. **Create Table** ([`POST /v1/uploads`](./uploads-create)) * Define table schema explicitly with column names, types, and nullability * Set table as public or private * Specify namespace and table name * **Cost**: 10 credits per successful table creation #### 2. **Insert Data** ([`POST /v1/uploads/:namespace/:table_name/insert`](./uploads-insert)) * Add new rows to existing tables * Support for incremental data loading * Append operations without replacing existing data * JSON payload with structured data #### 3. **Clear Data** ([`POST /v1/uploads/:namespace/:table_name/clear`](./uploads-clear)) * Remove all data from table while preserving schema * Useful for complete data refreshes * Table structure remains intact #### 4. **Delete Table** ([`DELETE /v1/uploads/:namespace/:table_name`](./uploads-delete)) * Permanently remove table and all its data * Complete cleanup operation * Irreversible action ### Key Characteristics **Advantages:** * **Full Control**: Complete management of table lifecycle * **Incremental Updates**: Add data without replacing existing content * **Large Data Support**: No 200MB size limitation * **Custom Schema**: Define exact data types, constraints, and structure * **Append Operations**: Add new rows while keeping existing data * **Flexible Updates**: Clear and refresh data as needed * **Programmatic**: Perfect for automated workflows and ETL pipelines * **Privacy Control**: Set tables as public or private **Limitations:** * **Complexity**: Requires more technical knowledge and setup * **Schema Management**: Must manually define and maintain schema * **Multiple API Calls**: Requires orchestration of multiple endpoints * **Higher Learning Curve**: More complex implementation * **Credit Consumption**: Table creation costs 10 credits ### Typical Workflow 1. **Create** table with defined schema 2. **Insert** initial data batch 3. **Insert** additional data as needed (append operations) 4. **Clear** table when full refresh is needed 5. **Insert** new complete dataset 6. **Delete** table when no longer needed ### Best Use Cases * Large datasets (over 200MB) * Frequently updated data requiring incremental loads * Production ETL pipelines * Applications needing precise schema control * Automated data workflows * Complex data structures with specific type requirements *** ## Comparison Matrix | Aspect | CSV Upload | Programmatic Management | | - | - | - | | **Complexity** | Low | High | | **Setup Time** | Minutes | Hours/Days | | **Size Limit** | 200MB | No limit | | **Schema Control** | Automatic | Manual definition | | **Update Method** | Replace entire table | Incremental appends | | **API Calls Required** | 1 | Multiple (2-4) | | **Learning Curve** | Minimal | Steep | | **Automation Friendly** | Limited | Excellent | | **Credit Cost** | Data points only | 10 credits + data points | | **Privacy Options** | Public/Private | Public/Private | | **Error Recovery** | Limited | Granular control | *** ## Decision Framework ### Choose CSV Upload When: * Dataset is under 200MB * Data updates are infrequent * Quick prototyping or one-off analysis * Non-technical user or minimal programming resources * Simple data structure with standard types * Time to market is critical ### Choose Programmatic Management When: * Dataset exceeds 200MB * Regular data updates required * Part of automated data pipeline * Need precise control over data types * Building production applications * Require incremental data loading * Complex data workflows with dependencies *** ## Implementation Considerations > [!NOTE] > > **Security & Authentication** > Both methods require: > > * Dune API key authentication > * Proper credential management > * Team/user context considerations **Performance & Scalability** * **CSV Upload**: Limited by file size and processing time * **Programmatic**: Scalable for large datasets, can handle concurrent operations **Monitoring & Maintenance** * **CSV Upload**: Minimal monitoring needed * **Programmatic**: Requires error handling, retry logic, and workflow orchestration **Cost Management** * Both methods consume credits based on data volume * Programmatic method has additional table creation costs * Consider credit consumption in high-frequency update scenarios *** ## Recommendation For most users starting with Dune, CSV upload provides an excellent entry point due to its simplicity and speed for smaller, static datasets. As data complexity and automation requirements grow, migrating to programmatic table management becomes advantageous for maintaining scalable, reliable data pipelines. The choice ultimately depends on your technical requirements, data volume, and update frequency. CSV upload excels in simplicity, while programmatic management provides the flexibility and control needed for enterprise-scale data operations. # Clear Data Source: https://docs.dune.com/api-reference/tables/endpoint/uploads-clear POST /v1/uploads/{namespace}/{table_name}/clear Removes all data from the specified uploaded table while preserving the table structure and schema. > [!NOTE] > > Minimum required API key scope: `Read/Write` The `Clear` endpoint removes all the data in the specified table, but does not delete the table. > [!TIP] > > **Migrating from the old API?** See the [Migration Guide](./migration) for help updating your code. ```bash curl theme={null} curl --request POST \ --url https://api.dune.com/api/v1/uploads/my_user/interest_rates/clear \ --header 'X-DUNE-API-KEY: ' ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/uploads/my_user/interest_rates/clear" headers = { "X-DUNE-API-KEY": "" } response = requests.request("POST", url, headers=headers) ``` # Create Table Source: https://docs.dune.com/api-reference/tables/endpoint/uploads-create POST /v1/uploads Creates an empty uploaded table that can be inserted into with the /insert endpoint. Each successful table creation consumes 10 credits. > [!NOTE] > > Minimum required API key scope: `Read/Write` The resulting table will be empty, and can be inserted into with the [/insert endpoint](./uploads-insert). > [!NOTE] > > * If a table already exists with the same name, the request will fail. > * Column names in the table can't start with a special character or a digit. > * Each successful table creation **consumes credits based on the table size created**. Minimum charge is 1 credit. > * To delete a table, you can go to `user settings (dune.com) -> data -> delete` or use the [/delete endpoint](./uploads-delete). > [!TIP] > > **Migrating from the old API?** See the [Migration Guide](./migration) for help updating your code. ## Schema You need to define the schema of your data by providing `schema` array of columns in the request. Each column has three parameters: **name**: the name of the field **type**: the data type of the field \[!NOTE] Dune supports [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp format **nullable**: if the column is nullable (true/false, true by default) ```bash curl theme={null} curl --request POST \ --url https://api.dune.com/api/v1/uploads \ --header 'X-DUNE-API-KEY: ' \ --header 'Content-Type: application/json' \ --data '{ "namespace":"my_user", "table_name":"interest_rates", "description": "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", "is_private": false, "schema": [{"name": "date", "type": "timestamp"}, {"name": "dgs10", "type": "double", "nullable": true}] }' ``` ```python Python SDK theme={null} from dune_client.client import DuneClient dune = DuneClient() table = dune.create_table( namespace="my_user", table_name="interest_rates", description="10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", schema= [ {"name": "date", "type": "timestamp"}, {"name": "dgs10", "type": "double", "nullable": True} ], is_private=False ) ``` ```typescript TS SDK theme={null} import { DuneClient, ColumnType } from "@duneanalytics/client-sdk"; client = new DuneClient(process.env.DUNE_API_KEY!); const result = await client.table.create({ namespace: "my_user", table_name: "interest_rates", schema: [ {"name": "date", "type": ColumnType.Timestamp}, {"name": "dgs10", "type": ColumnType.Double} ] }); ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/uploads" payload = { "namespace": "my_user", "table_name": "interest_rates", "description": "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", "schema": [{"name": "date", "type": "timestamp"}, {"name": "dgs10", "type": "double", "nullable": True}], "is_private": False } headers = { "X-DUNE-API-KEY": "", "Content-Type": "application/json" } response = requests.request("POST", url, json=payload, headers=headers) ``` ```javascript Javascript theme={null} const url = "https://api.dune.com/api/v1/uploads"; const payload = { "namespace": "my_user", "table_name": "interest_rates", "description": "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", "schema": [{"name": "date", "type": "timestamp"}, {"name": "dgs10", "type": "double", "nullable": true}], "is_private": false }; const headers = { "X-DUNE-API-KEY": "", "Content-Type": "application/json" }; fetch(url, { method: 'POST', headers: headers, body: JSON.stringify(payload) }) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` # Upload CSV Source: https://docs.dune.com/api-reference/tables/endpoint/uploads-csv POST /v1/uploads/csv Upload a CSV file to create a table with automatic schema inference. The size limit per upload is 500MB. Storage limits: 100MB (free), 1GB (analyst), 15GB (plus). > [!NOTE] > > Minimum required API key scope: `Read/Write` > [!WARNING] > > Consider using the [`/create`](./uploads-create) and [`/insert`](./uploads-insert) endpoints if you want more flexibility, performance, and the ability to append. > [!TIP] > > You can also upload CSV through the [Dune UI](https://dune.com/) by pressing the "create" dropdown. > > **Migrating from the old API?** See the [Migration Guide](./migration) for help updating your code. > [!NOTE] > > For working with uploads, keep in mind that: > > * File has to be \< 500 MB > * Column names in the table can't start with a special character or digits. > * Consumes credits based on the size of data uploaded. > * Free, Analyst, Plus: 3 credits per GB written, minimum charge is 1 credit > * If you upload to an existing table name, it will delete the old data and overwite it with your new data. Appends are only supported for the [`/create`](./uploads-create), [`/insert`](./uploads-insert) endpoints. > * To delete an upload table, you must go to `user settings (dune.com) -> data -> delete`. > > If you have larger datasets you want to upload, please [contact us here](https://docs.google.com/forms/d/e/1FAIpQLSekx61WzIh-MII18zRj1G98aJeLM7U0VEBqaa6pVk_DQ7lq6Q/viewform) ```bash curl theme={null} curl --request POST \ --url https://api.dune.com/api/v1/uploads/csv \ --header 'Content-Type: application/json' \ --header 'X-DUNE-API-KEY: ' \ --data '{ "data": "DATE,DGS10,\n2023-12-04,4.28,\n2023-12-05,4.18,\n2023-12-06,4.12,\n2023-12-07,4.14,\n2023-12-08,4.23,\n2023-12-11,4.23", "description": "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", "table_name": "ten_year_us_interest_rates", "is_private": false }' ``` ```python Python SDK theme={null} from dune_client.client import DuneClient dune = DuneClient() file_path = r'/data/example.csv' with open(file_path) as file: data = file.read() table = dune.upload_csv( data=str(data), description="10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", table_name="ten_year_us_interest_rates", is_private=False ) ``` ```typescript TS SDK theme={null} import * as fs from "fs/promises"; import { DuneClient, ContentType } from "@duneanalytics/client-sdk"; client = new DuneClient(process.env.DUNE_API_KEY!); const data = await fs.readFile("./sample_table_insert.csv"); const result = await client.table.uploadCsv({ table_name: "ten_year_us_interest_rates", description: "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", data, is_private: false, }); ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/uploads/csv" payload = { "data": "DATE,DGS10,\n2023-12-04,4.28,\n2023-12-05,4.18,\n2023-12-06,4.12,\n2023-12-07,4.14,\n2023-12-08,4.23,\n2023-12-11,4.23", "description": "10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10", "table_name": "ten_year_us_interest_rates", "is_private": False } headers = { "X-DUNE-API-KEY": "", "Content-Type": "application/json" } response = requests.request("POST", url, json=payload, headers=headers) print(response.text) ``` ```javascript Javascript theme={null} const options = { method: 'POST', headers: {'X-DUNE-API-KEY': '', 'Content-Type': 'application/json'}, body: '{"data":"DATE,DGS10,\n2023-12-04,4.28,\n2023-12-05,4.18,\n2023-12-06,4.12,\n2023-12-07,4.14,\n2023-12-08,4.23,\n2023-12-11,4.23","description":"10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10","table_name":"ten_year_us_interest_rates","is_private":false}' }; fetch('https://api.dune.com/api/v1/uploads/csv', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` ```go Go theme={null} package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.dune.com/api/v1/uploads/csv" payload := strings.NewReader("{\n \"data\": \"DATE,DGS10,\\n2023-12-04,4.28,\\n2023-12-05,4.18,\\n2023-12-06,4.12,\\n2023-12-07,4.14,\\n2023-12-08,4.23,\\n2023-12-11,4.23\",\n \"description\": \"10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10\",\n \"table_name\": \"ten_year_us_interest_rates\",\n \"is_private\": false\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("X-DUNE-API-KEY", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://api.dune.com/api/v1/uploads/csv", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{\n \"data\": \"DATE,DGS10,\\n2023-12-04,4.28,\\n2023-12-05,4.18,\\n2023-12-06,4.12,\\n2023-12-07,4.14,\\n2023-12-08,4.23,\\n2023-12-11,4.23\",\n \"description\": \"10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10\",\n \"table_name\": \"ten_year_us_interest_rates\",\n \"is_private\": false\n}", CURLOPT_HTTPHEADER => [ "Content-Type: application/json", "X-DUNE-API-KEY: " ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ``` ```java Java theme={null} HttpResponse response = Unirest.post("https://api.dune.com/api/v1/uploads/csv") .header("X-DUNE-API-KEY", "") .header("Content-Type", "application/json") .body("{\n \"data\": \"DATE,DGS10,\\n2023-12-04,4.28,\\n2023-12-05,4.18,\\n2023-12-06,4.12,\\n2023-12-07,4.14,\\n2023-12-08,4.23,\\n2023-12-11,4.23\",\n \"description\": \"10 year daily interest rates, sourced from https://fred.stlouisfed.org/series/DGS10\",\n \"table_name\": \"ten_year_us_interest_rates\",\n \"is_private\": false\n}") .asString(); ``` ### Upload via google sheet To automate the upload of a Google Sheet's contents to Dune via API, use the following Google Apps Script: ```javascript theme={null} function uploadToDune() { var apiKey = "YOUR_DUNE_API_KEY"; // Replace with your actual Dune API key, keep the quotes var tableName = "example_table"; // Update with your desired table name var description = "Example table description"; var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); var range = sheet.getDataRange(); var values = range.getValues(); // Convert data to CSV format var csvData = ""; for (var i = 0; i < values.length; i++) { csvData += values[i].join(",") + "\n"; } var payload = { data: csvData.trim(), description: description, table_name: tableName, is_private: false }; var options = { method: "post", contentType: "application/json", headers: { "X-DUNE-API-KEY": apiKey }, payload: JSON.stringify(payload) }; var response = UrlFetchApp.fetch("https://api.dune.com/api/v1/uploads/csv", options); Logger.log(response.getContentText()); } ``` Steps to Use: 1. Open your Google Sheet 2. Navigate to Extensions → Apps Script 3. Replace the script with the code above 4. Save and run uploadToDune 5. (Optional) For easier execution, you can assign this script to a button in your Google Sheet: * Click "Insert" in the Google Sheets menu * Select "Drawing" * Create a button shape and add text like "Upload to Dune" * Click "Save and Close" * Right-click the button and select "Assign script" * Enter "uploadToDune" as the function name 6. Clicking the button will now upload your active sheet's data to Dune! # Delete Table Source: https://docs.dune.com/api-reference/tables/endpoint/uploads-delete DELETE /v1/uploads/{namespace}/{table_name} Permanently deletes the specified uploaded table and all its data. > [!NOTE] > > Minimum required API key scope: `Read/Write` > [!NOTE] > > * You must be an admin to delete the table. > * You can also delete a table through `user settings (dune.com) -> data -> delete`. > * Deleting a table does not incur credits. > [!TIP] > > **Migrating from the old API?** See the [Migration Guide](./migration) for help updating your code. ```bash curl theme={null} curl --request DELETE \ --url https://api.dune.com/api/v1/uploads/my_user/interest_rates \ --header 'X-DUNE-API-KEY: ' ``` ```python Python SDK theme={null} from dune_client.client import DuneClient dune = DuneClient() table = dune.delete_table( namespace="my_user", table_name="interest_rates" ) ``` ```typescript TS SDK theme={null} import { DuneClient } from "@duneanalytics/client-sdk"; client = new DuneClient(process.env.DUNE_API_KEY!); const result = await client.table.delete({ namespace: "my_user", table_name: "interest_rates", }); ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/uploads/my_user/interest_rates" headers = { "X-DUNE-API-KEY": "" } response = requests.request("DELETE", url, headers=headers) ``` ```javascript Javascript theme={null} const url = "https://api.dune.com/api/v1/uploads/my_user/interest_rates"; const headers = { "X-DUNE-API-KEY": "" }; fetch(url, { method: 'DELETE', headers: headers }) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` # Insert Data Source: https://docs.dune.com/api-reference/tables/endpoint/uploads-insert POST /v1/uploads/{namespace}/{table_name}/insert Inserts data into an existing table. Accepts CSV (text/csv) or NDJSON (application/x-ndjson) content types. > [!NOTE] > > Minimum required API key scope: `Read/Write` To be able to insert into a table, it must have been created with the [/create endpoint](./uploads-create). > [!NOTE] > > * The data in the files must conform to the schema, and must use the same column names as the schema. > * One successful `/insert` request consumes credits based on the size of data inserted. > * Free, Analyst, Plus: 3 credits per GB written, minimum charge is 1 credit > * The maximum request size is 1.2GB > [!TIP] > > **Migrating from the old API?** See the [Migration Guide](./migration) for help updating your code. ## Consistency A request to this endpoint has two possible outcomes: Either all of the data in the request was inserted, or none of it was. It's not possible for parts of the request data to be inserted, while the rest is not inserted. In other words, please use and trust the status codes that the endpoint returns. A status code of 200 means that the data in the request was successfully inserted. If you get any other status code, you can safely retry your request after addressing the issue that the error message indicated. ## Concurrent requests A limited number of concurrent insertion requests per table is supported. However, there will be a slight performance penalty as we serialize the writes behind the scenes to ensure data integrity. Larger number of concurrent requests per table may result in an increased number of failures. Therefore, we recommend managing your requests within a 5-10 threshold to maintain optimal performance. ## Supported filetypes ### CSV files (`Content-Type: text/csv`) CSV files must use a comma as delimiter, and the column names in the header must match the column names of the table. ### JSON files (`Content-Type: application/x-ndjson`) These are files where each line is a complete JSON object which creates one table row. Each line must have keys that match the column names of the table. ## Data types DuneSQL supports a variety of types which are not natively supported in many data exchange formats. Here we provide guidance on how to work with such types. ### Varbinary values When uploading varbinary data using JSON or CSV formats, you need to convert the binary data into a textual representation. Reason being, JSON or CSV don't natively support binary values. There are many ways to transform binary data to a textual representation. We support **hexadecimal** and **base64** encodings. #### base64 Base64 is a binary-to-text encoding scheme that transforms binary data into a sequence of characters. All characters are taken from a set of 64 characters. Example: `{"varbinary_column":"SGVsbG8gd29ybGQK"}` #### hexadecimal In the hexadecimal representation input data should contain an even number of characters in the range `[0-9a-fA-F]` always prefixed with `0x`. Example: `{"varbinary_column":"0x92b7d1031988c7af"}` ```bash curl theme={null} curl --request POST \ --url https://api.dune.com/api/v1/uploads/my_user/interest_rates/insert \ --header 'X-DUNE-API-KEY: ' \ --header 'Content-Type: text/csv' \ --upload-file interest_rates.csv ``` ```python Python SDK theme={null} from dune_client.client import DuneClient dune = DuneClient() with open("./interest_rates.csv", "rb") as data: response = dune.insert_table( namespace="my_user", table_name="interest_rates", data=data, content_type="text/csv" ) ``` ```typescript TS SDK theme={null} import * as fs from "fs/promises"; import { DuneClient, ContentType } from "@duneanalytics/client-sdk"; client = new DuneClient(process.env.DUNE_API_KEY!); const data = await fs.readFile("./sample_table_insert.csv"); // Or JSON // const data: Buffer = await fs.readFile("./sample_table_insert.json"); const result = await client.table.insert({ namespace: "my_user", table_name: "interest_rates", data, content_type: ContentType.Csv, // or ContentType.Json }); ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/uploads/my_user/interest_rates/insert" headers = { "X-DUNE-API-KEY": "", "Content-Type": "text/csv" } with open("./interest_rates.csv", "rb") as data: response = requests.request("POST", url, data=data, headers=headers) ``` ```javascript Javascript theme={null} const url = "https://api.dune.com/api/v1/uploads/my_user/interest_rates/insert"; const headers = { "X-DUNE-API-KEY": "", "Content-Type": "text/csv" }; fs.readFile('./interest_rates.csv', (err, data) => { if (err) { console.error(err); return; } fetch(url, { method: 'POST', headers: headers, body: data }) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); }); ``` # List Uploaded Tables Source: https://docs.dune.com/api-reference/tables/endpoint/uploads-list GET /v1/uploads Get a paginated list of uploaded tables > [!NOTE] > > Minimum required API key scope: `Read` ## Description Retrieves a paginated list of tables uploaded by the user or their team. > [!TIP] > > **Migrating from the old API?** This endpoint replaces the deprecated `GET /v1/tables`. See the [Migration Guide](./migration) for details. > > For broader dataset discovery including Dune community datasets, use the `/v1/datasets` endpoint. ## Pagination Use the `limit` and `offset` parameters to paginate through large result sets: * To get the first 20 tables: `?limit=20&offset=0` * To get the next 20 tables: `?limit=20&offset=20` * Continue incrementing `offset` by `limit` to get subsequent pages ## Pricing This is a metadata endpoint and does not consume credits. ## Related Endpoints * [Create Table](/api-reference/tables/endpoint/uploads-create) - Create a new table * [Upload Data](/api-reference/tables/endpoint/uploads-csv) - Upload data to a table * [Delete Table](/api-reference/tables/endpoint/uploads-delete) - Delete a table ```bash cURL theme={null} curl -X GET "https://api.dune.com/api/v1/uploads?limit=10&offset=0" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/uploads" params = { "limit": 10, "offset": 0 } headers = {"X-DUNE-API-KEY": "YOUR_API_KEY"} response = requests.get(url, params=params, headers=headers) print(response.json()) ``` ```javascript JavaScript theme={null} const url = 'https://api.dune.com/api/v1/uploads'; const params = new URLSearchParams({ limit: 10, offset: 0 }); const response = await fetch(`${url}?${params}`, { headers: { 'X-DUNE-API-KEY': 'YOUR_API_KEY' } }); const data = await response.json(); console.log(data); ``` ```json Example Response theme={null} { "tables": [ { "full_name": "dune.dune.ai_contract_tags", "is_private": true, "table_size_bytes": "1152622", "created_at": "2024-05-15T20:34:58.585Z", "updated_at": "2024-05-16T21:19:02.459Z", "purged_at": null, "owner": { "handle": "dune", "type": "team" }, "columns": [ { "name": "blockchain", "type": "string", "nullable": false, "metadata": { "description": "Blockchain associated with the record", "filtering_column": true } }, { "name": "contract_address", "type": "string", "nullable": false, "metadata": { "description": "Address of the smart contract" } } ] } ] } ``` # Get Usage Source: https://docs.dune.com/api-reference/usage/endpoint/get-usage POST /v1/usage Retrieve customer usage data for billing periods > [!NOTE] > > Minimum required API key scope: `Read` ## Description Retrieves customer usage data including credits, queries, dashboards, and storage. Returns the current billing period when no timeframe is specified. ## Pricing This is a metadata endpoint and does not consume credits. ```bash cURL theme={null} curl -X POST "https://api.dune.com/api/v1/usage" \ -H "Content-Type: application/json" \ -H "X-DUNE-API-KEY: YOUR_API_KEY" \ -d '{ "start_date": "2025-01-01", "end_date": "2025-02-01" }' ``` ```python Python theme={null} import requests url = "https://api.dune.com/api/v1/usage" headers = { "X-DUNE-API-KEY": "YOUR_API_KEY", "Content-Type": "application/json" } data = { "start_date": "2025-01-01", "end_date": "2025-02-01" } response = requests.post(url, json=data, headers=headers) print(response.json()) ``` ```javascript JavaScript theme={null} const url = 'https://api.dune.com/api/v1/usage'; const response = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-DUNE-API-KEY': 'YOUR_API_KEY' }, body: JSON.stringify({ start_date: '2025-01-01', end_date: '2025-02-01' }) }); const data = await response.json(); console.log(data); ``` ```json Example Response theme={null} { "private_queries": 100, "private_dashboards": 100, "bytes_used": 1000, "bytes_allowed": 10101, "billingPeriods": [ { "start_date": "2025-01-01", "end_date": "2025-02-01", "credits_used": 100.10, "credits_included": 100000 } ] } ``` # Overview Source: https://docs.dune.com/api-reference/usage/overview The account management endpoints allow you to monitor and track your API usage, credit consumption, and billing information. ## Usage Tracking The usage endpoint provides detailed information about your account's resource consumption, including: * Credits consumed * Query executions * Dashboard usage * Storage utilization This data helps you monitor your usage patterns and manage your billing effectively. ## Billing Periods Usage data can be retrieved for specific time periods by providing start and end dates. When no timeframe is specified, the endpoint returns data for the current billing period. > [!NOTE] > > The usage endpoint is a metadata endpoint and does not consume credits when called. ## Endpoints Below is an overview of the account management endpoint. | Endpoint Title | Endpoint | Description | | - | - | - | | [Get Usage](./endpoint/get-usage) | `POST /v1/usage` | Retrieves customer usage data including credits, queries, dashboards, and storage for specified billing periods | ## Use Cases * **Monitor Credit Consumption:** Track how many credits your API calls are consuming * **Billing Transparency:** Review usage data to understand your monthly charges * **Usage Analytics:** Analyze patterns in your API usage over time * **Budget Management:** Set up alerts based on usage thresholds # Create Webhook Source: https://docs.dune.com/api-reference/webhooks/webhook How to receive data into webhooks from Dune queries You can send Dune data to a webhook by going to any query you own, and pressing the "schedule" button to the left of "Run" in the editor. You'll see the popup below, where you can paste in a webhook url and receive data on a scheduled interval. > [!NOTE] > > A good use case for this is sending data to a Slack webhook, which you can [learn to do here](https://api.slack.com/messaging/webhooks). ![](https://mintcdn.com/dune/uyJ-jHeSRFvNrzyu/api-reference/webhooks/webhook.png?fit=max\&auto=format\&n=uyJ-jHeSRFvNrzyu\&q=85\&s=237ec67e18eb1b898e024c0b0c05a372) You can quickly test the output with a webhook generator [like this one](https://webhook.site/#!/). Here is an example schema sent to the webhook from this [Jupiter swap fees query](https://dune.com/queries/3106864): ``` { "message": "Query Jupiter Fees was submitted for execution at Wed, 17 Jan 2024 04:18:49 GMT by your query schedule and it was successfully executed with a non-empty result.\nYou can check its latest result here: https://dune.com/queries/3106864?utm_source=webhook&utm_campaign=alerts", "query_result": { "execution_id": "01HMAT9AB8JRV1NQR1W6NMYQK7", "query_id": 3106864, "state": "QUERY_STATE_COMPLETED", "submitted_at": "2024-01-17T04:18:49Z", "expires_at": "2024-04-16T04:20:57Z", "execution_started_at": "2024-01-17T04:18:49Z", "execution_ended_at": "2024-01-17T04:20:57Z", "result": { "data_uri": "https://api.dune.com/api/v1/execution/01HMAT9AB8JRV1NQR1W6NMYQK7/results", "metadata": { "column_names": [ "week", "fee_usd" ], "result_set_bytes": 1164, "total_row_count": 25, "datapoint_count": 50, "pending_time_millis": 40, "execution_time_millis": 127845 } } }, "visualizations": [ { "title": "Chart", "image_url": "https://prod-dune-media.s3.eu-west-1.amazonaws.com/screenshots/3106864/01HMAT9AB8JRV1NQR1W6NMYQK7/5222108.png" } ] } ``` > [!NOTE] > > You'll need to query the `data_uri` with your api key to get the results data. This is the same as passing the `execution_id` into [get execution result](/api-reference/executions/endpoint/get-execution-result). > [!WARNING] > > In the case the query errors out on its scheduled run, you won't receive anything to the webhook. # aptos.blocks Source: https://docs.dune.com/data-catalog/aptos/blocks Aptos block metadata — block height, timestamp, epoch, and round information. ## Table description The `aptos.blocks` table represents the blocks in the Aptos blockchain. A block is a collection of transactions, and is identified by a unique block identifier. Each block contains a timestamp and a reference to the previous block hash, forming a chain of blocks. The block structure is crucial for the blockchain's integrity and security, ensuring a verifiable and tamper-evident ledger. ## Table Schema | Column | Type | Description | | - | - | - | | `block_height` | `BIGINT` | Sequential number identifying the block's position in the chain | | `time` | `TIMESTAMP` | Timestamp when the block was proposed and committed | | `block_date` | `DATE` | Date of the block, truncated from the timestamp for daily aggregations | | `block_hash` | `VARBINARY` | Unique cryptographic hash identifying this block | | `first_version` | `UINT256` | The first transaction version included in this block | | `last_version` | `UINT256` | The last transaction version included in this block | | `proposer` | `VARBINARY` | Address of the validator that proposed this block | | `round` | `UINT256` | Consensus round number in which this block was produced | | `epoch` | `UINT256` | Epoch number during which this block was created | | `metadata_id` | `VARBINARY` | Unique identifier for the block metadata event | | `failed_proposer_indices` | `ARRAY(INTEGER)` | Indices of validators that failed to propose before this block was finalized | | `previous_block_votes_bitvec` | `ARRAY(SMALLINT)` | Bit vector indicating which validators voted on the previous block | | `transactions_count` | `INTEGER` | Total number of transactions included in this block | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=blocks) # aptos.events Source: https://docs.dune.com/data-catalog/aptos/events Aptos on-chain events — emitted by Move modules during transaction execution. ## Table description The `aptos.events` table captures the events that are emitted by smart contracts on the Aptos blockchain. Events are used to log significant actions and changes in smart contracts, such as token transfers or updates to contract states. Each event is linked to the transaction that triggered it, providing a detailed audit trail of contract interactions. ## Table Schema | Column | Type | Description | | - | - | - | | `block_height` | `BIGINT` | Sequential number identifying the block's position in the chain | | `block_date` | `DATE` | Date of the block for daily aggregations | | `block_time` | `TIMESTAMP` | Timestamp when the block was committed | | `block_hash` | `VARBINARY` | Unique cryptographic hash identifying the block | | `block_first_version` | `UINT256` | First transaction version included in the block | | `block_last_version` | `UINT256` | Last transaction version included in the block | | `block_proposer` | `VARBINARY` | Address of the validator that proposed the block | | `block_round` | `UINT256` | Consensus round number for the block | | `block_epoch` | `UINT256` | Epoch number during which the block was created | | `block_metadata_id` | `VARBINARY` | Unique identifier for the block metadata event | | `block_failed_proposer_indices` | `ARRAY(INTEGER)` | Indices of validators that failed to propose before this block | | `block_previous_block_votes_bitvec` | `ARRAY(SMALLINT)` | Bit vector of validator votes on the previous block | | `tx_index` | `INTEGER` | Position of the transaction within the block | | `tx_type` | `VARCHAR` | Type of the transaction (e.g. user_transaction, block_metadata) | | `tx_hash` | `VARBINARY` | Unique hash identifying the transaction that emitted this event | | `tx_version` | `UINT256` | Global sequential version number of the transaction | | `tx_gas_used` | `UINT256` | Amount of gas consumed by the transaction | | `tx_vm_status` | `VARCHAR` | Detailed status message returned by the Move VM after execution | | `tx_success` | `BOOLEAN` | Whether the transaction executed successfully | | `tx_state_change_hash` | `VARBINARY` | Hash of all state changes produced by the transaction | | `tx_event_root_hash` | `VARBINARY` | Merkle root hash of all events emitted by the transaction | | `tx_state_checkpoint_hash` | `VARBINARY` | Hash of the state checkpoint after this transaction | | `tx_accumulator_root_hash` | `VARBINARY` | Root hash of the transaction accumulator after this transaction | | `event_index` | `INTEGER` | Position of this event within the transaction's event list | | `event_type` | `VARCHAR` | Fully qualified Move type identifier of the event (e.g. `0x1::coin::WithdrawEvent`) | | `guid_account_address` | `VARBINARY` | Account address associated with the event's globally unique identifier | | `guid_creation_number` | `UINT256` | Creation number of the event handle, unique per account | | `event_sequence_number` | `UINT256` | Sequence number of this event within its event handle | | `data` | `VARCHAR` | JSON-encoded payload of the event containing event-specific fields | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=events) # aptos.move_modules Source: https://docs.dune.com/data-catalog/aptos/move_modules Aptos Move module deployments — published module bytecode, package metadata, and addresses. ## Table description The `aptos.move_modules` table contains data on Move modules deployed on the Aptos blockchain. Move modules contain the bytecode for smart contracts and define the functionality and types used by Move resources. This table provides insight into the smart contract code running on the network, including the module's author, name, and bytecode. ## Table Schema | Column | Type | Description | | - | - | - | | `block_height` | `BIGINT` | Sequential number identifying the block's position in the chain | | `block_date` | `DATE` | Date of the block for daily aggregations | | `block_time` | `TIMESTAMP` | Timestamp when the block was committed | | `block_hash` | `VARBINARY` | Unique cryptographic hash identifying the block | | `block_first_version` | `UINT256` | First transaction version included in the block | | `block_last_version` | `UINT256` | Last transaction version included in the block | | `block_proposer` | `VARBINARY` | Address of the validator that proposed the block | | `block_round` | `UINT256` | Consensus round number for the block | | `block_epoch` | `UINT256` | Epoch number during which the block was created | | `block_metadata_id` | `VARBINARY` | Unique identifier for the block metadata event | | `block_failed_proposer_indices` | `ARRAY(INTEGER)` | Indices of validators that failed to propose before this block | | `block_previous_block_votes_bitvec` | `ARRAY(SMALLINT)` | Bit vector of validator votes on the previous block | | `tx_index` | `INTEGER` | Position of the transaction within the block | | `tx_type` | `VARCHAR` | Type of the transaction (e.g. user_transaction, block_metadata) | | `tx_hash` | `VARBINARY` | Unique hash identifying the transaction | | `tx_version` | `UINT256` | Global sequential version number of the transaction | | `tx_gas_used` | `UINT256` | Amount of gas consumed by the transaction | | `tx_vm_status` | `VARCHAR` | Detailed status message returned by the Move VM | | `tx_success` | `BOOLEAN` | Whether the transaction executed successfully | | `tx_state_change_hash` | `VARBINARY` | Hash of all state changes produced by the transaction | | `tx_event_root_hash` | `VARBINARY` | Merkle root hash of all events emitted by the transaction | | `tx_state_checkpoint_hash` | `VARBINARY` | Hash of the state checkpoint after this transaction | | `tx_accumulator_root_hash` | `VARBINARY` | Root hash of the transaction accumulator after this transaction | | `write_set_change_index` | `INTEGER` | Index of this state change within the transaction's write set | | `write_set_change_type` | `VARCHAR` | Type of write set change (e.g. write_module, delete_module) | | `move_state_key_hash` | `VARBINARY` | Hash of the state key affected by this change | | `move_is_deletion` | `BOOLEAN` | Whether this change represents a deletion of the module | | `move_address` | `VARBINARY` | Address where the module is deployed | | `move_module_address` | `VARBINARY` | Address of the module's owner account | | `move_module_bytecode` | `VARCHAR` | Hex-encoded compiled Move bytecode of the module | | `move_module_module_name` | `VARCHAR` | Name of the Move module | | `move_module_friends` | `ARRAY(ROW(NAME VARCHAR, ADDRESS VARBINARY))` | List of friend modules that have privileged access | | `move_module_exposed_functions` | `ARRAY(ROW(NAME VARCHAR, VISIBILITY VARCHAR, IS_ENTRY BOOLEAN, IS_VIEW BOOLEAN, GENERIC_TYPE_PARAMS ARRAY(ROW(CONSTRAINTS ARRAY(VARCHAR))), PARAMS ARRAY(VARCHAR), RETURN_TYPE ARRAY(VARCHAR)))` | Public and entry functions exposed by the module | | `move_module_structs` | `ARRAY(ROW(NAME VARCHAR, IS_NATIVE BOOLEAN, ABILITIES ARRAY(VARCHAR), GENERIC_TYPE_PARAMS ARRAY(VARCHAR), FIELDS ARRAY(ROW(NAME VARCHAR, TYPE VARCHAR))))` | Struct types defined in the module | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=move_modules](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=move_modules) # aptos.move_resources Source: https://docs.dune.com/data-catalog/aptos/move_resources Aptos Move resource snapshots — on-chain state stored in Move structs by account. ## Table description The `aptos.move_resources` table stores information about the Move resources on the Aptos blockchain. Move resources are persistent data structures that are owned by user accounts and can represent various on-chain assets or states. This table includes details on the resource type, the account that owns it, and the resource's data. ## Table Schema | Column | Type | Description | | - | - | - | | `block_height` | `BIGINT` | Sequential number identifying the block's position in the chain | | `block_date` | `DATE` | Date of the block for daily aggregations | | `block_time` | `TIMESTAMP` | Timestamp when the block was committed | | `block_hash` | `VARBINARY` | Unique cryptographic hash identifying the block | | `block_first_version` | `UINT256` | First transaction version included in the block | | `block_last_version` | `UINT256` | Last transaction version included in the block | | `block_proposer` | `VARBINARY` | Address of the validator that proposed the block | | `block_round` | `UINT256` | Consensus round number for the block | | `block_epoch` | `UINT256` | Epoch number during which the block was created | | `block_metadata_id` | `VARBINARY` | Unique identifier for the block metadata event | | `block_failed_proposer_indices` | `ARRAY(INTEGER)` | Indices of validators that failed to propose before this block | | `block_previous_block_votes_bitvec` | `ARRAY(SMALLINT)` | Bit vector of validator votes on the previous block | | `tx_index` | `INTEGER` | Position of the transaction within the block | | `tx_type` | `VARCHAR` | Type of the transaction (e.g. user_transaction, block_metadata) | | `tx_hash` | `VARBINARY` | Unique hash identifying the transaction | | `tx_version` | `UINT256` | Global sequential version number of the transaction | | `tx_gas_used` | `UINT256` | Amount of gas consumed by the transaction | | `tx_vm_status` | `VARCHAR` | Detailed status message returned by the Move VM | | `tx_success` | `BOOLEAN` | Whether the transaction executed successfully | | `tx_state_change_hash` | `VARBINARY` | Hash of all state changes produced by the transaction | | `tx_event_root_hash` | `VARBINARY` | Merkle root hash of all events emitted by the transaction | | `tx_state_checkpoint_hash` | `VARBINARY` | Hash of the state checkpoint after this transaction | | `tx_accumulator_root_hash` | `VARBINARY` | Root hash of the transaction accumulator after this transaction | | `write_set_change_index` | `INTEGER` | Index of this state change within the transaction's write set | | `write_set_change_type` | `VARCHAR` | Type of write set change (e.g. write_resource, delete_resource) | | `move_state_key_hash` | `VARBINARY` | Hash of the state key affected by this change | | `move_is_deletion` | `BOOLEAN` | Whether this change represents a deletion of the resource | | `move_data` | `VARCHAR` | JSON-encoded data payload of the Move resource | | `move_address` | `VARBINARY` | Address of the account that owns this resource | | `move_module_address` | `VARBINARY` | Address of the module that defines this resource type | | `move_resource_module` | `VARCHAR` | Name of the module that defines this resource type | | `move_resource_name` | `VARCHAR` | Name of the resource struct type | | `move_resource_generic_type_params` | `ARRAY(VARCHAR)` | Generic type parameters applied to this resource instance | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=move_resources](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=move_resources) # aptos.move_table_items Source: https://docs.dune.com/data-catalog/aptos/move_table_items Aptos Move table operations — key-value store changes during transaction execution. ## Table description The `aptos.move_table_items` table tracks the items stored in Move's table data structures on the Aptos blockchain. The Move table is a high-performance, typed data structure used for storing and querying on-chain data. This table details the key-value pairs stored, facilitating efficient data access and manipulation within smart contracts. ## Table Schema | Column | Type | Description | | - | - | - | | `block_height` | `BIGINT` | Sequential number identifying the block's position in the chain | | `block_date` | `DATE` | Date of the block for daily aggregations | | `block_time` | `TIMESTAMP` | Timestamp when the block was committed | | `block_hash` | `VARBINARY` | Unique cryptographic hash identifying the block | | `block_first_version` | `UINT256` | First transaction version included in the block | | `block_last_version` | `UINT256` | Last transaction version included in the block | | `block_proposer` | `VARBINARY` | Address of the validator that proposed the block | | `block_round` | `UINT256` | Consensus round number for the block | | `block_epoch` | `UINT256` | Epoch number during which the block was created | | `block_metadata_id` | `VARBINARY` | Unique identifier for the block metadata event | | `block_failed_proposer_indices` | `ARRAY(INTEGER)` | Indices of validators that failed to propose before this block | | `block_previous_block_votes_bitvec` | `ARRAY(SMALLINT)` | Bit vector of validator votes on the previous block | | `tx_index` | `INTEGER` | Position of the transaction within the block | | `tx_type` | `VARCHAR` | Type of the transaction (e.g. user_transaction, block_metadata) | | `tx_hash` | `VARBINARY` | Unique hash identifying the transaction | | `tx_version` | `UINT256` | Global sequential version number of the transaction | | `tx_gas_used` | `UINT256` | Amount of gas consumed by the transaction | | `tx_vm_status` | `VARCHAR` | Detailed status message returned by the Move VM | | `tx_success` | `BOOLEAN` | Whether the transaction executed successfully | | `tx_state_change_hash` | `VARBINARY` | Hash of all state changes produced by the transaction | | `tx_event_root_hash` | `VARBINARY` | Merkle root hash of all events emitted by the transaction | | `tx_state_checkpoint_hash` | `VARBINARY` | Hash of the state checkpoint after this transaction | | `tx_accumulator_root_hash` | `VARBINARY` | Root hash of the transaction accumulator after this transaction | | `write_set_change_index` | `INTEGER` | Index of this state change within the transaction's write set | | `write_set_change_type` | `VARCHAR` | Type of write set change (e.g. write_table_item, delete_table_item) | | `move_state_key_hash` | `VARBINARY` | Hash of the state key affected by this change | | `move_is_deletion` | `BOOLEAN` | Whether this change represents a deletion of the table item | | `move_table_item_handle` | `VARBINARY` | Handle identifying the on-chain Move table this item belongs to | | `move_table_item_key` | `VARBINARY` | Serialized key of the item within the Move table | | `move_table_item_value` | `VARBINARY` | Serialized value of the item within the Move table | | `move_data` | `VARCHAR` | JSON-encoded representation of the table item data | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=move_table_items](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=move_table_items) # Aptos data Source: https://docs.dune.com/data-catalog/aptos/overview Aptos is a next-generation blockchain designed for scalability, security, and reliability. Aptos utilizes the Move programming language, focusing on flexibility, safety, and efficiency in smart contract execution. It employs a ledger model that is built to support highly scalable and reliable decentralized applications and financial infrastructure. Aptos is distinguished by its state-of-the-art consensus protocol, aiming to achieve high transaction throughput without compromising security or decentralization. You can learn more about Aptos by visiting the [official documentation](https://aptos.dev/). ## Data Available > [card] [Blocks](/data-catalog/aptos/blocks) > > Represents the collection of transactions in a single block within the Aptos > blockchain. > [card] [Transactions](/data-catalog/aptos/transactions) > > Includes all user and system transactions processed by the Aptos network. > [card] [User Transactions](/data-catalog/aptos/user_transactions) > > Specifically tracks transactions initiated by users, including smart > contract interactions. > [card] [Events](/data-catalog/aptos/events) > > Captures events emitted by smart contracts, logging significant actions and > changes. > [card] [Move Resources](/data-catalog/aptos/move_resources) > > Details Move resources, representing structured data owned by accounts on > the Aptos blockchain. > [card] [Move Modules](/data-catalog/aptos/move_modules) > > Contains metadata and code for Move modules, defining the functionality of > smart contracts. > [card] [Move Table Items](/data-catalog/aptos/move_table_items) > > Tracks items stored in Move's table data structures, used for efficient data > access within smart contracts. > [card] [Signatures](/data-catalog/aptos/signatures) > > Signatures are associated with transactions, which are essential for > security and authentication. # aptos.signatures Source: https://docs.dune.com/data-catalog/aptos/signatures Aptos transaction signatures — authentication data including public keys and signature schemes. ## Table description The `aptos.signatures` table documents the signatures associated with transactions on the Aptos blockchain. Signatures are critical for securing transactions, proving the identity of the sender, and ensuring data integrity. This table includes the signature type, data, and the transaction it authenticates, offering insights into the security mechanisms at play. ## Table Schema | Column | Type | Description | | - | - | - | | `block_height` | `BIGINT` | Sequential number identifying the block's position in the chain | | `block_date` | `DATE` | Date of the block for daily aggregations | | `block_time` | `TIMESTAMP` | Timestamp when the block was committed | | `block_hash` | `VARBINARY` | Unique cryptographic hash identifying the block | | `block_first_version` | `UINT256` | First transaction version included in the block | | `block_last_version` | `UINT256` | Last transaction version included in the block | | `block_proposer` | `VARBINARY` | Address of the validator that proposed the block | | `block_round` | `UINT256` | Consensus round number for the block | | `block_epoch` | `UINT256` | Epoch number during which the block was created | | `block_metadata_id` | `VARBINARY` | Unique identifier for the block metadata event | | `block_failed_proposer_indices` | `ARRAY(INTEGER)` | Indices of validators that failed to propose before this block | | `block_previous_block_votes_bitvec` | `ARRAY(SMALLINT)` | Bit vector of validator votes on the previous block | | `tx_index` | `INTEGER` | Position of the transaction within the block | | `tx_type` | `VARCHAR` | Type of the transaction (e.g. user_transaction, block_metadata) | | `tx_hash` | `VARBINARY` | Unique hash identifying the transaction | | `tx_version` | `UINT256` | Global sequential version number of the transaction | | `tx_gas_used` | `UINT256` | Amount of gas consumed by the transaction | | `tx_vm_status` | `VARCHAR` | Detailed status message returned by the Move VM | | `tx_success` | `BOOLEAN` | Whether the transaction executed successfully | | `tx_state_change_hash` | `VARBINARY` | Hash of all state changes produced by the transaction | | `tx_event_root_hash` | `VARBINARY` | Merkle root hash of all events emitted by the transaction | | `tx_state_checkpoint_hash` | `VARBINARY` | Hash of the state checkpoint after this transaction | | `tx_accumulator_root_hash` | `VARBINARY` | Root hash of the transaction accumulator after this transaction | | `tx_timestamp` | `UINT256` | Unix timestamp of the transaction in microseconds | | `tx_sender` | `VARBINARY` | Address of the account that submitted the transaction | | `tx_max_gas_amount` | `UINT256` | Maximum gas units the sender is willing to pay | | `tx_gas_unit_price` | `UINT256` | Price per gas unit in octas (1 APT = 10^8 octas) | | `tx_sequence_number` | `UINT256` | Sender's account sequence number at the time of this transaction | | `tx_expiration_timestamp_secs` | `UINT256` | Unix timestamp (seconds) after which the transaction expires | | `type` | `VARCHAR` | Top-level signature scheme type (e.g. ed25519, multi_ed25519, multi_agent) | | `signer_type` | `VARCHAR` | Role of the signer (e.g. sender, secondary_signer, fee_payer) | | `signer_signature_type` | `VARCHAR` | Cryptographic algorithm used by this signer (e.g. ed25519, secp256k1_ecdsa) | | `is_single_sender` | `BOOLEAN` | Whether the transaction has a single sender (as opposed to multi-agent) | | `signer_address` | `VARBINARY` | Address of this particular signer | | `secondary_signer_index` | `INTEGER` | Index of this signer among secondary signers (-1 for primary sender) | | `public_key` | `VARBINARY` | Public key used to create the signature | | `signature` | `VARBINARY` | Cryptographic signature bytes | | `bitmap` | `VARBINARY` | Bitmap indicating which keys signed in a multi-key scheme | | `bitmap_public_key_index` | `INTEGER` | Index of this public key within the bitmap | | `threshold` | `BIGINT` | Minimum number of signatures required for multi-key authentication | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=signatures](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=signatures) # aptos.transactions Source: https://docs.dune.com/data-catalog/aptos/transactions Aptos transactions — payload type, gas used, success status, and version number. ## Table description The `aptos.transactions` table contains information about all transactions on the Aptos blockchain, including both user-initiated and system transactions. Transactions are the actions that modify the state of the blockchain, such as transfers of tokens or the execution of smart contracts. Each transaction is uniquely identified and linked to the block in which it was included. ## Table Schema | Column | Type | Description | | - | - | - | | `block_height` | `BIGINT` | Sequential number identifying the block's position in the chain | | `block_date` | `DATE` | Date of the block for daily aggregations | | `block_time` | `TIMESTAMP` | Timestamp when the block was committed | | `block_hash` | `VARBINARY` | Unique cryptographic hash identifying the block | | `block_first_version` | `UINT256` | First transaction version included in the block | | `block_last_version` | `UINT256` | Last transaction version included in the block | | `block_proposer` | `VARBINARY` | Address of the validator that proposed the block | | `block_round` | `UINT256` | Consensus round number for the block | | `block_epoch` | `UINT256` | Epoch number during which the block was created | | `block_metadata_id` | `VARBINARY` | Unique identifier for the block metadata event | | `block_failed_proposer_indices` | `ARRAY(INTEGER)` | Indices of validators that failed to propose before this block | | `block_previous_block_votes_bitvec` | `ARRAY(SMALLINT)` | Bit vector of validator votes on the previous block | | `tx_index` | `INTEGER` | Position of the transaction within the block | | `tx_type` | `VARCHAR` | Type of the transaction (e.g. user_transaction, block_metadata, state_checkpoint) | | `hash` | `VARBINARY` | Unique hash identifying this transaction | | `version` | `UINT256` | Global sequential version number assigned to this transaction | | `gas_used` | `UINT256` | Amount of gas consumed by the transaction | | `vm_status` | `VARCHAR` | Detailed status message returned by the Move VM after execution | | `success` | `BOOLEAN` | Whether the transaction executed successfully | | `state_change_hash` | `VARBINARY` | Hash of all state changes produced by the transaction | | `event_root_hash` | `VARBINARY` | Merkle root hash of all events emitted by the transaction | | `state_checkpoint_hash` | `VARBINARY` | Hash of the state checkpoint after this transaction | | `accumulator_root_hash` | `VARBINARY` | Root hash of the transaction accumulator after this transaction | | `events_count` | `INTEGER` | Number of events emitted by this transaction | | `changes_count` | `INTEGER` | Number of state changes produced by this transaction | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=transactions) # aptos.user_transactions Source: https://docs.dune.com/data-catalog/aptos/user_transactions Aptos user-initiated transactions — function calls, gas details, and sender information. ## Table description The `aptos.user_transactions` table specifically tracks transactions initiated by users of the Aptos blockchain. It includes details such as the sender, the type of transaction, and the gas used, providing insights into how users interact with the network and its smart contracts. ## Table Schema | Column | Type | Description | | - | - | - | | `block_height` | `BIGINT` | Sequential number identifying the block's position in the chain | | `block_date` | `DATE` | Date of the block for daily aggregations | | `block_time` | `TIMESTAMP` | Timestamp when the block was committed | | `block_hash` | `VARBINARY` | Unique cryptographic hash identifying the block | | `block_first_version` | `UINT256` | First transaction version included in the block | | `block_last_version` | `UINT256` | Last transaction version included in the block | | `block_proposer` | `VARBINARY` | Address of the validator that proposed the block | | `block_round` | `UINT256` | Consensus round number for the block | | `block_epoch` | `UINT256` | Epoch number during which the block was created | | `block_metadata_id` | `VARBINARY` | Unique identifier for the block metadata event | | `block_failed_proposer_indices` | `ARRAY(INTEGER)` | Indices of validators that failed to propose before this block | | `block_previous_block_votes_bitvec` | `ARRAY(SMALLINT)` | Bit vector of validator votes on the previous block | | `tx_index` | `INTEGER` | Position of the transaction within the block | | `tx_type` | `VARCHAR` | Type of the transaction (always user_transaction for this table) | | `hash` | `VARBINARY` | Unique hash identifying this transaction | | `version` | `UINT256` | Global sequential version number assigned to this transaction | | `gas_used` | `UINT256` | Amount of gas consumed by the transaction | | `vm_status` | `VARCHAR` | Detailed status message returned by the Move VM after execution | | `success` | `BOOLEAN` | Whether the transaction executed successfully | | `state_change_hash` | `VARBINARY` | Hash of all state changes produced by the transaction | | `event_root_hash` | `VARBINARY` | Merkle root hash of all events emitted by the transaction | | `state_checkpoint_hash` | `VARBINARY` | Hash of the state checkpoint after this transaction | | `accumulator_root_hash` | `VARBINARY` | Root hash of the transaction accumulator after this transaction | | `timestamp` | `UINT256` | Unix timestamp of the transaction in microseconds | | `sender` | `VARBINARY` | Address of the account that submitted the transaction | | `max_gas_amount` | `UINT256` | Maximum gas units the sender is willing to pay | | `gas_unit_price` | `UINT256` | Price per gas unit in octas (1 APT = 10^8 octas) | | `sequence_number` | `UINT256` | Sender's account sequence number at the time of this transaction | | `expiration_timestamp_secs` | `UINT256` | Unix timestamp (seconds) after which the transaction expires | | `events_count` | `INTEGER` | Number of events emitted by this transaction | | `changes_count` | `INTEGER` | Number of state changes produced by this transaction | | `payload_type` | `VARCHAR` | Type of transaction payload (e.g. entry_function_payload, script_payload) | | `entry_function_name` | `VARCHAR` | Name of the entry function called (empty if script payload) | | `entry_function_module_name` | `VARCHAR` | Module containing the entry function called | | `entry_function_module_address` | `VARBINARY` | Address of the module containing the entry function | | `script_bytecode` | `VARBINARY` | Compiled bytecode of the script payload (empty if entry function) | | `script_abi` | `VARCHAR` | ABI definition of the script payload | | `type_arguments` | `ARRAY(VARCHAR)` | Generic type arguments passed to the entry function or script | | `arguments` | `ARRAY(VARCHAR)` | Arguments passed to the entry function or script | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=user_transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=aptos\&table_name_t6f0df=user_transactions) # bitcoin.blocks Source: https://docs.dune.com/data-catalog/bitcoin/blocks Bitcoin block headers — height, timestamp, difficulty, nonce, Merkle root, and miner reward. ## Table description The `bitcoin.blocks` table represents the blocks in the Bitcoin blockchain. A block is a collection of transactions, and is identified by a block hash. Each block contains a reference to the previous block, forming a chain of blocks. The first block in the chain is called the genesis block. ## Table Schema | Column | Type | Description | | - | - | - | | `time` | `TIMESTAMP` | Timestamp when the block was mined | | `height` | `BIGINT` | Sequential block number indicating position in the chain | | `date` | `DATE` | Date of the block, truncated from the timestamp for daily aggregations | | `hash` | `VARBINARY` | Unique 256-bit hash identifying this block | | `bits` | `VARBINARY` | Compact representation of the target difficulty threshold | | `chainwork` | `VARBINARY` | Total cumulative proof-of-work performed up to and including this block | | `difficulty` | `DOUBLE` | Mining difficulty target as a floating-point number | | `total_fees` | `DOUBLE` | Total transaction fees (in BTC) collected in this block | | `total_reward` | `DOUBLE` | Total miner reward (in BTC) including block subsidy and fees | | `mint_reward` | `DOUBLE` | Block subsidy (in BTC) awarded for mining this block | | `merkle_root` | `VARBINARY` | Merkle root hash of all transactions in the block | | `transaction_count` | `BIGINT` | Number of transactions included in this block | | `nonce` | `BIGINT` | Nonce value used by the miner to satisfy the proof-of-work target | | `coinbase` | `VARBINARY` | Arbitrary data included by the miner in the coinbase transaction | | `previous_block_hash` | `VARBINARY` | Hash of the preceding block in the chain | | `size` | `BIGINT` | Total size of the block in bytes | | `stripped_size` | `BIGINT` | Size of the block in bytes excluding witness data | | `version` | `BIGINT` | Block version number indicating supported consensus rules | | `weight` | `BIGINT` | Block weight in weight units (max 4,000,000 per block) | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bitcoin\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bitcoin\&table_name_t6f0df=blocks) # bitcoin.inputs Source: https://docs.dune.com/data-catalog/bitcoin/inputs Bitcoin transaction inputs — spent UTXOs with previous transaction references and script signatures. ## Table description The `bitcoin.inputs` table represents the inputs of a transaction. An input is a reference to an output of a previous transaction. It is the source of the funds for the transaction. The input contains the hash of the transaction that contains the output, the index of the output in the transaction, the script that unlocks the output, and the sequence number. ## Table Schema | Column | Type | Description | | - | - | - | | `block_time` | `TIMESTAMP` | Timestamp of the block containing this transaction | | `block_date` | `DATE` | Date of the block for daily aggregations | | `block_height` | `BIGINT` | Height of the block containing this transaction | | `block_hash` | `VARBINARY` | Hash of the block containing this transaction | | `tx_id` | `VARBINARY` | Hash of the transaction this input belongs to | | `index` | `INTEGER` | Position of this input within the transaction's input list | | `spent_block_height` | `BIGINT` | Block height of the transaction whose output is being spent | | `spent_tx_id` | `VARBINARY` | Transaction ID of the previously created output being spent | | `spent_output_number` | `BIGINT` | Index of the output being spent in the source transaction | | `value` | `DOUBLE` | Amount of BTC provided by this input | | `address` | `VARCHAR` | Bitcoin address that owned the spent output | | `type` | `VARCHAR` | Address/script type of the spent output (e.g. pubkeyhash, scripthash, witness_v0_keyhash) | | `coinbase` | `VARBINARY` | Coinbase data if this is a coinbase input, otherwise empty | | `is_coinbase` | `BOOLEAN` | Whether this input is a coinbase input (block reward) | | `script_asm` | `VARCHAR` | Script public key of the spent output in human-readable ASM format | | `script_hex` | `VARBINARY` | Script public key of the spent output in raw hex | | `script_desc` | `VARCHAR` | Output descriptor of the spent output's script | | `script_signature_asm` | `VARCHAR` | Unlocking script (scriptSig) in human-readable ASM format | | `script_signature_hex` | `VARBINARY` | Unlocking script (scriptSig) in raw hex | | `sequence` | `BIGINT` | Sequence number, used for relative time locks and replace-by-fee signaling | | `witness_data` | `ARRAY(VARBINARY)` | Segregated witness data stack for this input | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bitcoin\&table_name_t6f0df=inputs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bitcoin\&table_name_t6f0df=inputs) # bitcoin.outputs Source: https://docs.dune.com/data-catalog/bitcoin/outputs Bitcoin transaction outputs — created UTXOs with value, script type, and locking conditions. ## Table description The `bitcoin.outputs` table contains information about the outputs of Bitcoin transactions. An output is a record of the amount of Bitcoin being sent to a specific address. ## Table Schema | Column | Type | Description | | - | - | - | | `block_time` | `TIMESTAMP` | Timestamp of the block containing this transaction | | `block_date` | `DATE` | Date of the block for daily aggregations | | `block_height` | `BIGINT` | Height of the block containing this transaction | | `block_hash` | `VARBINARY` | Hash of the block containing this transaction | | `tx_id` | `VARBINARY` | Hash of the transaction this output belongs to | | `index` | `BIGINT` | Position of this output within the transaction's output list | | `value` | `DOUBLE` | Amount of BTC assigned to this output | | `address` | `VARCHAR` | Bitcoin address that can spend this output | | `type` | `VARCHAR` | Address/script type of the output (e.g. pubkeyhash, scripthash, witness_v0_keyhash) | | `script_asm` | `VARCHAR` | Locking script (scriptPubKey) in human-readable ASM format | | `script_hex` | `VARBINARY` | Locking script (scriptPubKey) in raw hex | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bitcoin\&table_name_t6f0df=outputs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bitcoin\&table_name_t6f0df=outputs) # Bitcoin data Source: https://docs.dune.com/data-catalog/bitcoin/overview Bitcoin is the first and most well-known blockchain. > [card] [A full guide on all Bitcoin concepts](https://web3datadegens.substack.com/p/how-to-analyze-bitcoin-data-with) Bitcoin uses a UTXO transaction model, and has a heavy focus on signatures and scripts for "locking" and "unlocking" tokens. It is also most well known for being tied to a 21 million token supply, and halvenings. ## Data Available > [card] [Blocks](/data-catalog/bitcoin/blocks) > > Blocks are the base unit that all transactions fit into. > [card] [Transactions](/data-catalog/bitcoin/transactions) > > Transactions contain all spent inputs and created outputs from a UTXO transaction. > [card] [Outputs](/data-catalog/bitcoin/outputs) > > Just the outputs, unnested. > [card] [Inputs](/data-catalog/bitcoin/inputs) > > Just the inputs, unnested. # bitcoin.transactions Source: https://docs.dune.com/data-catalog/bitcoin/transactions Bitcoin transactions — version, locktime, size, weight, fee, and input/output counts. ## Table description The `bitcoin.transactions` table represents the transactions on the Bitcoin blockchain. A transaction is a transfer of Bitcoin value that is broadcast to the network and collected into blocks. A transaction typically references previous transaction outputs as new transaction inputs and dedicates all input Bitcoin values to new outputs. Transactions are not encrypted, so it is possible to browse and view every transaction ever collected into a block. ## Table Schema | Column | Type | Description | | - | - | - | | `block_time` | `TIMESTAMP` | Timestamp of the block containing this transaction | | `block_date` | `DATE` | Date of the block for daily aggregations | | `block_height` | `BIGINT` | Height of the block containing this transaction | | `index` | `INTEGER` | Position of this transaction within the block | | `block_hash` | `VARBINARY` | Hash of the block containing this transaction | | `id` | `VARBINARY` | Unique transaction identifier (txid) | | `lock_time` | `BIGINT` | Earliest time or block height at which this transaction can be included | | `size` | `BIGINT` | Total size of the serialized transaction in bytes | | `virtual_size` | `BIGINT` | Virtual size in vbytes, accounting for SegWit discount | | `coinbase` | `VARBINARY` | Coinbase data if this is a coinbase transaction, otherwise empty | | `is_coinbase` | `BOOLEAN` | Whether this is a coinbase transaction (block reward) | | `version` | `BIGINT` | Transaction version number | | `input_count` | `INTEGER` | Number of inputs in this transaction | | `output_count` | `INTEGER` | Number of outputs in this transaction | | `input_value` | `DOUBLE` | Total BTC value of all inputs | | `output_value` | `DOUBLE` | Total BTC value of all outputs | | `fee` | `DOUBLE` | Transaction fee in BTC (input_value minus output_value) | | `hex` | `VARBINARY` | Full raw transaction in serialized hex format | | `input` | `ARRAY(ROW(VALUE DOUBLE, COINBASE VARBINARY, HEIGHT BIGINT, TX_ID VARBINARY, OUTPUT_NUMBER BIGINT, SCRIPT_PUB_KEY ROW(ADDRESS VARCHAR, ASM VARCHAR, DESC VARCHAR, HEX VARBINARY, TYPE VARCHAR), SCRIPT_SIGNATURE ROW(ASM VARCHAR, HEX VARBINARY), SEQUENCE BIGINT, WITNESS_DATA ARRAY(VARBINARY)))` | Array of transaction inputs with full details including spent output info | | `output` | `ARRAY(ROW(INDEX BIGINT, SCRIPT_PUB_KEY ROW(ADDRESS VARCHAR, ASM VARCHAR, DESC VARCHAR, HEX VARBINARY, TYPE VARCHAR), VALUE DOUBLE))` | Array of transaction outputs with script and value details | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bitcoin\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bitcoin\&table_name_t6f0df=transactions) ### Struct definitions Within several of these columns is a data type of STRUCT which allows for representing nested hierarchical data and has key-value pairs. It's similar to a dictionary in Python and can be used to group fields together to make them more accessible. Note that you can work with these columns with the syntax `input[1].witness_data[2]` or `input[3].script_pub_key.address` depending on lengths of arrays within each value. It is an `array(row(map))` type, and while it looks like just an array in the returned table - it is more than that! **input** | Field | Data type | Description | | - | - | - | | value | double | The number of Satoshis attached to this output | | height | bigint | The height of the output | | tx_id | string | The transaction id of the output that is here used as input | | output_number | bigint | The number (index) of the output in transaction `tx_id`'s outputs | | coinbase | string | The data specified in this transaction, if it was a coinbase transaction | | sequence | bigint | Sequence number | | witness_data | `array` | Array of hex encoded witness data | | script_signature | struct | The script signature | | script_pub_key | struct | The script public key | *** **input.script_signature** | Field | Data type | Description | | - | - | - | | hex | string | The transaction's script operations, in hex | | asm | string | The transaction's script operations, in symbolic representation | *** **input.script_pub_key** | Field | Data type | Description | | - | - | - | | asm | string | The transaction's script operations, in symbolic representation | | desc | string | The transaction's script operations, in symbolic representation | | address | string | The transaction's script operations, in symbolic representation | | hex | string | The transaction's script operations, in hex | | type | string | The address type of the output | *** **output** | Field | Data type | Description | | - | - | - | | index | bigint | 0-indexed number of an output within a transaction used by a later transaction to refer to that specific output | | value | double | The number of Satoshis attached to this output | | script_pub_key | struct | The public key | *** **output.script_pub_key** | Field | Data type | Description | | - | - | - | | asm | string | The transaction's script operations, in symbolic representation | | hex | string | The transaction's script operations, in hex | | address | string | The address the BTC came from | | type | string | The address type of the output | # Bring your Data Source: https://docs.dune.com/data-catalog/bring-your-own-data Dune offers several ways to bring your data to the platform. ## Data Upload You can upload your data to Dune via the API or the UI. This allows you to combine your data with the data available on Dune. > [card] [Upload data via the User Interface](/web-app/upload-data) > > Upload data via dune.com > [card] [Upload data via the API](/api-reference/tables/endpoint/upload) > > Programmatically upload data via the API ## LiveFetch Functions You can also use the LiveFetch functions to fetch data from external APIs directly within your queries. This allows you to combine your data with external data sources in real-time and without having to upload the data to Dune. > [card] [LiveFetch Functions](/query-engine/Functions-and-operators/live-fetch) > > Fetch data from external APIs directly within your queries ## Adding new blockchains If you are a representative of a blockchain you would like to see supported on Dune, please reach out to us. We are always looking to expand our data catalog. > [card] [Request a new blockchain integration!](https://dune.com/enterprise) ## Adding other relevant data If you have other relevant web3 data that you would like to see on Dune, please reach out to us. We are always looking to expand our data catalog. Data in this category could include web3 social, enriched blockchain data, finance data, pricing data and more. A few examples of data we already have in this category are: * [**farcaster.xyz**](https://www.farcaster.xyz/) data is supplied by [**Neynar**](https://www.neynar.xyz/) * the [**Lens protocol**](https://lens.xyz) team uploads their data * [**Snapshot**](https://snapshot.org/#/) team uploads their data * [**Reservoir**](https://reservoir.api) provides enriched and cleaned NFT trading data * etc... > [!NOTE] > > The criteria for adding data in this category is that it should be relevant to the web3 ecosystem and should be of high quality. > [card] [Request a new data integration!](https://dune.com/enterprise) # cardano.adapot Source: https://docs.dune.com/data-catalog/cardano/adapot Description of the adapot table on Dune ## Table Description Contains per-epoch ADA supply distribution data for the Cardano blockchain. Each row represents a snapshot of how ADA is distributed across the system at a given epoch — including the treasury, reserves, UTXO set, staking deposits, fees, and reward pots. This table is useful for tracking Cardano's monetary policy, inflation schedule, and the flow of ADA between protocol-managed pots over time. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **epoch** | The epoch number for this snapshot. | integer | | **slot** | The slot number associated with this snapshot. | bigint | | **deposits_stake** | Total ADA locked in staking key deposits, in lovelace. | decimal(38,0) | | **fees** | Total transaction fees collected during this epoch, in lovelace. | decimal(38,0) | | **utxo** | Total ADA held in the UTXO set, in lovelace. | decimal(38,0) | | **treasury** | Total ADA in the treasury, in lovelace. | decimal(38,0) | | **reserves** | Total ADA remaining in the reserves, in lovelace. | decimal(38,0) | | **circulation** | Total ADA in circulation (outside reserves), in lovelace. | decimal(38,0) | | **distributed_rewards** | Total ADA distributed as staking rewards, in lovelace. | decimal(38,0) | | **undistributed_rewards** | Total ADA in the reward pot not yet distributed, in lovelace. | decimal(38,0) | | **rewards_pot** | Total ADA in the rewards pot, in lovelace. | decimal(38,0) | | **pool_rewards_pot** | Total ADA allocated to stake pool rewards, in lovelace. | decimal(38,0) | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=adapot](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=adapot) # cardano.address_utxo Source: https://docs.dune.com/data-catalog/cardano/address_utxo Description of the address_utxo table on Dune ## Table Description Contains unspent transaction output (UTXO) data for the Cardano blockchain. Each row represents a single output at a specific address, including native asset details (policy ID, asset name, quantity), datum information for smart contract interactions, and script references. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **tx_hash** | The hash of the transaction that created this output. | varchar | | **output_index** | The index of the output within the transaction. | integer | | **asset_unit** | The concatenation of policy ID and asset name, uniquely identifying the asset. Empty for ADA. | varchar | | **policy_id** | The hash of the minting policy script that governs the asset. | varchar | | **asset_name** | The name of the native asset (hex-encoded). | varchar | | **quantity** | The quantity of the asset held in this UTXO. | decimal(38,0) | | **address** | The Cardano address holding this UTXO. | varchar | | **stake_address** | The stake (reward) address associated with this UTXO's address. | varchar | | **payment_credential** | The payment credential (key hash or script hash) of the address. | varchar | | **stake_credential** | The stake credential of the address. | varchar | | **inline_datum** | The inline datum attached directly to the UTXO (CBOR-encoded). | varchar | | **datum_hash** | The hash of the datum attached to this UTXO (for non-inline datums). | varchar | | **script_ref** | A reference script attached to this UTXO, available for use by other transactions. | varchar | | **reference_script_hash** | The hash of the reference script attached to this UTXO. | varchar | | **is_collateral_return** | Whether this output is a collateral return output. | boolean | | **epoch** | The epoch in which this UTXO was created. | integer | | **slot** | The absolute slot number when this UTXO was created. | bigint | | **block_hash** | The hash of the block containing the transaction that created this UTXO. | varchar | | **block_time** | The timestamp of the block containing this UTXO. | timestamp | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=address_utxo](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=address_utxo) # cardano.asset_data Source: https://docs.dune.com/data-catalog/cardano/asset_data Description of the asset_data table on Dune ## Table Description Contains metadata for native assets on the Cardano blockchain. Each row represents a unique asset identified by its policy ID and token name, and includes off-chain metadata such as display name, ticker, decimals, URL, categories, and latest price information. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **policy_id** | The hash of the minting policy script governing this asset. | varchar | | **token_name** | The on-chain token name (hex-encoded). | varchar | | **name** | The human-readable display name of the asset. | varchar | | **url** | The URL associated with the asset (e.g., project website). | varchar | | **ticker** | The ticker symbol of the asset (e.g., SUNDAE, DJED). | varchar | | **decimals** | The number of decimal places used to display the asset's quantity. | bigint | | **created_at** | The timestamp when the asset was first minted. | timestamp | | **categories** | An array of categories the asset belongs to (e.g., DeFi, NFT). | array(varchar) | | **price** | The latest known price of the asset in USD. | double | | **fetched_at** | The timestamp when the metadata was last fetched from external sources. | timestamp | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=asset_data](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=asset_data) # cardano.asset_mint Source: https://docs.dune.com/data-catalog/cardano/asset_mint Description of the asset_mint table on Dune ## Table Description Tracks native asset minting and burning events on the Cardano blockchain. Each row represents a mint or burn operation for a specific native asset within a transaction. Positive quantities indicate minting; negative quantities indicate burning. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **slot** | The absolute slot number when the mint/burn occurred. | bigint | | **tx_hash** | The hash of the transaction containing the mint/burn. | varchar | | **policy_id** | The hash of the minting policy script governing this asset. | varchar | | **asset_name** | The name of the asset (hex-encoded). | varchar | | **asset_unit** | The concatenation of policy ID and asset name, uniquely identifying the asset. | varchar | | **fingerprint** | The CIP-14 asset fingerprint (human-readable asset identifier). | varchar | | **quantity** | The quantity minted (positive) or burned (negative). | bigint | | **mint_type** | The type of mint operation (e.g., mint or burn). | varchar | | **block_number** | The sequential number of the block containing this event. | bigint | | **block_time** | The timestamp of the block containing this event. | timestamp | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=asset_mint](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=asset_mint) # cardano.block Source: https://docs.dune.com/data-catalog/cardano/block Description of the block table on Dune ## Table Description Contains block-level data for the Cardano blockchain. Each row represents a single block and includes information about the epoch, slot, transaction count, total output value, fees collected, and protocol version. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **block_hash** | The hash uniquely identifying the block. | varchar | | **block_number** | The sequential number of the block in the chain. | bigint | | **block_time** | The timestamp when the block was produced. | timestamp | | **epoch** | The epoch number in which the block was produced. | integer | | **slot** | The absolute slot number of the block. | bigint | | **epoch_slot** | The slot number relative to the start of the epoch. | bigint | | **era** | The Cardano era during which the block was produced (e.g., Shelley, Alonzo, Conway). | integer | | **tx_count** | The number of transactions included in the block. | integer | | **total_output_lovelace** | The total output value of all transactions in the block, in lovelace. | decimal(38,0) | | **total_fees_lovelace** | The total transaction fees collected in the block, in lovelace. | bigint | | **protocol_version** | The protocol version active when the block was produced. | varchar | | **prev_block_hash** | The hash of the preceding block. | varchar | | **pool_hash** | The hash of the stake pool that produced the block. | varchar | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=block](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=block) # cardano.drep_dist_enriched Source: https://docs.dune.com/data-catalog/cardano/drep_dist_enriched Description of the drep_dist_enriched table on Dune ## Table Description Contains enriched delegated representative (DRep) voting power distribution data for the Cardano blockchain. Each row represents a DRep's delegated stake for a given epoch, including their type, on-chain ID, activity status, and optional human-readable name sourced from anchor metadata. This table is central to analyzing Cardano's on-chain governance participation under CIP-1694. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **drep_hash** | The hash identifier of the DRep. | varchar | | **drep_type** | The type of DRep (e.g., key hash, script hash, abstain, no confidence). | varchar | | **drep_id** | The bech32-encoded DRep ID. | varchar | | **amount** | The total voting power delegated to this DRep, in lovelace. | bigint | | **epoch** | The epoch number for this distribution snapshot. | integer | | **active_until** | The last epoch in which this DRep is considered active. | integer | | **expiry** | The epoch at which this DRep's registration expires if not renewed. | integer | | **anchor_url** | The URL pointing to the DRep's off-chain metadata. | varchar | | **drep_name** | Human-readable name of the DRep, sourced from anchor metadata. | varchar | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=drep_dist_enriched](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=drep_dist_enriched) # cardano.epoch_stake Source: https://docs.dune.com/data-catalog/cardano/epoch_stake Description of the epoch_stake table on Dune ## Table Description Contains per-epoch stake delegation snapshots for the Cardano blockchain. Each row represents the stake delegated by a specific stake address to a stake pool for a given epoch, including the epoch when delegation began and when it became active. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **epoch** | The epoch number for this stake snapshot. | integer | | **stake_address** | The stake (reward) address of the delegator. | varchar | | **stake_lovelace** | The amount of stake delegated, in lovelace. | decimal(38,0) | | **pool_hash** | The hash of the stake pool to which the stake is delegated. | varchar | | **delegation_epoch** | The epoch in which the delegation was registered. | integer | | **active_epoch** | The epoch in which the delegation became active for reward calculation. | integer | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=epoch_stake](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=epoch_stake) # cardano.gov_action_proposal Source: https://docs.dune.com/data-catalog/cardano/gov_action_proposal Description of the gov_action_proposal table on Dune ## Table Description Contains on-chain governance action proposals submitted under Cardano's CIP-1694 governance framework (Voltaire era). Each row represents a governance proposal, including the proposal type (e.g., parameter change, treasury withdrawal, hard fork initiation, no confidence), the deposit amount, return address, and an anchor linking to off-chain rationale. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **tx_hash** | The hash of the transaction that submitted the proposal. | varchar | | **proposal_index** | The index of the proposal within the transaction. | integer | | **tx_index** | The index of the transaction within the block. | integer | | **slot** | The absolute slot number when the proposal was submitted. | bigint | | **deposit_lovelace** | The deposit amount required to submit the proposal, in lovelace. | bigint | | **return_address** | The address to which the deposit will be returned. | varchar | | **proposal_type** | The type of governance action (e.g., ParameterChange, TreasuryWithdrawals, HardForkInitiation, NoConfidence, NewConstitution, InfoAction). | varchar | | **proposal_details** | JSON-encoded details specific to the proposal type. | varchar | | **anchor_url** | The URL pointing to off-chain rationale and metadata for the proposal. | varchar | | **anchor_hash** | The hash of the content at the anchor URL, for integrity verification. | varchar | | **epoch** | The epoch in which the proposal was submitted. | integer | | **block_number** | The sequential number of the block containing the proposal. | bigint | | **block_time** | The timestamp of the block containing the proposal. | timestamp | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=gov_action_proposal](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=gov_action_proposal) # cardano.gov_action_proposal_status Source: https://docs.dune.com/data-catalog/cardano/gov_action_proposal_status Description of the gov_action_proposal_status table on Dune ## Table Description Tracks the current status and voting statistics for Cardano governance proposals. Each row represents the latest state of a governance action, including whether it has been ratified, expired, or is still active, along with aggregated voting statistics broken down by voter role. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **gov_action_tx_hash** | The hash of the transaction that submitted the governance proposal. | varchar | | **gov_action_index** | The index of the governance proposal within its submission transaction. | integer | | **proposal_type** | The type of governance action (e.g., ParameterChange, TreasuryWithdrawals). | varchar | | **status** | The current status of the proposal (e.g., Active, Ratified, Expired, Enacted). | varchar | | **voting_stats** | JSON-encoded voting statistics including vote counts by role (DRep, SPO, CC). | varchar | | **epoch** | The epoch as of which this status snapshot applies. | integer | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=gov_action_proposal_status](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=gov_action_proposal_status) # cardano.gov_action_vote Source: https://docs.dune.com/data-catalog/cardano/gov_action_vote Description of the gov_action_vote table on Dune ## Table Description Contains votes cast on Cardano governance action proposals. Under CIP-1694, three groups can vote: Delegated Representatives (DReps), Stake Pool Operators (SPOs), and the Constitutional Committee. Each row represents a single vote, including the voter role, the governance action being voted on, and the vote cast (yes, no, or abstain). ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **tx_hash** | The hash of the transaction containing this vote. | varchar | | **vote_index** | The index of the vote within the transaction. | integer | | **tx_index** | The index of the transaction within the block. | integer | | **slot** | The absolute slot number when the vote was cast. | bigint | | **voter_role** | The role of the voter (e.g., DRep, SPO, ConstitutionalCommittee). | varchar | | **voter_hash** | The hash identifying the voter (DRep credential, pool hash, or CC member hash). | varchar | | **gov_action_tx_hash** | The hash of the transaction that submitted the governance proposal being voted on. | varchar | | **gov_action_index** | The index of the governance proposal within its submission transaction. | integer | | **vote** | The vote cast (e.g., Yes, No, Abstain). | varchar | | **anchor_url** | The URL pointing to off-chain rationale for the vote. | varchar | | **anchor_hash** | The hash of the content at the anchor URL. | varchar | | **epoch** | The epoch in which the vote was cast. | integer | | **block_number** | The sequential number of the block containing this vote. | bigint | | **block_time** | The timestamp of the block containing this vote. | timestamp | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=gov_action_vote](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=gov_action_vote) # cardano.off_chain_pool_data Source: https://docs.dune.com/data-catalog/cardano/off_chain_pool_data Description of the off_chain_pool_data table on Dune ## Table Description Contains off-chain metadata for Cardano stake pools. Each row represents a stake pool's self-reported metadata — including its ticker symbol, name, description, and homepage — as fetched from the metadata URL registered on-chain. This table is useful for enriching on-chain staking data with human-readable pool identifiers. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **pool_hash** | The hash identifier of the stake pool. | varchar | | **pool_id** | The bech32-encoded pool ID. | varchar | | **ticker** | The pool's ticker symbol (e.g., BLOCK, ADAOZ). | varchar | | **name** | The human-readable name of the pool. | varchar | | **description** | A description of the pool provided by the operator. | varchar | | **homepage** | The URL of the pool operator's homepage. | varchar | | **metadata_url** | The URL from which the pool metadata was fetched. | varchar | | **metadata_hash** | The hash of the metadata content, for integrity verification. | varchar | | **fetched_at** | The timestamp when the metadata was last fetched. | timestamp | | **version** | The version number of the metadata record. | integer | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=off_chain_pool_data](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=off_chain_pool_data) # Cardano Data Source: https://docs.dune.com/data-catalog/cardano/overview Cardano blockchain data on Dune ## What is Cardano? Cardano is an open-source, proof-of-stake blockchain platform designed for security, scalability, and sustainability. Built on peer-reviewed academic research and developed using the Haskell programming language, Cardano uses the Ouroboros consensus protocol — the first provably secure proof-of-stake protocol. The platform supports smart contracts through Plutus (based on Haskell) and Marlowe (a domain-specific language for financial contracts), and uses an extended UTXO (eUTXO) model that combines the security benefits of Bitcoin's UTXO model with the programmability of account-based systems. Cardano's native token, ADA, is used for transaction fees, staking, and governance participation. The smallest unit of ADA is called a **lovelace** (1 ADA = 1,000,000 lovelace). ## Key Concepts of Cardano ### **Extended UTXO Model (eUTXO)** Unlike account-based blockchains, Cardano uses an extended UTXO model where each transaction consumes unspent outputs and produces new ones. This model enables deterministic transaction execution — users can verify the outcome of a transaction before submitting it. The "extended" part allows UTXOs to carry arbitrary data (datums) and be locked by scripts (validators). ### **Epochs and Slots** Cardano divides time into **epochs** (approximately 5 days each), which are subdivided into **slots** (1 second each). A block can be produced in each slot by a slot leader selected through the Ouroboros protocol. This structure governs staking rewards, delegation cycles, and governance timelines. ### **Staking and Delegation** ADA holders can delegate their stake to stake pools without locking their funds. Staking rewards are calculated per epoch based on the amount of stake delegated to a pool. The `epoch_stake` and `pool_reward` tables provide visibility into delegation snapshots and reward distributions. ### **Native Assets** Cardano supports native multi-asset functionality at the ledger level — tokens are treated as first-class citizens alongside ADA without requiring smart contracts. Each native asset is identified by a **policy ID** (the hash of the minting policy script) and an **asset name**. The `asset_mint` and `asset_data` tables track minting events and token metadata. ### **Plutus Smart Contracts** Cardano smart contracts (validators) are written in Plutus and executed on-chain when UTXOs guarded by scripts are consumed. Transaction scripts include redeemers (input data to the script) and datums (data attached to UTXOs). The `transaction_scripts` table captures script execution details including resource consumption. ### **On-Chain Governance (CIP-1694)** Cardano's Voltaire era introduced on-chain governance, allowing ADA holders, stake pool operators, and a constitutional committee to vote on governance actions such as protocol parameter changes, treasury withdrawals, and hard forks. The `gov_action_proposal`, `gov_action_vote`, and `gov_action_proposal_status` tables provide full visibility into governance activity. > [card] [Cardano documentation](https://docs.cardano.org) > > Explore comprehensive documentation of Cardano, detailing its architecture, protocol, and resources for developers. > [card] [Cardano explorer](https://cardanoscan.io) > > Browse blocks, transactions, and stake pools on Cardano's block explorer. ## Cardano Data on Dune Cardano data on Dune covers core ledger activity (blocks, transactions, UTXOs), native assets, staking and rewards, smart contract execution, and on-chain governance. Here are the Cardano tables available on Dune: > [card] [Blocks](/data-catalog/cardano/block) > > Block-level data including epoch, slot, transaction counts, total output, and fees. > [card] [Transactions](/data-catalog/cardano/transaction) > > Transaction details including fees, validity status, and input/output counts. > [card] [Address UTXOs](/data-catalog/cardano/address_utxo) > > Unspent transaction outputs with asset details, addresses, datums, and script references. > [card] [Transaction Inputs](/data-catalog/cardano/tx_input) > > Records of UTXO consumption, linking spent outputs to the transactions that spend them. > [card] [Epoch Stake](/data-catalog/cardano/epoch_stake) > > Per-epoch stake delegation snapshots showing stake amounts and pool assignments. > [card] [Pool Rewards](/data-catalog/cardano/pool_reward) > > Staking reward distributions per epoch, including reward type and pool information. > [card] [Asset Mints](/data-catalog/cardano/asset_mint) > > Native asset minting and burning events with policy IDs and quantities. > [card] [Asset Data](/data-catalog/cardano/asset_data) > > Token metadata including name, ticker, decimals, and price information. > [card] [Transaction Scripts](/data-catalog/cardano/transaction_scripts) > > Plutus and native script executions with redeemer data and resource consumption. > [card] [Smart Contract Registry](/data-catalog/cardano/smart_contract_registry) > > Registry of known smart contracts with project names, categories, and script languages. > [card] [Transaction Metadata](/data-catalog/cardano/transaction_metadata) > > Arbitrary JSON metadata attached to transactions via metadata labels. > [card] [Governance Proposals](/data-catalog/cardano/gov_action_proposal) > > On-chain governance action proposals including type, deposit, and anchor details. > [card] [Governance Votes](/data-catalog/cardano/gov_action_vote) > > Votes cast on governance proposals by DReps, SPOs, and the constitutional committee. > [card] [Governance Proposal Status](/data-catalog/cardano/gov_action_proposal_status) > > Current status and voting statistics for governance proposals. > [card] [ADA Pot](/data-catalog/cardano/adapot) > > Per-epoch ADA supply distribution across treasury, reserves, UTXO, and reward pots. > [card] [DRep Distribution](/data-catalog/cardano/drep_dist_enriched) > > Delegated representative voting power distribution and metadata per epoch. > [card] [Off-Chain Pool Data](/data-catalog/cardano/off_chain_pool_data) > > Stake pool off-chain metadata including ticker, name, description, and homepage. # cardano.pool_reward Source: https://docs.dune.com/data-catalog/cardano/pool_reward Description of the pool_reward table on Dune ## Table Description Contains staking reward distribution data for the Cardano blockchain. Each row represents a reward earned by a stake address for a specific epoch, including the reward type (leader, member, treasury, reserves), the pool that generated the reward, and the epoch in which the reward becomes spendable. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **stake_address** | The stake (reward) address that earned the reward. | varchar | | **earned_epoch** | The epoch in which the reward was earned. | integer | | **spendable_epoch** | The epoch in which the reward becomes spendable. | integer | | **reward_type** | The type of reward (e.g., leader, member, treasury, reserves). | varchar | | **pool_hash** | The hash of the stake pool that generated the reward. | varchar | | **amount_lovelace** | The reward amount, in lovelace. | decimal(38,0) | | **slot** | The slot number associated with the reward record. | bigint | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=pool_reward](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=pool_reward) # cardano.smart_contract_registry Source: https://docs.dune.com/data-catalog/cardano/smart_contract_registry Description of the smart_contract_registry table on Dune ## Table Description A curated registry of known smart contracts on the Cardano blockchain. Each row maps a script hash to human-readable metadata including the project name, contract name, category, purpose, and the scripting language used. This table is useful for enriching on-chain data with project-level context. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **script_hash** | The hash uniquely identifying the smart contract script. | varchar | | **project_name** | The name of the project that deployed the contract (e.g., SundaeSwap, Minswap). | varchar | | **contract_name** | The specific name of the contract within the project. | varchar | | **category** | The high-level category of the contract (e.g., DEX, Lending, NFT Marketplace). | varchar | | **sub_category** | A more specific sub-category for the contract. | varchar | | **purpose** | The purpose or function of the contract (e.g., swap, liquidity pool, oracle). | varchar | | **language** | The scripting language used (e.g., Plutus V1, Plutus V2, Plutus V3, Aiken). | varchar | | **fetched_at** | The timestamp when the registry data was last fetched. | timestamp | | **version** | The version number of the contract metadata entry. | integer | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=smart_contract_registry](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=smart_contract_registry) # cardano.transaction Source: https://docs.dune.com/data-catalog/cardano/transaction Description of the transaction table on Dune ## Table Description Contains transaction-level data for the Cardano blockchain. Each row represents a single transaction and includes fee information, validity status, input/output counts, and references to collateral and script data. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **tx_hash** | The hash uniquely identifying the transaction. | varchar | | **block_hash** | The hash of the block containing this transaction. | varchar | | **block_number** | The sequential number of the block containing this transaction. | bigint | | **slot** | The absolute slot number of the block containing this transaction. | bigint | | **epoch** | The epoch number in which the transaction was included. | integer | | **block_time** | The timestamp of the block containing this transaction. | timestamp | | **tx_index** | The index position of the transaction within the block. | integer | | **fee_lovelace** | The fee paid for the transaction, in lovelace. | bigint | | **is_invalid** | Whether the transaction failed phase-2 validation (script execution). | boolean | | **script_data_hash** | The hash of the script-related data (datums and redeemers) included in the transaction. | varchar | | **total_collateral_lovelace** | The total collateral provided for script execution, in lovelace. | bigint | | **treasury_donation_lovelace** | The amount donated to the Cardano treasury, in lovelace. | bigint | | **inputs** | JSON array of transaction inputs (UTXOs consumed). | varchar | | **outputs** | JSON array of transaction outputs (UTXOs created). | varchar | | **reference_inputs** | JSON array of reference inputs used for read-only access to UTXOs. | varchar | | **collateral_inputs** | JSON array of collateral inputs used in case of script failure. | varchar | | **input_count** | The number of inputs consumed by the transaction. | bigint | | **output_count** | The number of outputs produced by the transaction. | bigint | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=transaction](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=transaction) # cardano.transaction_metadata Source: https://docs.dune.com/data-catalog/cardano/transaction_metadata Description of the transaction_metadata table on Dune ## Table Description Contains arbitrary metadata attached to Cardano transactions. Cardano allows transactions to include structured metadata indexed by integer keys (metadata labels). Common uses include NFT metadata (label 721), message signing, and protocol-specific data. Each row represents a single metadata key-value pair within a transaction. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **slot** | The absolute slot number of the block containing this transaction. | bigint | | **block_number** | The sequential number of the block containing this transaction. | bigint | | **block_time** | The timestamp of the block containing this transaction. | timestamp | | **tx_hash** | The hash of the transaction containing this metadata. | varchar | | **metadata_key** | The integer label identifying the metadata entry (e.g., 721 for NFT metadata). | varchar | | **metadata_json** | The JSON-encoded metadata value associated with the key. | varchar | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=transaction_metadata](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=transaction_metadata) # cardano.transaction_scripts Source: https://docs.dune.com/data-catalog/cardano/transaction_scripts Description of the transaction_scripts table on Dune ## Table Description Contains smart contract script execution data for Cardano transactions. Each row represents a script (Plutus or native) invoked during a transaction, including its purpose (spend, mint, certify, reward), redeemer data, datum hash, and computational resource consumption (memory and CPU units). ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **slot** | The absolute slot number of the block containing this transaction. | bigint | | **block_number** | The sequential number of the block containing this transaction. | bigint | | **block_hash** | The hash of the block containing this transaction. | varchar | | **block_time** | The timestamp of the block containing this transaction. | timestamp | | **tx_hash** | The hash of the transaction that invoked this script. | varchar | | **script_hash** | The hash uniquely identifying the script. | varchar | | **script_type** | The type of script (e.g., 0 = native, 1 = Plutus V1, 2 = Plutus V2, 3 = Plutus V3). | integer | | **datum_hash** | The hash of the datum consumed by the script. | varchar | | **purpose** | The purpose of the script execution (e.g., spend, mint, certify, reward). | varchar | | **redeemer_index** | The index of the redeemer in the transaction's redeemer list. | integer | | **redeemer_cbor** | The CBOR-encoded redeemer data passed to the script. | varchar | | **redeemer_data_hash** | The hash of the redeemer data. | varchar | | **execution_mem_units** | The memory units consumed by the script execution. | bigint | | **execution_cpu_steps** | The CPU steps consumed by the script execution. | bigint | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=transaction_scripts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=transaction_scripts) # cardano.tx_input Source: https://docs.dune.com/data-catalog/cardano/tx_input Description of the tx_input table on Dune ## Table Description Tracks the consumption of UTXOs on the Cardano blockchain. Each row represents a UTXO being spent, linking the original output (identified by transaction hash and output index) to the transaction and block in which it was consumed. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **tx_hash** | The hash of the transaction that originally created the UTXO. | varchar | | **output_index** | The index of the output in the original transaction. | integer | | **spent_tx_hash** | The hash of the transaction that spent this UTXO. | varchar | | **spent_at_slot** | The absolute slot number when this UTXO was spent. | bigint | | **spent_at_block** | The block number in which this UTXO was spent. | bigint | | **spent_at_block_hash** | The hash of the block in which this UTXO was spent. | varchar | | **spent_block_time** | The timestamp of the block in which this UTXO was spent. | timestamp | | **spent_epoch** | The epoch in which this UTXO was spent. | integer | | **\_updated_at** | The time when this record was last updated. | timestamp | | **\_ingested_at** | The time when this record was ingested into Dune. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=tx_input](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cardano\&table_name_t6f0df=tx_input) # dune.neynar.dataset_farcaster_casts Source: https://docs.dune.com/data-catalog/community/farcaster/casts Farcaster casts — posts, replies, and threads across the Farcaster social protocol. ## Table description The `dune.neynar.dataset_farcaster_casts` table contains all casts (posts and replies) on the Farcaster protocol, including text content, embeds, mentions, and threading information. ## Table Schema | Column Name | Type | Description | | - | - | - | | `id` | `BIGINT` | Auto-incrementing row identifier | | `created_at` | `TIMESTAMP` | Timestamp when the record was created in the database | | `updated_at` | `TIMESTAMP` | Timestamp when the record was last updated in the database | | `deleted_at` | `TIMESTAMP` | Timestamp when the cast was deleted on the Farcaster protocol | | `timestamp` | `TIMESTAMP` | Timestamp when the cast was created on the Farcaster protocol | | `fid` | `BIGINT` | Farcaster user ID of the cast author | | `hash` | `VARBINARY` | Unique hash of the cast | | `parent_hash` | `VARBINARY` | Hash of the parent cast (for replies) | | `parent_fid` | `BIGINT` | Farcaster user ID of the parent cast author | | `parent_url` | `VARCHAR` | Channel URL where the cast was posted (null for direct replies) | | `text` | `VARCHAR` | Text content of the cast | | `embeds` | `VARCHAR` | JSON-encoded attachments (images, links, frames, etc.) | | `mentions` | `ARRAY(BIGINT)` | Array of Farcaster user IDs mentioned in the cast | | `mentions_positions` | `ARRAY(INTEGER)` | Byte positions in the cast text where mentions are placed | | `root_parent_hash` | `VARBINARY` | Hash of the root cast that started the thread | | `root_parent_url` | `VARCHAR` | Channel URL of the root cast in the thread | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_casts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_casts) # dune.neynar.dataset_farcaster_fids Source: https://docs.dune.com/data-catalog/community/farcaster/fids Farcaster FIDs — unique user identifiers and registration data. ## Table description The `dune.neynar.dataset_farcaster_fids` table contains all Farcaster user IDs (FIDs) and the custody addresses that own them. Each row represents a registered user on the protocol. ## Table Schema | Column Name | Type | Description | | - | - | - | | `fid` | `BIGINT` | Unique Farcaster user ID | | `created_at` | `TIMESTAMP` | Timestamp when the record was created in the database | | `updated_at` | `TIMESTAMP` | Timestamp when the record was last updated in the database | | `custody_address` | `VARBINARY` | Wallet address that holds custody of the Farcaster account | | `registered_at` | `TIMESTAMP` | Timestamp when the FID was registered on the protocol | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_fids](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_fids) # dune.neynar.dataset_farcaster_fnames Source: https://docs.dune.com/data-catalog/community/farcaster/fnames Farcaster usernames — fname registrations and ownership history. ## Table description The `dune.neynar.dataset_farcaster_fnames` table contains usernames (fnames) associated with Farcaster user IDs. Fnames are human-readable identifiers that can be transferred and expire. ## Table Schema | Column Name | Type | Description | | - | - | - | | `fname` | `VARCHAR` | Farcaster username of the user | | `created_at` | `TIMESTAMP` | Timestamp when the record was created in the database | | `updated_at` | `TIMESTAMP` | Timestamp when the record was last updated in the database | | `custody_address` | `VARBINARY` | Wallet address that holds custody of the Farcaster account | | `expires_at` | `TIMESTAMP` | Timestamp when the username registration expires | | `fid` | `BIGINT` | Farcaster user ID associated with this username | | `deleted_at` | `TIMESTAMP` | Timestamp when the fname was removed on the Farcaster protocol | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_fnames](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_fnames) # dune.neynar.dataset_farcaster_links Source: https://docs.dune.com/data-catalog/community/farcaster/links Farcaster social links — follow/unfollow relationships between users. ## Table description The `dune.neynar.dataset_farcaster_links` table contains data about follower and following relationships on the Farcaster protocol. Each row represents a social graph link between two users. ## Table Schema | Column Name | Type | Description | | - | - | - | | `id` | `BIGINT` | Auto-incrementing row identifier | | `fid` | `BIGINT` | Farcaster user ID of the user who created the link | | `target_fid` | `BIGINT` | Farcaster user ID of the link target | | `hash` | `VARBINARY` | Unique hash of the link on the protocol | | `timestamp` | `TIMESTAMP` | Timestamp when the link was created on the Farcaster protocol | | `created_at` | `TIMESTAMP` | Timestamp when the record was created in the database | | `updated_at` | `TIMESTAMP` | Timestamp when the record was last updated in the database | | `deleted_at` | `TIMESTAMP` | Timestamp when the link was removed on the Farcaster protocol | | `type` | `VARCHAR` | Link type (e.g. `follow`) | | `display_timestamp` | `TIMESTAMP` | Display-friendly timestamp for the link event | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_links](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_links) # Farcaster data from Neynar Source: https://docs.dune.com/data-catalog/community/farcaster/overview Neynar is the development platform for web3 social protocols. Neynar makes Farcaster protocol data available on Dune. # Farcaster [Farcaster](https://farcaster.xyz) - a protocol for decentralized social apps Neynar is the development platform for web3 social protocols. Neynar makes Farcaster protocol data available on Dune. Check out [neynar.com](https://neynar.com) for Farcaster hubs, APIs or other processed data. **Website:** [neynar.com](https://neynar.com) **Docs:** [docs.neynar.com](https://docs.neynar.com) **Reach the team:** [Telegram](https://t.me/rishdoteth) ## Data available: > [card] [Casts](/data-catalog/community/farcaster/casts) > > All casts on the Farcaster protocol. > [card] [FIDs](/data-catalog/community/farcaster/fids) > > User IDs associated with users on the Farcaster protocol. > [card] [Fnames](/data-catalog/community/farcaster/fnames) > > Usernames for FIDs on the protocol. > [card] [Links](/data-catalog/community/farcaster/links) > > Follower and following graph on Farcaster. > [card] [Reactions](/data-catalog/community/farcaster/reactions) > > Likes and recast events on Farcaster. > [card] [Signers](/data-catalog/community/farcaster/signers) > > Signers for users on Farcaster. > [card] [Storage](/data-catalog/community/farcaster/storage) > > Storage units for Farcaster users. > [card] [User Data](/data-catalog/community/farcaster/user_data) > > User information for Farcaster users. > [card] [Verifications](/data-catalog/community/farcaster/verifications) > > Ethereum wallet addresses connected to Farcaster profiles. > [card] [Profiles with Addresses](/data-catalog/community/farcaster/profile_with_addresses) > > Farcaster user's profile data and their connected addresses. > [card] [Power Badge](/data-catalog/community/farcaster/power_badge) > > Warpcast power badge user lists by fid # dune.neynar.dataset_farcaster_warpcast_power_users Source: https://docs.dune.com/data-catalog/community/farcaster/power_badge Warpcast power badge holders — users with the verified power badge on Warpcast. ## Table description The `dune.neynar.dataset_farcaster_warpcast_power_users` table contains all power badge users on Warpcast. Power badges are a Warpcast-specific concept and are NOT stored on the Farcaster protocol itself. The table only contains the current power badge FIDs, not historical data. Read more [about power badges](https://warpcast.notion.site/Power-Badge-d81fea2e953e4dafae7c85295ffaf3ae) and the [power badge API](https://docs.farcaster.xyz/reference/warpcast/api#get-all-power-badge-users). ## Table Schema | Column Name | Type | Description | | - | - | - | | `created_at` | `TIMESTAMP` | Timestamp when the record was created in the database | | `updated_at` | `TIMESTAMP` | Timestamp when the record was last updated in the database | | `deleted_at` | `TIMESTAMP` | Timestamp when the power badge was removed | | `fid` | `BIGINT` | Farcaster user ID of the power badge holder | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_warpcast_power_users](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_warpcast_power_users) # dune.neynar.dataset_farcaster_profile_with_addresses Source: https://docs.dune.com/data-catalog/community/farcaster/profile_with_addresses Farcaster profiles with verified addresses — user profiles linked to Ethereum addresses. ## Table description The `dune.neynar.dataset_farcaster_profile_with_addresses` table contains Farcaster user profile data combined with their connected wallet addresses. It provides a convenient denormalized view for querying user identity alongside on-chain addresses. ## Table Schema | Column Name | Type | Description | | - | - | - | | `fid` | `BIGINT` | Farcaster user ID | | `fname` | `VARCHAR` | Farcaster username | | `display_name` | `VARCHAR` | Display name chosen by the user | | `avatar_url` | `VARCHAR` | URL to the user's profile picture | | `bio` | `VARCHAR` | User's profile biography text | | `verified_addresses` | `VARCHAR` | JSON-encoded array of verified EVM wallet addresses connected to the profile | | `updated_at` | `TIMESTAMP` | Timestamp when the profile data was last updated | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_profile_with_addresses](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_profile_with_addresses) # dune.neynar.dataset_farcaster_reactions Source: https://docs.dune.com/data-catalog/community/farcaster/reactions Farcaster reactions — likes and recasts on posts. ## Table description The `dune.neynar.dataset_farcaster_reactions` table contains data about likes and recast events on the Farcaster protocol. Each row represents a single reaction by a user to a cast or URL. ## Table Schema | Column Name | Type | Description | | - | - | - | | `id` | `BIGINT` | Auto-incrementing row identifier | | `created_at` | `TIMESTAMP` | Timestamp when the record was created in the database | | `updated_at` | `TIMESTAMP` | Timestamp when the record was last updated in the database | | `deleted_at` | `TIMESTAMP` | Timestamp when the reaction was removed on the Farcaster protocol | | `timestamp` | `TIMESTAMP` | Timestamp when the reaction was created on the Farcaster protocol | | `reaction_type` | `BIGINT` | Type of reaction (1 = like, 2 = recast) | | `fid` | `BIGINT` | Farcaster user ID of the user who reacted | | `hash` | `VARBINARY` | Unique hash of the reaction | | `target_hash` | `VARBINARY` | Hash of the cast being reacted to | | `target_fid` | `BIGINT` | Farcaster user ID of the author of the target cast | | `target_url` | `VARCHAR` | URL being reacted to (for URL-targeted reactions) | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_reactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_reactions) # dune.neynar.dataset_farcaster_signers Source: https://docs.dune.com/data-catalog/community/farcaster/signers Farcaster signers — authorized signing keys for user accounts. ## Table description The `dune.neynar.dataset_farcaster_signers` table contains data about signers associated with users on the Farcaster protocol. Signers are authorized key pairs that can perform actions on behalf of a user. ## Table Schema | Column Name | Type | Description | | - | - | - | | `id` | `BIGINT` | Auto-incrementing row identifier | | `created_at` | `TIMESTAMP` | Timestamp when the record was created in the database | | `updated_at` | `TIMESTAMP` | Timestamp when the record was last updated in the database | | `deleted_at` | `TIMESTAMP` | Timestamp when the signer was revoked on the Farcaster protocol | | `timestamp` | `TIMESTAMP` | Timestamp when the signer was created on the Farcaster protocol | | `fid` | `BIGINT` | Farcaster user ID that the signer belongs to | | `signer` | `VARBINARY` | Public key of the authorized signer | | `name` | `VARCHAR` | Human-readable name assigned to the signer by the application | | `app_fid` | `BIGINT` | Farcaster user ID of the application that created the signer | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_signers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_signers) # dune.neynar.dataset_farcaster_storage Source: https://docs.dune.com/data-catalog/community/farcaster/storage Farcaster storage allocations — storage units purchased per user. ## Table description The `dune.neynar.dataset_farcaster_storage` table contains data about the storage units available for users on the Farcaster protocol. Storage units determine how many casts, reactions, and links a user can create. ## Table Schema | Column Name | Type | Description | | - | - | - | | `id` | `BIGINT` | Auto-incrementing row identifier | | `created_at` | `TIMESTAMP` | Timestamp when the record was created in the database | | `updated_at` | `TIMESTAMP` | Timestamp when the record was last updated in the database | | `deleted_at` | `TIMESTAMP` | Timestamp when the storage allocation was removed | | `timestamp` | `TIMESTAMP` | Timestamp when the storage was allocated on the Farcaster protocol | | `fid` | `BIGINT` | Farcaster user ID of the storage owner | | `units` | `BIGINT` | Number of storage units allocated to the user | | `expiry` | `TIMESTAMP` | Timestamp when the storage allocation expires | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_storage](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_storage) # dune.neynar.dataset_farcaster_user_data Source: https://docs.dune.com/data-catalog/community/farcaster/user_data Farcaster user data — profile fields like bio, display name, and avatar. ## Table description The `dune.neynar.dataset_farcaster_user_data` table contains user profile data on the Farcaster protocol. Each row represents a single key-value pair of user information, such as display name, bio, or avatar URL. Join with the fids or fnames table for complete user profiles. ## Table Schema | Column Name | Type | Description | | - | - | - | | `id` | `BIGINT` | Auto-incrementing row identifier | | `created_at` | `TIMESTAMP` | Timestamp when the record was created in the database | | `updated_at` | `TIMESTAMP` | Timestamp when the record was last updated in the database | | `deleted_at` | `TIMESTAMP` | Timestamp when the data was removed on the Farcaster protocol | | `timestamp` | `TIMESTAMP` | Timestamp when the data was set on the Farcaster protocol | | `fid` | `BIGINT` | Farcaster user ID the data belongs to | | `hash` | `VARBINARY` | Unique hash of the user data message | | `type` | `BIGINT` | Type of user data (1 = pfp URL, 2 = display name, 3 = bio, 5 = URL, 6 = preferred fname) | | `value` | `VARCHAR` | The value of the user data field | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_user_data](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_user_data) # dune.neynar.dataset_farcaster_verifications Source: https://docs.dune.com/data-catalog/community/farcaster/verifications Farcaster address verifications — Ethereum addresses verified by Farcaster users. ## Table description The `dune.neynar.dataset_farcaster_verifications` table contains data about wallet address verifications connected to Farcaster profiles. Users verify ownership of Ethereum and other addresses to link their on-chain identity with their Farcaster account. ## Table Schema | Column Name | Type | Description | | - | - | - | | `id` | `BIGINT` | Auto-incrementing row identifier | | `created_at` | `TIMESTAMP` | Timestamp when the record was created in the database | | `updated_at` | `TIMESTAMP` | Timestamp when the record was last updated in the database | | `deleted_at` | `TIMESTAMP` | Timestamp when the verification was removed on the Farcaster protocol | | `timestamp` | `TIMESTAMP` | Timestamp when the verification was created on the Farcaster protocol | | `fid` | `BIGINT` | Farcaster user ID of the profile owner | | `hash` | `VARBINARY` | Unique hash of the verification message | | `claim` | `VARCHAR` | JSON-encoded verified wallet address and cryptographic proof of ownership | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_verifications](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.neynar\&table_name_t6f0df=dataset_farcaster_verifications) # dune.flashbots.dataset_mempool_dumpster Source: https://docs.dune.com/data-catalog/community/flashbots/mempool-dumpster Flashbots mempool data — pending transactions captured from the public mempool. ## Table description The `dune.flashbots.dataset_mempool_dumpster` table captures detailed transaction data from the Ethereum mempool. It includes transactions that might attempt to extract value through reordering, sandwiching, or other MEV strategies. ## Column descriptions | Column Name | Description | Data Type | | - | - | - | | `to` | The recipient address of the transaction. | varchar | | `from` | The sender address of the transaction. | varchar | | `hash` | The unique transaction hash. | varchar | | `nonce` | The nonce of the transaction, a counter of the sender's transactions. | Integer | | `value` | The value transferred in the transaction, in wei. | BigInt | | `gas` | The gas limit set for the transaction. | Integer | | `gas_price` | The gas price set for the transaction, in wei. | BigInt | | `data_size` | The size of the data payload in the transaction, in bytes. | Integer | | `data_4bytes` | The first four bytes of the transaction data, typically the method identifier in a contract call. | varchar | | `sources` | The sources that captured the transaction data. | varchar | | `chain_id` | The identifier for the blockchain network (e.g., 1 for Ethereum Mainnet). | Integer | | `gas_fee_cap` | The maximum amount of gas fee the sender is willing to pay (EIP-1559). | BigInt | | `gas_tip_cap` | The maximum tip the sender is willing to pay miners (EIP-1559). | BigInt | | `timestamp_ms` | The timestamp when the transaction was first seen, in milliseconds. | BigInt | | `inclusion_delay_ms` | The delay in milliseconds from when the transaction was first seen to when it was included in a block. | Integer | | `included_at_block_height` | The block height at which the transaction was included. | Integer | | `included_block_timestamp_ms` | The timestamp of the block at which the transaction was included, in milliseconds. | BigInt | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.flashbots\&table_name_t6f0df=dataset_mempool_dumpster](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.flashbots\&table_name_t6f0df=dataset_mempool_dumpster) # Flashbots Data Source: https://docs.dune.com/data-catalog/community/flashbots/overview Flashbots data on Dune # Flashbots [Flashbots](https://flashbots.net) - a research and development organization focusing on minimizing the negative externalities and risks of MEV (Maximal Extractable Value) in the blockchain ecosystem. Flashbots is dedicated to advancing transparent and fair blockchain protocols, specifically addressing issues related to MEV to protect ecosystem integrity. **Website** : [https://flashbots.net](https://flashbots.net) **Documentation** : [https://docs.flashbots.net](https://docs.flashbots.net) ## Data available: > [card] [Mempool Dumpster Dataset](/data-catalog/community/flashbots/mempool-dumpster) > > Comprehensive dataset providing insights into mempool transactions captured by Flashbots, focusing on MEV strategies and transactions. # hyperliquid.market_data Source: https://docs.dune.com/data-catalog/community/hyperliquid/market-data Hyperliquid market data — order book snapshots, funding rates, open interest, and trade history. ## Table description The `hyperliquid.market_data` table contains historical trading data from the Hyperliquid decentralized exchange. The data includes trading volume, open interest, funding rates, and other market metrics across all perpetual futures markets on the platform. The data is updated monthly. ## Table Schema | Column Name | Type | Description | | - | - | - | | time | timestamp | Timestamp of the market data snapshot | | coin | varchar | Ticker symbol of the perpetual futures asset | | funding | double | Current funding rate for the perpetual contract | | open_interest | double | Total open interest in the asset | | prev_day_px | double | Closing price from the previous day | | day_ntl_vlm | double | Notional trading volume over the day | | premium | double | Premium of the perpetual price over the oracle price | | oracle_px | double | Oracle (spot index) price of the asset | | mark_px | double | Mark price used for margin and liquidation calculations | | mid_px | double | Mid-point price between best bid and best ask | | impact_bid_px | double | Bid-side price adjusted for a standard impact notional | | impact_ask_px | double | Ask-side price adjusted for a standard impact notional | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperliquid\&table_name_t6f0df=market_data](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperliquid\&table_name_t6f0df=market_data) # Hyperliquid Source: https://docs.dune.com/data-catalog/community/hyperliquid/overview Raw, decoded, and curated Hyperliquid HyperCore data on Dune: trading, order book, funding, account activity, and RWA markets Hyperliquid runs as one Layer 1 split across two execution environments. HyperEVM handles the smart contract side and is available on Dune as a standard EVM chain. HyperCore is the native trading engine, and Dune ingests it directly from Hyperliquid's archives and streaming endpoints, then publishes it in three layers: raw source records, decoded tables, and curated analysis-ready models. The exchange's order flow, executions, funding, and account activity are queryable as structured tables rather than raw explorer output. > [!NOTE] > > **Maintained by:** Dune · **History:** from January 2025 (decoded actions and node fills) · **Layers:** raw, decoded, and curated > [!NOTE] > > 🔒 **Gated dataset.** Raw, decoded, and curated Hyperliquid tables are private and available to enterprise customers and trial accounts. See the [access tiers overview](/data-catalog/overview#access-tiers-public-vs-gated-datasets) or [contact the Dune team](https://dune.com/enterprise#contact-form) to enable access. ## What it is Hyperliquid coverage on Dune comes in three layers. > [card] Raw HyperCore > > **Available.** Source records as ingested: every action submitted to the Hyperliquid L1, unaltered node fills, and every Level 2 order-book diff event. > [card] Decoded HyperCore > > **Available.** Just under 30 tables spanning trading actions, fills, funding, account and staking activity, market reference data, prediction markets, and reconstructed order-book snapshots. > [card] Curated > > **Available.** Analysis-ready perpetual-futures models covering every market on the venue, plus the HIP-3 real-world-asset subset in the RWA collection. All three layers are gated and available to enterprise customers and trial accounts. [Request access](https://dune.com/enterprise#contact-form) to scope an evaluation. ## Who it's for Hedge funds, crypto funds and VCs, asset managers, centralized exchanges, and market data, ratings, and insurance providers. Typical teams are quant research, trading, market data product, and data engineering. ## Use cases * **Backtest and size a strategy before committing capital.** Replay fills alongside the order book to test entry and exit rules, estimate slippage at real depth, and check whether a target position size was ever fillable, instead of assuming mid-price execution. * **Measure execution quality.** Compare your own fills against the book state and the wider tape at the same moment to quantify slippage, fee drag, and adverse selection, and to settle whether a venue or routing change actually helped. * **Build funding, basis, and carry signals.** Use per-market funding payment history with open interest and positioning to price carry trades and spot when funding is about to flip against a crowded side. * **Monitor liquidity and depth withdrawal.** Track how much size sits at each price level over time to see liquidity thin out ahead of volatility, which matters both for execution risk and for venue quality assessment. * **Run liquidation and risk surveillance.** Reconstruct liquidation cascades from fills, leverage, and ledger balance changes to stress-test margin assumptions and quantify concentration risk across accounts and markets. * **Track RWA demand as a cross-asset signal.** Use HIP-3 volume, open interest, funding, and leverage as a live proxy for trader demand in equities, commodities, indices, and FX, including markets with no comparable onchain spot instrument. * **Feed an internal or commercial market-data platform.** Add Hyperliquid trades, market reference data, and Level 2 depth to an existing data product or internal warehouse without building the ingestion yourself. ## Coverage * **Perpetual and spot trading**: orders, fills, cancels, TWAPs, leverage, margin, funding, and new market deployments. * **Order book**: Level 2 diffs and one-minute depth snapshots. Level 2 here means individual bid and ask price levels, not a separate Layer 2 blockchain. * **Trade executions**: price, size, side, fees, and PnL for every fill. * **Account and network activity**: transfers, withdrawals, sub-accounts, vaults, approvals, referrals, balance changes, liquidations, staking, validator rewards, and delegations. * **Prediction markets**: HIP-4 market definitions, outcomes, votes, and related trading activity. * **RWA markets**: HIP-3 perpetual markets giving synthetic exposure to equities, commodities, FX, indices, and other real-world assets. ### History Decoded HyperCore actions and node fills are backfilled from Hyperliquid-provided archives, with first data from January 2025. Order-book depth is captured from the live stream forward, starting April 2026, and historical ingestion is in progress — book state before then is not yet available, so backtests that need earlier depth cannot be run against these tables. ### Freshness and granularity | Data | Freshness | Granularity | | - | - | - | | Actions and fills | About 20 minutes behind live, bounded by how often Hyperliquid publishes to its archive bucket | One row per individual user or system action, and one row per individual fill | | Level 2 order-book diffs | Streamed continuously as changes occur, with no batch or archive delay | One row per change to a bid or ask at a single price level, per coin | | Order-book snapshots | Rebuilt every minute | Complete book state across all price levels, per coin, at one-minute intervals | | Market reference data | Updated as markets are deployed or reconfigured | One row per perpetual market, spot market, token, margin tier, or prediction market | ### Why Dune * **Query Hyperliquid without operating the pipeline.** Raw, decoded, and curated tables are available without maintaining archive ingestion, streaming, decoding, and order-book reconstruction yourself. * **Connect activity to market state.** Submitted actions and executions can be analyzed alongside funding, positions, and changes in available liquidity, in the same place as the rest of Dune's chain coverage. ## Raw and decoded tables Just over 30 tables in total. Full table and column documentation is shared during an evaluation. **Raw source records:** * `hyperliquid.l1_transactions_raw`: every action submitted to the Hyperliquid L1, parsed from the `replica_cmds` archive, and the source for the decoded tables * `hyperliquid.node_fills_raw`: unaltered node fill data as published * `hyperliquid.l2_book_diff_raw`: every Level 2 order-book diff event, one row per price-level update per coin **Decoded tables, grouped:** * **Trading actions**: orders, fills, cancels, TWAPs, leverage and margin updates, and perpetual and spot market deployments. * **Account and network activity**: transfers and withdrawals, sub-accounts, vaults, approvals, referrals, ledger balance changes including liquidations, staking, delegations, validator rewards, and funding payments. * **Market reference data**: perpetual and spot market configuration, tokens, margin tiers, and prediction-market questions and outcomes. * **Order book**: `hyperliquid.l2_book_1m` holds reconstructed one-minute snapshots, built by replaying the diff stream per coin. * **Fills**: `hyperliquid.node_fills_decoded` gives one row per fill, with price, size, side, fees, PnL, and liquidation detail. ## Curated tables Curated Hyperliquid coverage ships in two collections, each documented column by column. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ### Perpetuals Trading — venue-wide The [Perpetuals Trading](/data-catalog/curated/perpetuals/hyperliquid/overview) collection covers every perpetual market on the venue in the `hyperliquid` schema: first-party markets, where `coin` is the bare ticker (`BTC`), and HIP-3 builder-deployed markets, where `coin` is `dex:SYMBOL` (`xyz:TSLA`). Spot and HIP-4 outcome markets are out of scope. Refreshed hourly; `coin` is the join key on every market-grained table. * [`hyperliquid.perp_market_details`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-details): market dimension — leverage and margin configuration, listing state, and curated classification * [`hyperliquid.perp_trades`](/data-catalog/curated/perpetuals/hyperliquid/perp-trades): one row per fill leg, both sides of every match, with fees, liquidation detail, and realized PnL * [`hyperliquid.perp_market_metrics_hourly`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-hourly) and [`_daily`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-daily): per-market OHLCV, volume, fees, open interest, and funding * [`hyperliquid.perp_positions_hourly`](/data-catalog/curated/perpetuals/hyperliquid/perp-positions-hourly): per-account position snapshots at each hourly funding round * [`hyperliquid.perp_accounts_daily`](/data-catalog/curated/perpetuals/hyperliquid/perp-accounts-daily): per-account daily trading, PnL, funding, and collateral flows * [`hyperliquid.perp_oracle_prices`](/data-catalog/curated/perpetuals/hyperliquid/perp-oracle-prices): minute-cadence oracle, mark, and mid prices * [`hyperliquid.perp_orderbook_1m`](/data-catalog/curated/perpetuals/hyperliquid/perp-orderbook-1m): one-minute L2 order book snapshots, resting bids and asks by price level Trade history starts 27 July 2025; open interest and funding start 27 September 2025. The registry is live and covers every first-party and HIP-3 market, including delisted and never-traded listings, so new listings appear without a docs or pipeline change. ### RWAs — the HIP-3 real-world-asset subset Five narrower tables in the `rwa_hyperliquid` schema ship as part of the [RWA dataset](/data-catalog/curated/rwa/overview). They carry the RWA entitlement rather than the HyperCore add-on, and add per-fill trader leverage and margin mode, which the venue-wide tables do not reconstruct. * [`rwa_hyperliquid.markets`](/data-catalog/curated/rwa/registry/hyperliquid-markets): HIP-3 market registry with asset class, issuer, platform, and leverage configuration * [`rwa_hyperliquid.perp_trades`](/data-catalog/curated/rwa/activity/perp-trades): taker-leg HIP-3 fills with notional, fees, leverage, and liquidation detail * [`rwa_hyperliquid.perp_metrics_hourly`](/data-catalog/curated/rwa/activity/perp-metrics-hourly): hourly aggregates per market * [`rwa_hyperliquid.perp_metrics_daily`](/data-catalog/curated/rwa/activity/perp-metrics-daily): daily aggregates per market * [`rwa_hyperliquid.perp_positions_hourly`](/data-catalog/curated/rwa/activity/perp-positions-hourly): per-account position snapshots at each hourly funding round > [!NOTE] > > HIP-3 markets are perpetuals, so they give synthetic exposure to the underlying asset rather than spot ownership of a tokenized share. > > Scope in `rwa_hyperliquid.markets` is default-deny: a market appears only once it has been curated into the RWA taxonomy, so crypto perps and uncurated new listings are excluded by design. The Perpetuals Trading collection and the raw and decoded tables carry every market without that filter. ## HyperEVM HyperEVM is covered separately as a standard EVM chain, with raw tables, decoded contract tables, and `dex.trades` support. See the [HyperEVM overview](/data-catalog/evm/hyperevm/overview) for what is indexed. These are two different data surfaces on the same Layer 1. HyperCore is the trading engine, and its tables are gated as described above. HyperEVM is the smart contract environment, and its tables are part of Dune's standard EVM coverage, so they are not gated and need no add-on. ## Explore and access > [card] [HyperCore Dashboard](https://dune.com/dune/hyperliquid-hypercore) > > The overview dashboard: trading volume, order book activity, funding, and account flow built on the HyperCore tables. > [card] [Launch Post](https://dune.com/blog/hyperliquid-hypercore-is-live-on-dune) > > Why Dune decoded HyperCore, what the pipeline covers, and what it makes possible. > [card] [hyperliquid.market_data](/data-catalog/community/hyperliquid/market-data) > > A separate community-contributed dataset, updated monthly: aggregate market snapshots with funding, open interest, and volume. Not part of the HyperCore pipeline. > [card] [Get Access](https://dune.com/enterprise#contact-form) > > Hyperliquid HyperCore tables are an enterprise add-on. Talk to the Dune data solutions team about a trial or enterprise access. # dune.lens.namespace_handle Source: https://docs.dune.com/data-catalog/community/lens/namespace-handle Lens Protocol handles — registered usernames in the Lens namespace. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.namespace_handle` table holds the handle information. Note that handles and profiles are 2 different NFTs. A handle has its own ID. ## Table Schema | Column Name | Type | Description | | - | - | - | | tld | varchar | Top-level domain of the handle namespace (e.g. `lens`) | | local_name | varchar | The local portion of the handle (the username part) | | handle_id | varbinary | Unique identifier for the handle NFT | | handle | varchar | Full handle string (e.g. `lens/alice`) | | owned_by | varbinary | Wallet address that currently owns the handle | | tx_hash | varbinary | Transaction hash of the handle creation or transfer | | block_hash | varbinary | Hash of the block containing the transaction | | block_number | integer | Block number of the transaction | | log_index | integer | Index of the event log within the transaction | | tx_index | integer | Index of the transaction within the block | | block_timestamp | timestamp | Timestamp of the block | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=namespace_handle](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=namespace_handle) # dune.lens.namespace_handle_link Source: https://docs.dune.com/data-catalog/community/lens/namespace-handle-link Lens handle-to-profile links — mappings between handles and profile NFTs. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.namespace_handle_link` table you link your handle to your profile and this holds the reference of the link. ## Table Schema | Column Name | Type | Description | | - | - | - | | tld | varchar | Top-level domain of the handle namespace | | handle_id | varbinary | Unique identifier of the handle NFT being linked | | token_id | varbinary | Token ID of the profile NFT the handle is linked to | | collection | varbinary | Contract address of the profile NFT collection | | transaction_executor | varbinary | Address that executed the link transaction | | tx_hash | varbinary | Transaction hash of the link event | | block_hash | varbinary | Hash of the block containing the transaction | | block_number | integer | Block number of the transaction | | log_index | integer | Index of the event log within the transaction | | tx_index | integer | Index of the transaction within the block | | block_timestamp | timestamp | Timestamp of the block | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=namespace_handle_link](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=namespace_handle_link) # Lens data Source: https://docs.dune.com/data-catalog/community/lens/overview Lens.xyz data on Dune > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. # Lens Protocol [Lens Protocol](https://lens.xyz) - a composable and decentralized social graph ready for new connections. Lens is a decentralized social graph that allows users to own their data and control their social connections. The protocol is designed to be composable, allowing developers to build new social applications on top of the Lens network. **Website** : [https://lens.xyz](https://lens.xyz) **Documentation** : [https://docs.lens.xyz](https://docs.lens.xyz) **Twitter** : [https://twitter.com/lensprotocol](https://twitter.com/lensprotocol) ## Data available: > [card] [Overview](/data-catalog/community/lens/overview) > > An overview of the Lens protocol data. > [card] [Namespace Handle](/data-catalog/community/lens/namespace-handle) > > Information about handle NFTs and how they are linked to Lens profiles. > [card] [Namespace Handle Link](/data-catalog/community/lens/namespace-handle-link) > > References between users' handles and their profiles in the Lens protocol. > [card] [Profile Follower](/data-catalog/community/lens/profile-follower) > > Data showing the follower relationships between users within the Lens ecosystem. > [card] [Profile Follow Module](/data-catalog/community/lens/profile-follow-module) > > Details on follow modules that users have engaged with on Lens. > [card] [Profile Follow Module Record](/data-catalog/community/lens/profile-follow-module-record) > > Tracking of follow modules that have been claimed or redeemed within the Lens network. > [card] [Profile Metadata](/data-catalog/community/lens/profile-metadata) > > Metadata associated with user profiles, including compliance with Lens standards. > [card] [Profile Record](/data-catalog/community/lens/profile-record) > > Base profile information and how it integrates within the broader Lens protocol. > [card] [Publication Metadata](/data-catalog/community/lens/publication-metadata) > > Content and metadata related to user publications on Lens. > [card] [Publication Open Action Module](/data-catalog/community/lens/publication-open-action-module) > > Open action modules that are available for user publications on Lens. > [card] [Publication Open Action Module Acted Recorded](/data-catalog/community/lens/publication-open-action-module-acted-recorded) > > Records of user interactions with publications, such as likes and comments on Lens. > [card] [Publication Open Action Module Multi-Recipient](/data-catalog/community/lens/publication-open-action-module-acted-multirecipient) > > Information on multi-recipient payout modules linked to user actions on Lens. > [card] [Publication Reaction](/data-catalog/community/lens/publication-reaction) > > Records of user reactions to content within the Lens ecosystem, like upvotes or downvotes. > [card] [Publication Record](/data-catalog/community/lens/publication-record) > > Database of successful publications that meet the Lens protocol's metadata standards. > [card] [Publication Reference Module](/data-catalog/community/lens/publication-reference-module) > > Reference modules used to cite or link within publications on Lens. # dune.lens.profile_follow_module Source: https://docs.dune.com/data-catalog/community/lens/profile-follow-module Lens follow modules — follow conditions and configurations per profile. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.profile_follow_module` table holds any follow module the profile has turned on. ## Table Schema | Column Name | Type | Description | | - | - | - | | profile_id | varbinary | Profile ID that has the follow module enabled | | implementation | varbinary | Contract address of the follow module implementation | | init_data | varbinary | Encoded initialization data passed to the module | | amount | varchar | Payment amount required to follow (if fee-based) | | currency | varbinary | Token contract address for the follow fee currency | | recipient | varbinary | Address that receives follow fee payments | | block_timestamp | timestamp | Timestamp of the block | | block_hash | varbinary | Hash of the block containing the transaction | | tx_hash | varbinary | Transaction hash of the module setup | | log_index | integer | Index of the event log within the transaction | | tx_index | integer | Index of the transaction within the block | | block_number | integer | Block number of the transaction | | transaction_executor | varbinary | Address that executed the module setup transaction | | init_return_data | varchar | Data returned by the module after initialization | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=profile_follow_module](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=profile_follow_module) # dune.lens.profile_follow_module_record Source: https://docs.dune.com/data-catalog/community/lens/profile-follow-module-record Lens follow module events — follow module activation and update records. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.profile_follow_module_record` table holds any follow module which has been redeemed by another profile i.e. 0x01 pays to follow 0x02. ## Table Schema | Column Name | Type | Description | | - | - | - | | history_id | integer | Auto-incrementing record identifier | | followed | varbinary | Profile ID of the user being followed | | follower | varbinary | Profile ID of the follower who redeemed the module | | follow_module_data | varchar | Encoded data sent to the follow module during redemption | | process_follow_module_return_data | varchar | Data returned by the module after processing the follow | | fiat_price_snapshot | decimal(10,2) | Fiat price snapshot at the time of the follow (for fee-based modules) | | transaction_executor | varbinary | Address that executed the follow transaction | | tx_hash | varbinary | Transaction hash of the follow | | block_hash | varbinary | Hash of the block containing the transaction | | block_number | integer | Block number of the transaction | | log_index | integer | Index of the event log within the transaction | | tx_index | integer | Index of the transaction within the block | | block_timestamp | timestamp | Timestamp of the block | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=profile_follow_module_record](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=profile_follow_module_record) # dune.lens.profile_follower Source: https://docs.dune.com/data-catalog/community/lens/profile-follower Lens follower relationships — who follows whom on the Lens Protocol. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.profile_follower` table holds information about who follows whom. ## Table Schema | Column Name | Type | Description | | - | - | - | | profile_id | varbinary | Profile ID of the user being followed | | profile_follower_id | varbinary | Profile ID of the follower | | follow_token_id | varbinary | Token ID of the follow NFT issued to the follower | | transaction_executor | varbinary | Address that executed the follow transaction | | tx_hash | varbinary | Transaction hash of the follow event | | block_hash | varbinary | Hash of the block containing the transaction | | block_number | integer | Block number of the transaction | | log_index | integer | Index of the event log within the transaction | | tx_index | integer | Index of the transaction within the block | | block_timestamp | timestamp | Timestamp of the block | | migration_optimistic_applied | boolean | Whether the follow was optimistically applied during migration from Lens v1 to v2 | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=profile_follower](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=profile_follower) # dune.lens.profile_metadata Source: https://docs.dune.com/data-catalog/community/lens/profile-metadata Lens profile metadata — display names, bios, avatars, and profile attributes. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.profile_metadata` table holds the profile metadata. If it does not pass metadata standards, it goes into the metadata_failed table. This holds stuff like name, bio, etc. ## Table Schema | Column Name | Type | Description | | - | - | - | | id | integer | Auto-incrementing row identifier | | profile_id | varbinary | Unique identifier of the Lens profile | | name | varchar | Display name set by the profile owner | | bio | varchar | Profile biography text | | app | varchar | Application used to set the metadata | | metadata_json | varchar | Raw JSON of the profile metadata | | metadata_version | varchar | Version of the metadata standard used | | metadata_uri | varchar | URI pointing to the metadata resource | | metadata_snapshot_location_url | varchar | Snapshot storage URL for the metadata | | profile_with_weights | varchar | Profile scoring or weighting data | | profile_picture_snapshot_location_url | varchar | Snapshot storage URL for the profile picture | | cover_picture_snapshot_location_url | varchar | Snapshot storage URL for the cover picture | | transaction_executor | varbinary | Address that executed the metadata update transaction | | tx_hash | varbinary | Transaction hash of the metadata update | | block_hash | varbinary | Hash of the block containing the transaction | | block_number | integer | Block number of the transaction | | log_index | integer | Index of the event log within the transaction | | tx_index | integer | Index of the transaction within the block | | block_timestamp | timestamp | Timestamp of the block | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=profile_metadata](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=profile_metadata) # dune.lens.profile_record Source: https://docs.dune.com/data-catalog/community/lens/profile-record Lens profile records — profile creation and ownership data. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.profile_record` table holds the base profile information; this does not hold the handle, as that is a different table. ## Table Schema | Column Name | Type | Description | | - | - | - | | profile_id | varbinary | Unique identifier of the Lens profile NFT | | owned_by | varbinary | Wallet address that currently owns the profile | | is_burnt | boolean | Whether the profile NFT has been burned | | tx_hash | varbinary | Transaction hash of the profile creation | | block_hash | varbinary | Hash of the block containing the transaction | | block_number | integer | Block number of the transaction | | log_index | integer | Index of the event log within the transaction | | tx_index | integer | Index of the transaction within the block | | block_timestamp | timestamp | Timestamp of the block | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=profile_record](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=profile_record) # dune.lens.publication_metadata Source: https://docs.dune.com/data-catalog/community/lens/publication-metadata Lens publication metadata — content type, tags, and media attachments for posts. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.publication_metadata` table holds the publication content/metadata. ## Table Schema | Column Name | Type | Description | | - | - | - | | publication_id | varchar | Unique identifier of the publication (format: `profileId-pubId`) | | metadata_snapshot_location_url | varchar | Snapshot storage URL for the metadata | | metadata_json | varchar | Raw JSON of the publication metadata | | metadata_version | varchar | Version of the metadata standard used | | content | varchar | Text content of the publication | | language | varchar | Language code of the publication content | | region | varchar | Regional locale of the publication | | content_warning | varchar | Content warning label if applicable (e.g. `NSFW`, `SENSITIVE`) | | main_content_focus | varchar | Primary content type (e.g. `TEXT_ONLY`, `IMAGE`, `VIDEO`, `ARTICLE`) | | tags_vector | varchar | Serialized array of tags associated with the publication | | hide_from_feed | boolean | Whether the publication should be hidden from feeds | | is_encrypted | boolean | Whether the publication content is gated/encrypted | | app | varchar | Application used to create the publication | | tx_hash | varbinary | Transaction hash (null for Momoka publications) | | timestamp | timestamp | Timestamp of the publication creation | | created_at | timestamp | Timestamp when the record was created in the database | | content_vector | varchar | Vector embedding of the content for similarity searches | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_metadata](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_metadata) # dune.lens.publication_open_action_module Source: https://docs.dune.com/data-catalog/community/lens/publication-open-action-module Lens open action modules — collect, tip, and custom action configurations on publications. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.publication_open_action_module` table holds the modules which have been attached to a publication. ## Table Schema | Column Name | Type | Description | | - | - | - | | publication_id | varchar | Publication ID the module is attached to (format: `profileId-pubId`) | | id | varchar | Unique identifier for this module instance | | implementation | varbinary | Contract address of the open action module | | init_data | varbinary | Encoded initialization data passed to the module | | init_return_data | varbinary | Data returned by the module after initialization | | collect_limit | varchar | Maximum number of collects allowed (null if unlimited) | | amount | varchar | Payment amount required to act on the publication | | follower_only | boolean | Whether the action is restricted to followers | | currency | varbinary | Token contract address for the payment currency | | recipient | varbinary | Address that receives payments | | referral_fee | varchar | Percentage fee paid to referrers | | end_timestamp | timestamp | Deadline after which the action is no longer available | | vault | varchar | Vault address for revenue distribution (if applicable) | | tx_hash | varbinary | Transaction hash of the module setup | | block_hash | varbinary | Hash of the block containing the transaction | | block_number | integer | Block number of the transaction | | log_index | integer | Index of the event log within the transaction | | tx_index | integer | Index of the transaction within the block | | block_timestamp | timestamp | Timestamp of the block | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_open_action_module](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_open_action_module) # dune.lens.publication_open_action_module_multirecipient Source: https://docs.dune.com/data-catalog/community/lens/publication-open-action-module-acted-multirecipient Lens multi-recipient action modules — revenue split configurations for publication actions. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.publication_open_action_module_multirecipient` table holds a line for each recipient who gets paid out by the multi-recipient module. ## Table Schema | Column Name | Type | Description | | - | - | - | | id | integer | Auto-incrementing row identifier | | open_module_id | varchar | Reference to the parent open action module instance | | publication_id | varchar | Publication ID the module belongs to (format: `profileId-pubId`) | | recipient | varbinary | Wallet address of this recipient | | split | decimal(5,2) | Percentage share of revenue allocated to this recipient | | index | integer | Position index of the recipient in the split list | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_open_action_module_multirecipient](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_open_action_module_multirecipient) # dune.lens.publication_open_action_module_acted_record Source: https://docs.dune.com/data-catalog/community/lens/publication-open-action-module-acted-recorded Lens open action events — records of users executing actions on publications. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.publication_open_action_module_acted_record` table holds which profiles have acted on that publication (collects are a part of an action). ## Table Schema | Column Name | Type | Description | | - | - | - | | history_id | integer | Auto-incrementing record identifier | | record_id | integer | Reference to the open action module record | | publication_id | varchar | Publication ID that was acted on (format: `profileId-pubId`) | | acted_profile_id | varbinary | Profile ID of the user who performed the action | | implementation | varbinary | Contract address of the open action module | | init_return_data | varbinary | Data returned by the module after processing the action | | fiat_price_snapshot | decimal(10,2) | Fiat price snapshot at the time of the action | | is_collect | boolean | Whether this action was specifically a collect | | transaction_executor | varbinary | Address that executed the action transaction | | tx_hash | varbinary | Transaction hash of the action | | block_hash | varbinary | Hash of the block containing the transaction | | block_number | integer | Block number of the transaction | | log_index | integer | Index of the event log within the transaction | | tx_index | integer | Index of the transaction within the block | | block_timestamp | timestamp | Timestamp of the block | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_open_action_module_acted_record](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_open_action_module_acted_record) # dune.lens.publication_reaction Source: https://docs.dune.com/data-catalog/community/lens/publication-reaction Lens reactions — likes, mirrors, and other reactions on publications. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.publication_reaction` table holds the reaction type and who reacted. ## Table Schema | Column Name | Type | Description | | - | - | - | | publication_id | varchar | Publication ID that was reacted to (format: `profileId-pubId`) | | actioned_by_profile_id | varbinary | Profile ID of the user who reacted | | type | varchar | Type of reaction (e.g. `UPVOTE`, `DOWNVOTE`) | | action_at | timestamp | Timestamp when the reaction was created | | app | varchar | Application used to create the reaction | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_reaction](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_reaction) # dune.lens.publication_record Source: https://docs.dune.com/data-catalog/community/lens/publication-record Lens publication records — posts, comments, and mirrors with content references. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.publication_record` table holds all the SUCCESSFUL publication records, including Momoka publications; it also has a MIRROR|QUOTE|COMMENT|POST publication type, but the rest of the columns should explain itself. The definition of success to us is if it follows the metadata standard. ## Table Schema | Column Name | Type | Description | | - | - | - | | publication_id | varchar | Unique publication identifier (format: `profileId-pubId`) | | contract_publication_id | varbinary | On-chain publication ID from the Lens Hub contract | | publication_type | varchar | Type of publication: `POST`, `COMMENT`, `MIRROR`, or `QUOTE` | | profile_id | varbinary | Profile ID of the publication author | | content_uri | varchar | URI pointing to the publication content/metadata | | parent_publication_id | varchar | Publication ID of the parent (for comments, quotes, mirrors) | | root_publication_id | varchar | Publication ID of the root post in the thread | | is_hidden | boolean | Whether the publication has been hidden | | is_momoka | boolean | Whether the publication was posted via Momoka (off-chain DA layer) | | momoka_proof | varchar | Momoka data availability proof (null for on-chain publications) | | app | varchar | Application used to create the publication | | gardener_flagged | boolean | Whether the publication was flagged by a gardener for moderation | | transaction_executor | varbinary | Address that executed the publication transaction | | tx_hash | varbinary | Transaction hash (null for Momoka publications) | | block_hash | varbinary | Hash of the block containing the transaction | | block_number | integer | Block number of the transaction | | log_index | integer | Index of the event log within the transaction | | tx_index | integer | Index of the transaction within the block | | block_timestamp | timestamp | Timestamp of the block | | is_comment_hidden_by_author | boolean | Whether a comment was hidden by the original post author | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_record](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_record) # dune.lens.publication_reference_module Source: https://docs.dune.com/data-catalog/community/lens/publication-reference-module Lens reference modules — comment and mirror permission configurations. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `dune.lens.publication_reference_module` table holds any reference modules that have been attached to a publication. ## Table Schema | Column Name | Type | Description | | - | - | - | | publication_id | varchar | Publication ID the module is attached to (format: `profileId-pubId`) | | implementation | varbinary | Contract address of the reference module | | init_data | varbinary | Encoded initialization data passed to the module | | comments_restricted | boolean | Whether commenting is restricted by this module | | mirrors_restricted | boolean | Whether mirroring is restricted by this module | | degrees_of_separation | integer | Maximum degrees of separation allowed for interaction | | block_timestamp | timestamp | Timestamp of the block | | block_hash | varbinary | Hash of the block containing the transaction | | quotes_restricted | boolean | Whether quoting is restricted by this module | | source_profile_id | varbinary | Profile ID from which degrees of separation are measured | | followers_only | boolean | Whether interactions are limited to followers only | | init_return_data | varbinary | Data returned by the module after initialization | | tx_hash | varbinary | Transaction hash of the module setup | | log_index | integer | Index of the event log within the transaction | | tx_index | integer | Index of the transaction within the block | | block_number | integer | Block number of the transaction | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_reference_module](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.lens\&table_name_t6f0df=publication_reference_module) # Ask Events Source: https://docs.dune.com/data-catalog/community/reservoir/ask-events ## **reservoir.ask_events** This table contains records with information about each ask change. Query examples can be found here: [https://dune.com/queries/1302858/2232178](https://dune.com/queries/1302858/2232178) [https://dune.com/queries/1302863/2232189](https://dune.com/queries/1302863/2232189) | **Column name** | **Type** | **Description** | | - | - | - | | id | bigint | Internal event id | | kind | string | Event type (new-order, expiry, sale, cancel, balance-change, approval-change, bootstrap, revalidation, reprice) | | contract | string | Contract address | | token_id | string | Id of the token in the collection | | order_id | string | Associated ask id | | maker | string | Associated ask maker wallet address | | price | decimal | Associated ask price (native currency) | | quantity_remaining | bigint | Associated ask tokens remaining | | valid_from | bigint | Associated ask validity start | | valid_until | bigint | Associated ask validity expiration | | source | string | Source of the order (e.g. opensea.io) | | tx_hash | string | Associated transaction hash | | tx_timestamp | bigint | Associated transaction timestamp | | created_at | timestamp | Timestamp the event was recorded | # Asks Source: https://docs.dune.com/data-catalog/community/reservoir/asks ## **reservoir.asks** This table contains records with information about each listing. Query examples can be found here: [https://dune.com/queries/1302885/2232229](https://dune.com/queries/1302885/2232229) [https://dune.com/queries/1302904/2232257](https://dune.com/queries/1302904/2232257) | **Column name** | **Type** | **Description** | | - | - | - | | id | string | Internal order id | | kind | string | Protocol name (e.g. seaport) | | status | string | Order status (active, inactive) | | contract | string | Contract address | | token_id | string | Id of the token in the collection | | maker | string | Maker wallet address | | taker | string | Taker wallet address | | price | decimal | The current price (native currency) | | start_price | bigint | Start Listing price (for dutch auctions) | | end_price | bigint | End Listing price (for dutch auctions) | | currency_address | string | Currency address | | currency_symbol | string | Currency symbol | | currency_price | decimal | Currency price | | dynamic | boolean | Is dutch auction? | | quantity | bigint | Amount of tokens that is listed | | quantity_filled | bigint | Amount of tokens that was filled | | quantity_remaining | bigint | Amount of tokens remaining | | valid_from | bigint | Listing start time | | valid_until | bigint | Listing end time | | nonce | string | The order nonce of the maker | | source | string | Source of the listing (e.g. opensea.io) | | fee_bps | bigint | Listing fee | | expiration | bigint | Listing expiration time | | raw_data | string | Raw order data (format will vary per source) | | created_at | timestamp | Timestamp the listing was created | | updated_at | timestamp | Timestamp the listing was updated | # Attribute Keys Source: https://docs.dune.com/data-catalog/community/reservoir/attribute-keys ## **reservoir.attribute_keys** This table contains records with information about each attribute key. Query examples can be found here: [https://dune.com/queries/1302930/2232305](https://dune.com/queries/1302930/2232305) | **Column name** | **Type** | **Description** | | - | - | - | | id | string | Internal attribute key id | | collection_id | string | Associated collection id | | key | string | The name of the attribute | | kind | string | Value type (string, number, date, range) | | rank | number | Sort order | | created_at | timestamp | Timestamp the attribute key was created | | updated_at | timestamp | Timestamp the attribute key was updated | # Attributes Source: https://docs.dune.com/data-catalog/community/reservoir/attributes ## **reservoir.attributes** This table contains records with information about each attribute. Query examples can be found here: [https://dune.com/queries/1302927/2232298](https://dune.com/queries/1302927/2232298) [https://dune.com/queries/1302966/2232361](https://dune.com/queries/1302966/2232361) | **Column name** | **Type** | **Description** | | - | - | - | | id | bigint | Internal attribute id | | attribute_key_id | bigint | Internal attribute key id | | value | string | Attribute value | | token_count | bigint | Amount of tokens that have the attribute | | on_sale_count | bigint | Amount of tokens that have the attribute which are on sale | | floor_sell_value | decimal | Current floor ask price | | sell_updated_at | timestamp | Timestamp the floor sale was last updated | | collection_id | string | Associated collection id | | kind | string | Value type (string, number, date, range) | | key | string | Associated key name | | created_at | timestamp | Timestamp the attribute was created | | updated_at | timestamp | Timestamp the attribute was updated | # Bid Events Source: https://docs.dune.com/data-catalog/community/reservoir/bid-events ## **reservoir.bid_events** This table contains records with information about each bid change. | **Column name** | **Type** | **Description** | | - | - | - | | id | string | Internal event id | | kind | string | Event type (new-order, expiry, sale, cancel, balance-change, approval-change, bootstrap, revalidation, reprice) | | status | string | Event status (active, expired) | | contract | string | Contract address | | token_set_id | string | Id of the token set | | order_id | string | Associated bid id | | maker | string | Associated bid maker wallet address | | price | string | Associated bid price (native currency) | | value | string | Associated bid value (native currency) | | quantity_remaining | bigint | Associated bid tokens remaining | | valid_from | bigint | Associated bid validity start | | valid_until | bigint | Associated bid validity expiration | | source | string | Source of the order (e.g. opensea.io) | | tx_hash | string | Associated transaction hash | | tx_timestamp | bigint | Associated transaction timestamp | | created_at | timestamp | Timestamp the event was recorded | # Bids Source: https://docs.dune.com/data-catalog/community/reservoir/bids ## **reservoir.bids** This table contains records with information about each bid. | **Column name** | **Type** | **Description** | | - | - | - | | id | string | Internal order id | | kind | string | Protocol name (e.g. seaport) | | status | string | Order status (active, inactive) | | contract | string | Contract address | | token_set_id | string | Id of the token set | | maker | string | Maker wallet address | | taker | string | Taker wallet address | | price | string | The current price (native currency) | | value | string | The current value (native currency) | | currency_address | string | Currency address | | currency_symbol | string | Currency symbol | | currency_price | string | Currency price | | quantity | bigint | Amount of tokens that are listed | | quantity_filled | bigint | Amount of tokens that was filled | | quantity_remaining | bigint | Amount of tokens remaining | | valid_from | bigint | Listing start time | | valid_until | bigint | Listing end time | | nonce | bigint | The order nonce of the maker | | source | string | Source of the listing (e.g. opensea.io) | | fee_bps | bigint | Listing fee | | expiration | bigint | Expiration timestamp | | raw_data | string | Raw order data (format will vary per source) | | created_at | timestamp | Timestamp the listing was created | | updated_at | timestamp | Timestamp the listing was updated | # Collection Floor Ask Events Source: https://docs.dune.com/data-catalog/community/reservoir/collection-floor-ask-events ## **reservoir.collection_floor_ask_events** This table contains records with information about each collection floor ask change. Query examples can be found here: [https://dune.com/queries/1302799/2232083](https://dune.com/queries/1302799/2232083) [https://dune.com/queries/1302841/2232151](https://dune.com/queries/1302841/2232151) | **Column name** | **Type** | **Description** | | - | - | - | | id | bigint | Internal event id | | kind | string | Event type (new-order, expiry, sale, cancel, balance-change, approval-change, bootstrap, revalidation, reprice) | | collection_id | string | Collection id | | contract | string | Contract address | | token_id | string | Id of the token in the collection | | order_id | string | Associated ask id | | maker | string | Associated ask maker wallet address | | price | decimal | Associated ask price (native currency) | | previous_price | decimal | Previous floor ask price (native currency) | | valid_until | bigint | Associated ask validity expiration | | source | string | Source of the order (e.g. opensea.io) | | tx_hash | string | Associated transaction hash | | tx_timestamp | bigint | Associated transaction timestamp | | created_at | timestamp | Timestamp the event was recorded | # Collection Top Bid Events Source: https://docs.dune.com/data-catalog/community/reservoir/collection-top-bid-events ## **reservoir.collection_top_bid_events** This table contains records with information about each collection top bid change. | **Column name** | **Type** | **Description** | | - | - | - | | id | string | Internal event id | | kind | string | Event type (new-order, expiry, sale, cancel, balance-change, approval-change, bootstrap, revalidation, reprice) | | collection_id | string | Collection id | | contract | string | Contract address | | token_id | string | Id of the token in the collection | | order_id | string | Associated bid id | | maker | string | Associated bid maker wallet address | | price | string | Associated bid price (native currency) | | previous_price | decimal | Previous top bid price (native currency) | | valid_until | bigint | Associated bid validity expiration | | source | string | Source of the order (e.g. opensea.io) | | tx_hash | string | Associated transaction hash | | tx_timestamp | bigint | Associated transaction timestamp | | created_at | timestamp | Timestamp the event was recorded | # Collections Source: https://docs.dune.com/data-catalog/community/reservoir/collections ## **reservoir.collections** This table contains records with information about each NFT collection. Query examples can be found here: [https://dune.com/queries/1302781/2232054](https://dune.com/queries/1302781/2232054) [https://dune.com/queries/1302788/2232065](https://dune.com/queries/1302788/2232065) | **Column name** | **Type** | **Description** | | - | - | - | | id | string | Internal collection id | | slug | string | Collection slug | | name | string | Collection name | | description | string | Collection description | | token_count | bigint | Number of tokens in the collection | | contract | string | Contract address | | day1_rank | bigint | Ranking in the previous day | | day7_rank | bigint | Ranking in the previous 7 days | | day30_rank | bigint | Ranking in the previous 30 days | | all_time_rank | bigint | All time ranking | | day1_volume | decimal | Trade volume in the previous day | | day7_volume | decimal | Trade volume in the previous 7 days | | day30_volume | decimal | Trade volume in the previous 30 days | | all_time_volume | decimal | All time trade volume | | day1_volume_change | double | Trade volume change in the previous day | | day7_volume_change | double | Trade volume change in the previous 7 days | | day30_volume_change | double | Trade volume change in the previous 30 days | | floor_ask_value | decimal | Current floor ask price (native currency) | | day1_floor_sale_value | decimal | Floor sale price in the previous day | | day7_floor_sale_value | decimal | Floor sale price 7 days ago | | day30_floor_sale_value | decimal | Floor sale price 30 days ago | | day1_floor_sale_change | double | Floor sale price change from previous day | | day7_floor_sale_change | double | Floor sale price change from 7 days ago | | day30_floor_sale_change | double | Floor sale price change from 30 days ago | | created_at | timestamp | Timestamp the collection was created | | updated_at | timestamp | Timestamp the collection was updated | # Reservoir NFT trading data Source: https://docs.dune.com/data-catalog/community/reservoir/overview Reservoir makes open-source NFT trading infrastructure enabling the next generation of NFT products. # Reservoir **Dashboard:** [https://dune.com/reservoir0x/reservoir-dune-docs-dashboard](https://dune.com/reservoir0x/reservoir-dune-docs-dashboard) **Docs:** [https://docs.reservoir.tools/docs](https://docs.reservoir.tools/docs) ## Data available: > [card] [Ask Events](/data-catalog/community/reservoir/ask-events) > > Information about Ask events in a marketplace. > [card] [Bid Events](/data-catalog/community/reservoir/bid-events) > > Information about Bid events in a marketplace. > [card] [Collections](/data-catalog/community/reservoir/collections) > > Information about NFT collections. > [card] [Token Floor Ask Events](/data-catalog/community/reservoir/token-floor-ask-events) > > Information about Token Floor Ask events in a marketplace. > [card] [Asks](/data-catalog/community/reservoir/asks) > > Information about Asks in a marketplace. > [card] [Bids](/data-catalog/community/reservoir/bids) > > Information about Bids in a marketplace. > [card] [Tokens](/data-catalog/community/reservoir/tokens) > > Information about ERC-721 tokens. > [card] [Attribute Keys](/data-catalog/community/reservoir/attribute-keys) > > List of attributes or characteristics of a token. > [card] [Collection Floor Ask Events](/data-catalog/community/reservoir/collection-floor-ask-events) > > Information about Collection Floor Ask events in a marketplace. > [card] [Sales](/data-catalog/community/reservoir/sales) > > Information about sales in a marketplace. > [card] [Attributes](/data-catalog/community/reservoir/attributes) > > Information about token attributes. > [card] [Collection Top Bid Events](/data-catalog/community/reservoir/collection-top-bid-events) > > Information about Collection Top Bid events in a marketplace. > [card] [Token Attributes](/data-catalog/community/reservoir/token-attributes) > > Information about token attributes and characteristics. # Sales Source: https://docs.dune.com/data-catalog/community/reservoir/sales ## **reservoir.sales** This table contains records with information about each sale. Query examples can be found here: [https://dune.com/queries/1302771/2232036](https://dune.com/queries/1302771/2232036) [https://dune.com/queries/1302775/2232040](https://dune.com/queries/1302775/2232040) | **Column name** | **Type** | **Description** | | - | - | - | | id | string | Internal sale id | | contract | string | Contract address | | token_id | string | Id of the token in the collection | | order_id | string | Associated order id | | order_kind | string | Protocol name (e.g. seaport) | | order_side | string | Order type (ask / bid) | | order_source | string | Source of the listing (e.g. opensea.io) | | from | string | Maker wallet address | | to | string | Taker wallet address | | price | decimal | Sale price (native currency) | | usd_price | string | Sale price in USD | | currency_address | string | The currency address used for this sale | | currency_symbol | string | The currency symbol used for this sale | | currency_price | decimal | Sale price | | amount | string | Amount of tokens sold | | fill_source | string | Where the order was filled | | aggregator_source | string | Aggregator source (e.g. reservoir) | | wash_trading_score | int | Internal wash trading score (based on past sales) | | is_primary | boolean | Is paid mint? | | tx_hash | string | Associated transaction hash | | tx_log_index | int | Associated transaction log index | | tx_batch_index | int | Associated transaction batch index | | tx_timestamp | bigint | Associated transaction timestamp | | created_at | timestamp | Timestamp the sale was recorded | | updated_at | timestamp | Timestamp the sale was updated | # Token Attributes Source: https://docs.dune.com/data-catalog/community/reservoir/token-attributes ## **reservoir.token_attributes** This table contains records with information about each NFT token attribute. Query examples can be found here: [https://dune.com/queries/1302940/2232326](https://dune.com/queries/1302940/2232326) | **Column name** | **Type** | **Description** | | - | - | - | | id | bigint | Internal token attribute id | | contract | string | Contract address | | token_id | string | Id of the token in the collection | | attribute_id | bigint | Internal attribute id | | collection_id | string | Internal collection id | | key | string | Attribute name | | value | string | Attribute value | | created_at | timestamp | Timestamp the token attribute was created | | updated_at | timestamp | Timestamp the token attribute was updated | # Token Floor Ask Events Source: https://docs.dune.com/data-catalog/community/reservoir/token-floor-ask-events ## **reservoir.token_floor_ask_events** This table contains records with information about each NFT token floor ask change. Query examples can be found here: [https://dune.com/queries/1302852/2232169](https://dune.com/queries/1302852/2232169) [https://dune.com/queries/1302854/2232173](https://dune.com/queries/1302854/2232173) | **Column name** | **Type** | **Description** | | - | - | - | | id | bigint | Internal token attribute id | | kind | string | Event type (new-order, expiry, sale, cancel, balance-change, approval-change, bootstrap, revalidation, reprice) | | contract | string | Contract address | | token_id | string | Id of the token in the collection | | order_id | string | Associated Ask id | | maker | string | Associated Ask maker wallet address | | price | decimal | Associated ask price (native currency) | | previous_price | decimal | Previous associated ask price (native currency) | | nonce | string | The order nonce of the maker | | valid_from | bigint | Associated ask validity start | | valid_until | bigint | Associated ask validity expiration | | source | string | Source of the order (e.g. opensea.io) | | tx_hash | string | Associated transaction hash | | tx_timestamp | bigint | Associated transaction timestamp | | created_at | timestamp | Timestamp the event was recorded | # Tokens Source: https://docs.dune.com/data-catalog/community/reservoir/tokens ## **reservoir.tokens** This table contains records with information about each NFT token. Query examples can be found here: [https://dune.com/queries/1303052/2232521](https://dune.com/queries/1303052/2232521) [https://dune.com/queries/1303064/2232571](https://dune.com/queries/1303064/2232571) | **Column name** | **Type** | **Description** | | - | - | - | | id | string | Internal token id | | contract | string | Contract address | | token_id | string | Id of the token in the collection | | name | string | NFT name | | description | string | NFT description | | | collection_id | string | Associated Collection id | | owner | string | Owner wallet address | | floor_ask_id | string | Floor ask id | | floor_ask_value | bigint | Floor ask value | | floor_ask_maker | string | Floor ask maker wallet address | | floor_ask_valid_from | bigint | Floor ask listing start time | | floor_ask_valid_to | bigint | Floor ask listing end time | | floor_ask_source | string | Floor ask source (e.g. opensea.io) | | last_sale_value | bigint | Last sale value | | last_sale_timestamp | bigint | Last sale timestamp | | created_at | timestamp | Timestamp the token was created | | updated_at | timestamp | Timestamp the token was updated | | # dune.shot.dataset_follows Source: https://docs.dune.com/data-catalog/community/snapshot/follows Snapshot space follows — users subscribed to governance spaces. ## Table description The `dune.shot.dataset_follows` table provides data on the follow relationships between users on Snapshot. ## Table Schema | Column Name | Type | Description | | - | - | - | | id | varbinary | Unique identifier of the follow record | | ipfs | varchar | IPFS hash of the follow data | | space | varchar | Snapshot space (DAO) being followed | | created | bigint | Unix timestamp when the follow was created | | follower | varbinary | Address of the user following the space | | to_delete | bigint | Flag indicating if the follow has been removed (1 = unfollowed) | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.shot\&table_name_t6f0df=dataset_follows](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.shot\&table_name_t6f0df=dataset_follows) # Snapshot Data Source: https://docs.dune.com/data-catalog/community/snapshot/overview Snapshot data is available on Dune # Snapshot [Snapshot](https://snapshot.org) - a decentralized voting platform that enables off-chain, gasless voting for decentralized governance. Snapshot is pivotal for communities to make collective decisions effectively without the high costs associated with on-chain votes. It operates on IPFS, ensuring that proposals and votes are tamper-proof and easily accessible. **Website** : [https://snapshot.org](https://snapshot.org) **Documentation** : [https://docs.snapshot.org](https://docs.snapshot.org) **Twitter** : [https://twitter.com/SnapshotLabs](https://twitter.com/SnapshotLabs) ## Data available: > [card] [Follows](/data-catalog/community/snapshot/follows) > > Data on user follow relationships within the Snapshot ecosystem, tracking how users engage with one another. > [card] [Proposals](/data-catalog/community/snapshot/proposals) > > Detailed views of governance proposals, including information on their creation, discussion, and current status. > [card] [Spaces](/data-catalog/community/snapshot/spaces) > > Overviews of different governance spaces, showcasing active and historical governance frameworks associated with various projects. > [card] [Users](/data-catalog/community/snapshot/users) > > Comprehensive dataset of user profiles, including registration details and activity logs within Snapshot. > [card] [Votes](/data-catalog/community/snapshot/votes) > > Insights into votes cast on proposals, providing analytics on voting patterns, stakeholder involvement, and outcomes. # dune.shot.dataset_proposals_view Source: https://docs.dune.com/data-catalog/community/snapshot/proposals Snapshot governance proposals — proposal text, voting options, and results. ## Table description The `dune.shot.dataset_proposals_view` table provides a comprehensive view of all governance proposals made on Snapshot. ## Table Schema | Column Name | Type | Description | | - | - | - | | id | varbinary | Unique identifier of the proposal | | app | varchar | Application or client used to create the proposal | | end | bigint | Unix timestamp when voting ends | | body | varchar | Full markdown body/description of the proposal | | ipfs | varchar | IPFS hash of the proposal data | | type | varchar | Voting type (e.g. `single-choice`, `weighted`, `ranked-choice`, `approval`) | | space | varchar | Snapshot space (DAO) the proposal belongs to | | start | bigint | Unix timestamp when voting begins | | title | varchar | Title of the proposal | | votes | bigint | Total number of votes cast on the proposal | | author | varbinary | Address of the proposal creator | | quorum | double | Minimum voting power required for the proposal to pass | | scores | varchar | JSON-encoded final scores for each choice | | symbol | varchar | Token symbol used for voting power display | | choices | varchar | JSON-encoded array of available voting choices | | created | bigint | Unix timestamp when the proposal was created | | flagged | bigint | Flag indicating if the proposal has been flagged (1 = flagged) | | network | varchar | Blockchain network ID used for strategy execution | | plugins | varchar | JSON-encoded plugin configurations | | privacy | varchar | Privacy mode for the vote (e.g. `shutter` for encrypted voting) | | updated | bigint | Unix timestamp of the last update | | snapshot | bigint | Block number snapshot used for voting power calculation | | discussion | varchar | URL to an external discussion thread | | strategies | varchar | JSON-encoded array of voting strategies | | validation | varchar | JSON-encoded validation settings for proposal creation | | scores_state | varchar | State of score calculation (e.g. `final`) | | scores_total | double | Sum of all voting power across all choices | | scores_updated | bigint | Unix timestamp when scores were last updated | | scores_by_strategy | varchar | JSON-encoded breakdown of scores by each strategy | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.shot\&table_name_t6f0df=dataset_proposals_view](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.shot\&table_name_t6f0df=dataset_proposals_view) # dune.shot.dataset_spaces_view Source: https://docs.dune.com/data-catalog/community/snapshot/spaces Snapshot governance spaces — DAO and protocol governance space metadata. ## Table description The `dune.shot.dataset_spaces_view` table provides overviews of different governance spaces on Snapshot. ## Table Schema | Column Name | Type | Description | | - | - | - | | id | varchar | Unique identifier (ENS name) of the Snapshot space | | name | varchar | Display name of the space | | deleted | bigint | Flag indicating if the space has been deleted (1 = deleted) | | flagged | bigint | Flag indicating if the space has been flagged for review (1 = flagged) | | settings | varchar | JSON-encoded space settings (strategies, voting params, admins, etc.) | | verified | bigint | Flag indicating if the space is verified (1 = verified) | | created_at | bigint | Unix timestamp when the space was created | | updated_at | bigint | Unix timestamp of the last update to the space | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.shot\&table_name_t6f0df=dataset_spaces_view](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.shot\&table_name_t6f0df=dataset_spaces_view) # dune.shot.dataset_users Source: https://docs.dune.com/data-catalog/community/snapshot/users Snapshot users — governance participant profiles and activity. ## Table description The `dune.shot.dataset_users` table contains detailed information about users registered on Snapshot. ## Table Schema | Column Name | Type | Description | | - | - | - | | id | varbinary | Wallet address serving as the user's unique identifier | | ipfs | varchar | IPFS hash of the user profile data | | created | bigint | Unix timestamp when the user was first registered | | profile | varchar | JSON-encoded user profile information | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.shot\&table_name_t6f0df=dataset_users](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.shot\&table_name_t6f0df=dataset_users) # dune.shot.dataset_votes_view Source: https://docs.dune.com/data-catalog/community/snapshot/votes Snapshot votes — individual voting records with choice, voting power, and timestamp. ## Table description The `dune.shot.dataset_votes_view` table provides insights into votes cast on proposals, highlighting voting patterns and outcomes. ## Table Schema | Column Name | Type | Description | | - | - | - | | cb | bigint | Internal cursor/batch identifier | | id | varbinary | Unique identifier of the vote | | vp | double | Total voting power used for this vote | | app | varchar | Application or client used to cast the vote | | ipfs | varchar | IPFS hash of the vote data | | space | varchar | Snapshot space (DAO) the vote was cast in | | voter | varbinary | Address of the voter | | choice | varchar | The choice(s) selected by the voter (JSON-encoded for weighted/ranked votes) | | reason | varchar | Optional text reason provided by the voter | | created | bigint | Unix timestamp when the vote was cast | | metadata | varchar | Additional metadata associated with the vote | | proposal | varbinary | Identifier of the proposal being voted on | | vp_state | varchar | State of voting power calculation (e.g. `final`) | | vp_by_strategy | varchar | Breakdown of voting power by each strategy (JSON-encoded) | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.shot\&table_name_t6f0df=dataset_votes_view](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dune.shot\&table_name_t6f0df=dataset_votes_view) # EVM Daily Balance Updates Source: https://docs.dune.com/data-catalog/curated/balances/evm-daily-updates Sparse validity-interval table for historical fungible token balances on EVM networks. `balances_.daily_updates` is the default table for historical balance analysis. It is **sparse**: one row is written per `(address, token_address)` balance change, not one row per day per pair. Each row carries a validity interval `[valid_from, valid_to)` covering the days during which that balance was held. Adjacent intervals share the boundary day on `valid_from` / `valid_to` (no gap, no overlap). Refreshed hourly. The interval layout lets you reconstruct the balance for any `(address, token_address)` on any past day by selecting the row where `valid_from <= day < valid_to`. To get per-day rows across a window, expand the interval against a calendar table (see [Example Queries](#example-queries)). `valid_to = '9999-12-31'` marks the active (ongoing) interval. USD value is joined from `prices.day` at `valid_from`. Zero-balance periods are kept as their own intervals, so filter `balance > 0` if you want to exclude empty holdings. ## Table Schema Examples are illustrative values for USDC on Ethereum, assuming a USD price of 1.00. They are not a live balance snapshot. | Column | Type | Description | Example | | - | - | - | - | | `blockchain` | `varchar` | Chain identifier | `ethereum` | | `address_prefix` | `varchar` | First byte of `address`, lower-hex (partition key) | `d8` | | `address` | `varbinary` | Account address | `0xd8da6bf26964af9d7eed9e03e53415d37aa96045` | | `token_address` | `varbinary` | Token contract address. Native tokens use the standardized address from `dune.blockchains` (zero address on most EVMs, `0x0000…1010` on Polygon). | `0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48` | | `token_standard` | `varchar` | `native` or `erc20` | `erc20` | | `token_symbol` | `varchar` | Token symbol from `tokens_.erc20` (nullable) | `USDC` | | `balance_raw` | `uint256` | Balance in raw units while the interval is valid | `1000000000` | | `balance` | `double` | Balance in display units (`balance_raw / 10^decimals`, falls back to 18 decimals when unknown) | `1000.0` | | `balance_usd` | `double` | `balance * prices.day.price` at `valid_from`. `NULL` when no price is available for that token; `coalesce(balance_usd, 0)` if you need to sum across mixed-coverage tokens. | `1000.0` | | `valid_from` | `date` | First day of the interval (inclusive) | `2024-10-20` | | `valid_to` | `date` | First day after the interval (exclusive). `9999-12-31` for the active interval. | `9999-12-31` | | `balance_updated_at` | `timestamp` | Block time of the underlying balance update | `2024-10-20 12:00:00` | ## Usage Notes The table is partitioned by `address_prefix`, the first byte of `address` rendered as a 2-character lower-hex string (`'00'..'ff'`). For best performance, include all three of: 1. **A cohort filter** on `address` and/or `token_address`. 2. **A partition filter** `address_prefix IN (...)` matching the addresses in your cohort. For a hardcoded address the prefix is the first hex byte (e.g. `0xd8dA…` → `'d8'`). For a dynamic cohort, materialize the distinct prefixes in a subquery so the planner can prune partitions: `address_prefix IN (SELECT DISTINCT lower(to_hex(varbinary_substring(address, 1, 1))) FROM )`. 3. **Day bounds on the interval**: `valid_from <= AND valid_to > `. These let the scanner skip files that fall outside the window. The active row (`valid_to = '9999-12-31'`) is naturally included by `valid_to > `. To expand validity intervals into per-day rows, the recommended pattern is to join the [`utils.days`](/data-catalog/curated/utilities/days) calendar table. For very large outputs (hundreds of millions of rows), `CROSS JOIN UNNEST(sequence(...))` clips the day sequence at generation time and is typically faster. ## Example Queries **Daily USDC balance for a wallet, last 30 days:** ```sql theme={null} WITH days AS ( SELECT CAST(timestamp AS DATE) AS day FROM utils.days WHERE timestamp BETWEEN CAST(CURRENT_DATE - INTERVAL '30' day AS TIMESTAMP) AND CAST(CURRENT_DATE AS TIMESTAMP) ) SELECT d.day, i.balance, i.balance_usd FROM balances_ethereum.daily_updates i JOIN days d ON d.day >= i.valid_from AND d.day < i.valid_to WHERE i.address = 0xd8da6bf26964af9d7eed9e03e53415d37aa96045 AND i.address_prefix = 'd8' AND i.token_address = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 AND i.valid_from <= CURRENT_DATE AND i.valid_to > CURRENT_DATE - INTERVAL '30' day ORDER BY d.day ``` **Daily portfolio value for a wallet over a fixed window:** ```sql theme={null} WITH days AS ( SELECT CAST(timestamp AS DATE) AS day FROM utils.days WHERE timestamp BETWEEN TIMESTAMP '2025-01-01 00:00:00' AND TIMESTAMP '2025-12-31 00:00:00' ) SELECT d.day, sum(i.balance_usd) AS portfolio_usd FROM balances_ethereum.daily_updates i JOIN days d ON d.day >= i.valid_from AND d.day < i.valid_to WHERE i.address = 0xd8da6bf26964af9d7eed9e03e53415d37aa96045 AND i.address_prefix = 'd8' AND i.valid_from <= DATE '2025-12-31' AND i.valid_to > DATE '2025-01-01' GROUP BY d.day ORDER BY d.day ``` **Total USDC held by centralized exchanges over time (CEX stablecoin float):** The cohort is [`cex.addresses`](/data-catalog/curated/cex-flows/overview), a curated table of known centralized-exchange wallets. The same pattern works for any cohort table or uploaded address list. ```sql theme={null} WITH cex_wallets AS ( SELECT address FROM cex.addresses WHERE blockchain = 'ethereum' ), days AS ( SELECT CAST(timestamp AS DATE) AS day FROM utils.days WHERE timestamp BETWEEN TIMESTAMP '2025-01-01 00:00:00' AND TIMESTAMP '2025-12-31 00:00:00' ) SELECT d.day, sum(i.balance) AS usdc_at_cexes FROM balances_ethereum.daily_updates i JOIN cex_wallets c ON i.address = c.address JOIN days d ON d.day >= i.valid_from AND d.day < i.valid_to WHERE i.token_address = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 AND i.address_prefix IN ( SELECT DISTINCT lower(to_hex(varbinary_substring(address, 1, 1))) FROM cex_wallets ) AND i.valid_from <= DATE '2025-12-31' AND i.valid_to > DATE '2025-01-01' GROUP BY d.day ORDER BY d.day ``` # EVM Latest Balances Source: https://docs.dune.com/data-catalog/curated/balances/evm-latest Most recent balance per address and token on EVM networks. `balances_.latest` returns the most recent non-zero balance for every `(address, token_address)` pair. USD value is joined from `prices.latest`. Refreshed hourly. For historical balances use [`balances_.daily_updates`](/data-catalog/curated/balances/evm-daily-updates). For block-level resolution use [`balances_.updates`](/data-catalog/curated/balances/evm-updates). ## Table Schema Examples are illustrative values for USDC on Ethereum, assuming a USD price of 1.00. They are not a live balance snapshot. | Column | Type | Description | Example | | - | - | - | - | | `blockchain` | `varchar` | Chain identifier (e.g. `ethereum`) | `ethereum` | | `address` | `varbinary` | Account address | `0xd8da6bf26964af9d7eed9e03e53415d37aa96045` | | `token_address` | `varbinary` | Token contract address. Native tokens use the standardized address from `dune.blockchains` (zero address on most EVMs, `0x0000…1010` on Polygon). | `0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48` | | `token_standard` | `varchar` | `native` or `erc20` | `erc20` | | `token_symbol` | `varchar` | Token symbol from `tokens_.erc20` (nullable) | `USDC` | | `balance_raw` | `uint256` | Current balance in raw units (always `> 0`) | `1000000000` | | `balance` | `double` | Current balance in display units (`balance_raw / 10^decimals`, falls back to 18 decimals when unknown) | `1000.0` | | `balance_usd` | `double` | `balance * prices.latest.price`. `NULL` when no price is available for that token; `coalesce(balance_usd, 0)` if you need to sum across mixed-coverage tokens. | `1000.0` | | `block_number` | `bigint` | Block of the most recent balance update | `21000000` | | `updated_at` | `timestamp` | Block time of the most recent balance update | `2024-10-20 12:00:00` | ## Example Queries **Current portfolio for a wallet, USD-sorted:** ```sql theme={null} SELECT token_symbol, token_address, balance, balance_usd FROM balances_ethereum.latest WHERE address = 0xd8da6bf26964af9d7eed9e03e53415d37aa96045 ORDER BY balance_usd DESC NULLS LAST ``` **Top 50 holders of a token:** ```sql theme={null} SELECT address, balance, balance_usd FROM balances_ethereum.latest WHERE token_address = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 -- USDC ORDER BY balance DESC LIMIT 50 ``` **Native ETH locked in the WETH contract (equals current wrapped ETH supply):** ```sql theme={null} SELECT balance AS eth_wrapped FROM balances_ethereum.latest WHERE address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 -- WETH AND token_address = 0x0000000000000000000000000000000000000000 -- native ETH ``` # EVM Balance Updates Source: https://docs.dune.com/data-catalog/curated/balances/evm-updates Per-block balance changes for fungible tokens on EVM networks. `balances_.updates` records one row per observed balance change for native currencies and ERC20 tokens. Each row is the on-chain balance at a specific block for an `(address, token_address)` pair. Refreshed hourly. For most historical analysis prefer [`balances_.daily_updates`](/data-catalog/curated/balances/evm-daily-updates), which is faster and includes USD values. Use `balances_.updates` when you need block-level resolution. ## Table Schema Examples are illustrative values for USDC on Ethereum. They are not a live balance snapshot. | Column | Type | Description | Example | | - | - | - | - | | `blockchain` | `varchar` | Chain identifier (e.g. `ethereum`) | `ethereum` | | `block_date` | `date` | Date of `block_number` (partition key) | `2024-10-20` | | `block_number` | `bigint` | Block at which the balance was observed | `21000000` | | `timestamp` | `timestamp` | Block time | `2024-10-20 12:00:00` | | `address` | `varbinary` | Account address | `0xd8da6bf26964af9d7eed9e03e53415d37aa96045` | | `token_address` | `varbinary` | Token contract address. Native tokens use the standardized address from `dune.blockchains` (zero address on most EVMs, `0x0000…1010` on Polygon). | `0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48` | | `token_standard` | `varchar` | `native` or `erc20` | `erc20` | | `token_symbol` | `varchar` | Token symbol (nullable) | `USDC` | | `balance_raw` | `uint256` | Balance in raw units (smallest denomination) | `1000000000` | | `balance` | `double` | Balance in display units (`balance_raw / 10^decimals`, 18 if unknown) | `1000.0` | ## Usage Notes `balances_.updates` is partitioned by `block_date`. For best performance, include `block_date` and at least one of `address` or `token_address` in your WHERE clause. ### USD Values This table is intentionally not enriched with USD prices. A balance change observed at a specific block can be priced against many different reference points (time of change, end of day, latest, custom benchmark) and there is no single right choice. Bring your own price by joining `prices.minute`, `prices.hour`, `prices.day`, or `prices.latest` at the time anchor that fits your analysis. If you only need end-of-day USD values, use [`balances_.daily_updates`](/data-catalog/curated/balances/evm-daily-updates) where `balance_usd` is precomputed from `prices.day`. ## Example Queries **All balance updates for a wallet in the last 7 days:** ```sql theme={null} SELECT block_number, timestamp, token_symbol, balance FROM balances_ethereum.updates WHERE block_date >= CURRENT_DATE - INTERVAL '7' day AND address = 0xd8da6bf26964af9d7eed9e03e53415d37aa96045 ORDER BY block_number DESC ``` **Mark-to-market a wallet's ETH balance at each change:** For a volatile asset, attaching the price at the hour of each balance change shows the wallet's USD position as both balances and prices move. ```sql theme={null} SELECT u.block_number, u.timestamp, u.balance AS eth_balance, u.balance * p.price AS eth_balance_usd FROM balances_ethereum.updates u LEFT JOIN prices.hour p ON p.blockchain = 'ethereum' AND p.contract_address = u.token_address AND p.timestamp = date_trunc('hour', u.timestamp) WHERE u.block_date >= DATE '2025-01-01' AND u.address = 0xd8da6bf26964af9d7eed9e03e53415d37aa96045 AND u.token_address = 0x0000000000000000000000000000000000000000 -- native ETH ORDER BY u.block_number ``` # Balances Source: https://docs.dune.com/data-catalog/curated/balances/overview Token balances for fungible tokens on EVM networks and Solana Dune provides curated token balance tables for portfolio analysis, holder distribution, treasury tracking, and wallet activity across EVM networks and Solana. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** hourly · **Token standards:** native, ERC20 > [!NOTE] > > **Access:** the **EVM balance tables** — every `balances_.{latest, updates, daily_updates}` table across the 24 supported EVM chains (72 tables total) — are 🔒 **Gated** and sold as an Enterprise add-on. The **Solana balance table** (`solana_utils.latest_balances`) is 🟢 **Public**. See the [access tiers overview](/data-catalog/overview#access-tiers-public-vs-gated-datasets) or [contact the Dune team](https://dune.com/enterprise#contact-form) to enable gated access. > [card] [Get This Data](https://dune.com/data/balances) > > Access balance data via API, Datashare, or the Dune App. ## Available Datasets > [card] [Latest Balances](/data-catalog/curated/balances/evm-latest) > > Most recent balance per (address, token) with USD value > [card] [Daily Balance Updates](/data-catalog/curated/balances/evm-daily-updates) > > Sparse validity-interval table for historical balance reconstruction. The default for time-series analysis. > [card] [Balance Updates](/data-catalog/curated/balances/evm-updates) > > Per-block balance changes ## Choosing a Table | Question | Use | | - | - | | What does this wallet hold right now? | [`balances_.latest`](/data-catalog/curated/balances/evm-latest) | | What did this wallet hold on day X? Over the last N days? | [`balances_.daily_updates`](/data-catalog/curated/balances/evm-daily-updates) | | Exactly when did the balance change? | [`balances_.updates`](/data-catalog/curated/balances/evm-updates) | For most historical analysis, `balances_.daily_updates` is the right default. It trades off granularity for query speed and includes USD values. Drop down to `balances_.updates` only when you need block-level resolution. `balances_.daily_updates` is **sparse**: it stores one row per balance change with a validity interval `[valid_from, valid_to)`, not one row per day per pair. The interval layout means you can reconstruct the balance for any `(address, token)` on any past day by joining a calendar table or expanding the interval. See the page's [usage notes](/data-catalog/curated/balances/evm-daily-updates#usage-notes) for the recommended filter pattern and `address_prefix` partition key. ## Coverage All three EVM balance datasets (`latest`, `updates`, and `daily_updates`) are available on the following chains: | Chain | Schema | | - | - | | Arbitrum | `balances_arbitrum` | | Avalanche C-Chain | `balances_avalanche_c` | | Base | `balances_base` | | BNB Chain | `balances_bnb` | | Celo | `balances_celo` | | Ethereum | `balances_ethereum` | | Flare | `balances_flare` | | Gnosis | `balances_gnosis` | | HyperEVM | `balances_hyperevm` | | Ink | `balances_ink` | | Kaia | `balances_kaia` | | Linea | `balances_linea` | | Mantle | `balances_mantle` | | MegaETH | `balances_megaeth` | | Monad | `balances_monad` | | Optimism | `balances_optimism` | | Plasma | `balances_plasma` | | Polygon | `balances_polygon` | | Robinhood Chain | `balances_robinhood` | | Sei | `balances_sei` | | Sonic | `balances_sonic` | | Unichain | `balances_unichain` | | World Chain | `balances_worldchain` | | zkSync | `balances_zksync` | Token standards: `native` and `erc20`. NFT balances (ERC721/ERC1155) are not included. Native tokens use the standardized contract address from `dune.blockchains` for that chain (zero address on most EVMs, `0x0000…1010` on Polygon). ## Cross-chain The tables are per-chain. For a wallet's portfolio across chains, `UNION ALL` per-chain totals from `balances_.latest`: ```sql theme={null} SELECT 'ethereum' AS chain, sum(balance_usd) AS total_usd FROM balances_ethereum.latest WHERE address = 0xd8da6bf26964af9d7eed9e03e53415d37aa96045 UNION ALL SELECT 'arbitrum', sum(balance_usd) FROM balances_arbitrum.latest WHERE address = 0xd8da6bf26964af9d7eed9e03e53415d37aa96045 UNION ALL SELECT 'optimism', sum(balance_usd) FROM balances_optimism.latest WHERE address = 0xd8da6bf26964af9d7eed9e03e53415d37aa96045 UNION ALL SELECT 'base', sum(balance_usd) FROM balances_base.latest WHERE address = 0xd8da6bf26964af9d7eed9e03e53415d37aa96045 ORDER BY total_usd DESC NULLS LAST ``` ## Methodology Balances are read directly from chain state at the blocks where activity is observed, rather than being accumulated from transfer events. Between observed activity, the most recent value is carried forward. Balance changes that occur without surfacing any tracked activity (for example, a rebase that emits no `Transfer`) are not detected until the next surfacing event. `balances_.daily_updates` and `balances_.latest` include `balance_usd` joined from `prices.day` and `prices.latest` respectively. `balances_.updates` is intentionally unpriced. See its [docs](/data-catalog/curated/balances/evm-updates) for how to attach a price that fits your analysis. ## Solana Solana balances (native SOL and SPL tokens) are in `solana_utils.latest_balances`. This predates the EVM `balances_` tables above and uses a different layout. > [card] [Solana Latest Balances](/data-catalog/curated/balances/solana-latest-balances) > > Current SOL and SPL token balance per address (`solana_utils.latest_balances`) ## Related Tables * `tokens.transfers` for token transfer events * `prices.day` / `prices.latest` for token prices * `tokens_.erc20` for ERC20 metadata (name, symbol, decimals) > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom balance datasets or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private balance tracking pipelines with the dbt Connector. # solana_utils.latest_balances Source: https://docs.dune.com/data-catalog/curated/balances/solana-latest-balances Current SOL and SPL token balances for every address on Solana. The `solana_utils.latest_balances` table provides the most recent balance snapshot for every address on Solana, covering both native SOL and SPL token holdings. Each row represents the latest known balance for a specific address and token combination. The table is incrementally updated. ### When to Use This Table * Look up current token holdings for a wallet * Build portfolio dashboards showing real-time Solana balances * Identify top holders of a specific SPL token * Power wallet scoring and risk profiling systems ### Query Performance This table can be large. Always filter on `address` or `token_mint_address` for best performance. ```sql theme={null} -- ✅ Good: filter on specific address SELECT * FROM solana_utils.latest_balances WHERE address = 'FG4Y3yX4AAchp1HvNZ7LfzFTewF2f6nDoMDCohTFrdpk' -- ✅ Good: top holders of a specific token SELECT address, token_balance FROM solana_utils.latest_balances WHERE token_mint_address = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' -- USDC ORDER BY token_balance DESC LIMIT 100 ``` ## Table Schema Examples are illustrative values for a Solana SPL token account holding USDC. They are not a live balance snapshot. | Column | Type | Description | Example | | - | - | - | - | | `address` | `VARCHAR` | Solana wallet address | `FG4Y3yX4AAchp1HvNZ7LfzFTewF2f6nDoMDCohTFrdpk` | | `block_time` | `TIMESTAMP` | Block time of the latest balance update | `2025-01-15 12:00:00` | | `block_slot` | `BIGINT` | Block slot of the latest balance update | `313000000` | | `sol_balance` | `DOUBLE` | Native SOL balance | `0.00203928` | | `token_balance` | `DECIMAL(38,18)` | SPL token balance in display units | `1000.000000000000000000` | | `token_mint_address` | `VARCHAR` | Mint address of the SPL token | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` | | `token_balance_owner` | `VARCHAR` | Owner of the token balance | `HaeE7fyaDjG8fRbSuw5RkKLLgTirQE2Mhosuy7pmFxKh` | | `updated_at` | `TIMESTAMP` | When this record was last updated | `2025-01-15 13:00:00` | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana_utils\&table_name_t6f0df=latest_balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana_utils\&table_name_t6f0df=latest_balances) ## Example Queries **Get all token balances for a specific wallet:** ```sql theme={null} SELECT token_mint_address, token_balance, sol_balance, updated_at FROM solana_utils.latest_balances WHERE address = 'FG4Y3yX4AAchp1HvNZ7LfzFTewF2f6nDoMDCohTFrdpk' ORDER BY token_balance DESC ``` **Top SOL holders:** ```sql theme={null} SELECT address, sol_balance FROM solana_utils.latest_balances WHERE sol_balance > 0 ORDER BY sol_balance DESC LIMIT 50 ``` # bridges_evms.deposits Source: https://docs.dune.com/data-catalog/curated/bridges/deposits Cross-chain bridge deposits — tokens locked or burned on the source chain for bridging to another network. The `bridges_evms.deposits` table contains individual bridge deposit events on source chains, enriched with token metadata and USD pricing. ## Table Schema | Column | Type | Description | | - | - | - | | `deposit_chain` | `VARCHAR` | Blockchain where tokens were sent from | | `withdrawal_chain_id` | `DOUBLE` | Chain ID where tokens were received | | `withdrawal_chain` | `VARCHAR` | Blockchain where tokens were received | | `bridge_name` | `VARCHAR` | Bridge protocol name | | `bridge_version` | `VARCHAR` | Bridge version | | `block_date` | `TIMESTAMP` | Block date | | `block_time` | `TIMESTAMP` | Block timestamp | | `block_number` | `BIGINT` | Block number | | `deposit_amount_raw` | `DOUBLE` | Raw amount of tokens bridged | | `deposit_amount` | `DOUBLE` | Amount of tokens bridged in display units | | `deposit_amount_usd` | `DOUBLE` | USD value of tokens bridged | | `sender` | `VARBINARY` | Source address | | `recipient` | `VARBINARY` | Destination address | | `deposit_token_standard` | `VARCHAR` | Source token standard | | `deposit_token_address` | `VARBINARY` | Source token contract address | | `tx_from` | `VARBINARY` | Address that initiated the deposit | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `BIGINT` | Event index | | `contract_address` | `VARBINARY` | Bridge contract address | | `bridge_transfer_id` | `VARCHAR` | Bridge order identifier | | `duplicate_index` | `BIGINT` | Index for duplicate deposit events | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bridges_evms\&table_name_t6f0df=deposits](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bridges_evms\&table_name_t6f0df=deposits) # bridges_evms.flows Source: https://docs.dune.com/data-catalog/curated/bridges/flows Matched cross-chain bridge flows — deposits paired with withdrawals for complete bridge transfer tracking. The `bridges_evms.flows` table contains matched deposit-withdrawal pairs representing complete cross-chain bridge transfers across 41 EVM chains. ## Table Schema | Column | Type | Description | | - | - | - | | `deposit_chain` | `VARCHAR` | Blockchain where tokens were sent from | | `deposit_chain_id` | `DOUBLE` | Chain ID where tokens were sent from | | `withdrawal_chain` | `VARCHAR` | Blockchain where tokens were received | | `withdrawal_chain_id` | `DOUBLE` | Chain ID where tokens were received | | `bridge_name` | `VARCHAR` | Bridge protocol name | | `bridge_version` | `VARCHAR` | Bridge version | | `deposit_block_date` | `TIMESTAMP` | Deposit block date | | `deposit_block_time` | `TIMESTAMP` | Deposit block timestamp | | `deposit_block_number` | `BIGINT` | Deposit block number | | `withdrawal_block_date` | `DATE` | Withdrawal block date | | `withdrawal_block_time` | `TIMESTAMP` | Withdrawal block timestamp | | `withdrawal_block_number` | `BIGINT` | Withdrawal block number | | `deposit_amount_raw` | `DOUBLE` | Raw amount deposited | | `deposit_amount` | `DOUBLE` | Amount deposited in display units | | `withdrawal_amount_raw` | `DOUBLE` | Raw amount withdrawn | | `withdrawal_amount` | `DOUBLE` | Amount withdrawn in display units | | `amount_usd` | `DOUBLE` | USD value of the bridge transfer | | `sender` | `VARBINARY` | Source address | | `recipient` | `VARBINARY` | Destination address | | `deposit_token_standard` | `VARCHAR` | Source token standard | | `withdrawal_token_standard` | `VARCHAR` | Destination token standard | | `deposit_token_address` | `VARBINARY` | Source token address | | `withdrawal_token_address` | `VARBINARY` | Destination token address | | `deposit_tx_from` | `VARBINARY` | Address that initiated the deposit | | `deposit_tx_hash` | `VARBINARY` | Deposit transaction hash | | `withdrawal_tx_hash` | `VARBINARY` | Withdrawal transaction hash | | `bridge_transfer_id` | `VARCHAR` | Bridge order identifier | | `duplicate_index` | `BIGINT` | Index for duplicate events | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bridges_evms\&table_name_t6f0df=flows](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bridges_evms\&table_name_t6f0df=flows) # Bridges Source: https://docs.dune.com/data-catalog/curated/bridges/overview Curated cross-chain bridge datasets across 41 EVM chains on Dune Dune's bridge tables track cross-chain token transfers across 41 EVM chains, capturing deposit events on the source chain and withdrawal events on the destination chain, then matching them into complete bridge flows. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~30 min · **Chains:** 41 EVM chains Explore this dataset on the [bridges data page](https://dune.com/data/bridges). > [card] [Get This Data](https://dune.com/enterprise?dataset=bridges) > > Access bridge data via API, Datashare, or the Dune App. ## Available Tables > [card] [bridges_evms.flows](/data-catalog/curated/bridges/flows) > > Matched deposit-withdrawal pairs showing complete bridge transfers > [card] [bridges_evms.deposits](/data-catalog/curated/bridges/deposits) > > Individual deposit events on source chains > [card] [bridges_evms.withdrawals](/data-catalog/curated/bridges/withdrawals) > > Individual withdrawal events on destination chains ## When to Use These Tables * Track cross-chain capital flows between L1s and L2s * Monitor bridge protocol volumes and market share * Analyze net inflows/outflows for specific chains * Identify bridge usage patterns for wallets or tokens * Build cross-chain flow dashboards for chain ecosystem teams ## Coverage > [accordion] View all 41 supported chains > > Abstract, Apechain, Arbitrum, Avalanche C-Chain, Base, Berachain, Blast, BNB Chain, Bob, Boba, Celo, Corn, Ethereum, Fantom, Flare, Gnosis, HyperEVM, Ink, Kaia, Katana, Lens, Linea, Mantle, Nova, opBNB, Optimism, Plasma, Plume, Polygon, Ronin, Scroll, Sei, Sonic, Sophon, Story, Taiko, Unichain, Worldchain, zkEVM, zkSync, Zora **Protocols:** All major bridge protocols with decoded contracts on Dune. Use `SELECT DISTINCT bridge_name FROM bridges_evms.deposits` for the current list. ## Query Performance Filter on `block_date` or `block_time` ranges. For chain-specific analysis, also filter on `deposit_chain` or `withdrawal_chain`. ```sql theme={null} -- ✅ Good: time-bounded with chain filter SELECT * FROM bridges_evms.deposits WHERE deposit_chain = 'ethereum' AND block_date >= DATE '2025-01-01' -- ❌ Slow: unbounded scan SELECT * FROM bridges_evms.flows WHERE bridge_name = 'across' ``` ## Methodology Bridge tables are maintained by Dune ([source code](https://github.com/duneanalytics/spellbook)). The system works in three stages: (1) `deposits` decodes deposit events on source chains, enriched with token metadata and USD pricing; (2) `withdrawals` decodes withdrawal events on destination chains; (3) `flows` joins deposits and withdrawals on `bridge_transfer_id` to produce matched pairs representing complete cross-chain transfers. Not all deposits have matching withdrawals (and vice versa), as matching depends on both chains being indexed and the bridge protocol emitting linkable identifiers. ## Example Queries **Daily bridge volume by destination chain (last 30 days):** ```sql theme={null} SELECT date_trunc('day', deposit_block_time) AS day, withdrawal_chain, SUM(amount_usd) AS bridge_volume_usd, COUNT(*) AS num_transfers FROM bridges_evms.flows WHERE deposit_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 ORDER BY 1 DESC, 3 DESC ``` **Net flows for a specific chain:** ```sql theme={null} WITH inflows AS ( SELECT SUM(deposit_amount_usd) AS total_in FROM bridges_evms.deposits WHERE withdrawal_chain = 'base' AND block_date >= DATE '2025-01-01' ), outflows AS ( SELECT SUM(deposit_amount_usd) AS total_out FROM bridges_evms.deposits WHERE deposit_chain = 'base' AND block_date >= DATE '2025-01-01' ) SELECT i.total_in, o.total_out, i.total_in - o.total_out AS net_flow FROM inflows i, outflows o ``` ## Related Tables * `cex.flows` — For tracking flows to/from centralized exchanges * `tokens.transfers` — Raw token transfer events (bridges are a subset of all transfers) > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom bridge datasets or additional chain coverage? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private cross-chain flow pipelines with the dbt Connector. # bridges_evms.withdrawals Source: https://docs.dune.com/data-catalog/curated/bridges/withdrawals Cross-chain bridge withdrawals — tokens minted or released on the destination chain after bridging. The `bridges_evms.withdrawals` table contains individual bridge withdrawal events on destination chains, enriched with token metadata and USD pricing. ## Table Schema | Column | Type | Description | | - | - | - | | `deposit_chain_id` | `DOUBLE` | Chain ID where tokens were sent from | | `deposit_chain` | `VARCHAR` | Blockchain where tokens were sent from | | `withdrawal_chain` | `VARCHAR` | Blockchain where tokens were received | | `bridge_name` | `VARCHAR` | Bridge protocol name | | `bridge_version` | `VARCHAR` | Bridge version | | `block_date` | `DATE` | Block date | | `block_time` | `TIMESTAMP` | Block timestamp | | `block_number` | `BIGINT` | Block number | | `withdrawal_amount_raw` | `DOUBLE` | Raw amount of tokens received | | `withdrawal_amount` | `DOUBLE` | Amount of tokens received in display units | | `withdrawal_amount_usd` | `DOUBLE` | USD value of tokens received | | `sender` | `VARBINARY` | Source address | | `recipient` | `VARBINARY` | Destination address | | `withdrawal_token_standard` | `VARCHAR` | Destination token standard | | `withdrawal_token_address` | `VARBINARY` | Destination token contract address | | `tx_from` | `VARBINARY` | Address that initiated the transaction | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `BIGINT` | Event index | | `contract_address` | `VARBINARY` | Bridge contract address | | `bridge_transfer_id` | `VARCHAR` | Bridge order identifier | | `duplicate_index` | `BIGINT` | Index for duplicate withdrawal events | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bridges_evms\&table_name_t6f0df=withdrawals](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bridges_evms\&table_name_t6f0df=withdrawals) # cex.addresses Source: https://docs.dune.com/data-catalog/curated/cex-flows/addresses Centralized exchange address directory — all known addresses attributed to major exchanges. The `cex.addresses` table contains all identified centralized exchange addresses across 29 chains, including non-EVM networks like Bitcoin, Solana, Aptos, Tron, and Sui. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain | | `address` | `VARBINARY` | CEX-controlled address | | `cex_name` | `VARCHAR` | Centralized exchange name | | `distinct_name` | `VARCHAR` | Distinct name of the address | | `added_by` | `VARCHAR` | Who added the address | | `added_date` | `DATE` | Date the address was added | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cex\&table_name_t6f0df=addresses](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cex\&table_name_t6f0df=addresses) # cex.deposit_addresses Source: https://docs.dune.com/data-catalog/curated/cex-flows/deposit_addresses Known centralized exchange deposit addresses — identified user-facing deposit wallets by exchange. The `cex.deposit_addresses` table contains programmatically detected user deposit addresses — identified through on-chain consolidation patterns where tokens flow from external wallets through deposit addresses to known CEX hot wallets. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain | | `address` | `VARBINARY` | Deposit address | | `cex_name` | `VARCHAR` | CEX name | | `first_deposit_token_standard` | `VARCHAR` | Token standard of first deposit | | `first_deposit_token_address` | `VARBINARY` | Token address of first deposit | | `deposit_first_block_time` | `TIMESTAMP` | Time of first deposit | | `consolidation_first_block_time` | `TIMESTAMP` | Time of first consolidation by CEX | | `deposit_count` | `BIGINT` | Number of deposits | | `consolidation_count` | `BIGINT` | Number of consolidations | | `amount_deposited` | `DOUBLE` | Total amount deposited | | `consolidation_unique_key` | `VARCHAR` | Unique key for consolidation | | `deposit_unique_key` | `VARCHAR` | Unique key for deposit | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cex\&table_name_t6f0df=deposit_addresses](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cex\&table_name_t6f0df=deposit_addresses) # cex.flows Source: https://docs.dune.com/data-catalog/curated/cex-flows/flows Token flows to and from centralized exchanges — deposits, withdrawals, and internal transfers with exchange entity attribution. The `cex.flows` table contains all token flows to and from identified centralized exchange addresses across 21 EVM chains, classified as inflows or outflows with USD pricing. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain | | `block_month` | `DATE` | Block month | | `block_time` | `TIMESTAMP` | Block timestamp | | `block_number` | `BIGINT` | Block number | | `cex_name` | `VARCHAR` | Centralized exchange name | | `distinct_name` | `VARCHAR` | Distinct name of the CEX address | | `token_address` | `VARBINARY` | Token contract address | | `token_symbol` | `VARCHAR` | Token symbol | | `token_standard` | `VARCHAR` | Token standard | | `flow_type` | `VARCHAR` | Flow type (deposit or withdrawal) | | `amount` | `DOUBLE` | Token amount | | `amount_raw` | `UINT256` | Raw token amount | | `amount_usd` | `DOUBLE` | USD value | | `from` | `VARBINARY` | Sender address | | `to` | `VARBINARY` | Recipient address | | `tx_from` | `VARBINARY` | Address that executed the transaction | | `tx_to` | `VARBINARY` | Address the transaction points to | | `tx_index` | `BIGINT` | Transaction index | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `BIGINT` | Event index | | `unique_key` | `VARCHAR` | Unique transfer identifier | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cex\&table_name_t6f0df=flows](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cex\&table_name_t6f0df=flows) # CEX Flows Source: https://docs.dune.com/data-catalog/curated/cex-flows/overview Curated centralized exchange flow datasets across 29 chains on Dune Dune's CEX (Centralized Exchange) tables identify known exchange addresses across 29 chains, track token flows in and out of exchanges, and detect user deposit addresses through on-chain consolidation pattern analysis. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~1 hour · **Chains:** 29 (addresses), 21 EVM (flows) Explore this dataset on the [CEX flows data page](https://dune.com/data/cex-flows). > [card] [Get This Data](https://dune.com/enterprise?dataset=cex-flows) > > Access CEX flow data via API, Datashare, or the Dune App. ## Available Tables > [card] [cex.flows](/data-catalog/curated/cex-flows/flows) > > All token flows to/from identified CEX addresses on EVM chains > [card] [cex.addresses](/data-catalog/curated/cex-flows/addresses) > > All identified CEX-controlled addresses across 29 chains (including non-EVM) > [card] [cex.deposit_addresses](/data-catalog/curated/cex-flows/deposit_addresses) > > Programmatically detected user deposit addresses ## When to Use These Tables * Monitor exchange inflows and outflows for market sentiment analysis * Track specific token flows to/from exchanges * Identify exchange-controlled addresses for compliance or analytics * Detect user deposit addresses programmatically * Analyze exchange reserve changes over time ## Coverage **cex.addresses (29 chains):** Ethereum, BNB Chain, Avalanche C-Chain, Optimism, Arbitrum, Polygon, Bitcoin, Fantom, Aptos, Celo, Zora, zkSync, zkEVM, Linea, Solana, Scroll, Tron, Base, Mantle, Worldchain, Sei, Berachain, Ink, Katana, Kaia, Nova, opBNB, Unichain, Sui **cex.flows (21 EVM chains):** Ethereum, BNB Chain, Avalanche C-Chain, Gnosis, Optimism, Arbitrum, Polygon, Base, Celo, Zora, zkSync, Scroll, Fantom, Linea, zkEVM, Berachain, Ink, Katana, Nova, opBNB, Unichain **Exchanges:** Major centralized exchanges with identified hot wallets and deposit addresses. Additional exchanges can be added upon request for enterprise customers. > [!NOTE] > > **Need coverage for additional exchanges?** We can add new exchange address identification upon request. [Contact our enterprise team →](https://dune.com/enterprise) ## Query Performance `cex.flows` uses `block_month` for incremental processing. Always filter on time range and optionally `blockchain`. ```sql theme={null} -- ✅ Good: time-bounded with chain filter SELECT * FROM cex.flows WHERE blockchain = 'ethereum' AND block_time >= NOW() - INTERVAL '7' DAY AND cex_name = 'Binance' -- ❌ Slow: no time filter SELECT * FROM cex.flows WHERE cex_name = 'Coinbase' ``` ## Methodology CEX tables are maintained by Dune ([source code](https://github.com/duneanalytics/spellbook)). `cex.addresses` aggregates known CEX addresses from manually curated seed files across chain-specific models. Each address record includes who added it and when. `cex.flows` joins identified CEX addresses with token transfer events to classify each transfer as an inflow (to exchange) or outflow (from exchange), enriched with token metadata and USD pricing. `cex.deposit_addresses` uses on-chain heuristics to detect user-specific deposit addresses: it identifies addresses that receive tokens from external wallets and then consolidate those tokens to known CEX hot wallets — a pattern characteristic of exchange deposit addresses. ## Example Queries **Daily CEX net flows by exchange (Ethereum):** ```sql theme={null} SELECT date_trunc('day', block_time) AS day, cex_name, SUM(CASE WHEN flow_type = 'inflow' THEN amount_usd ELSE 0 END) AS inflows_usd, SUM(CASE WHEN flow_type = 'outflow' THEN amount_usd ELSE 0 END) AS outflows_usd, SUM(CASE WHEN flow_type = 'inflow' THEN amount_usd ELSE -amount_usd END) AS net_flow_usd FROM cex.flows WHERE blockchain = 'ethereum' AND block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 ORDER BY 1 DESC, 5 DESC ``` **Stablecoin flows to exchanges:** ```sql theme={null} SELECT cex_name, token_symbol, SUM(CASE WHEN flow_type = 'inflow' THEN amount_usd ELSE 0 END) AS inflow_usd, SUM(CASE WHEN flow_type = 'outflow' THEN amount_usd ELSE 0 END) AS outflow_usd FROM cex.flows WHERE blockchain = 'ethereum' AND token_symbol IN ('USDT', 'USDC', 'DAI') AND block_time >= NOW() - INTERVAL '7' DAY GROUP BY 1, 2 ORDER BY 3 DESC ``` ## Related Tables * `labels.addresses` — Broader address labeling beyond CEX * `tokens.transfers` — Raw transfer data underlying CEX flow classification * `staking_ethereum.deposits` — Staking data for CEX staking analysis > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom exchange coverage or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private exchange flow analytics with the dbt Connector. # dex_aggregator.trades Source: https://docs.dune.com/data-catalog/curated/dex-trades/evm/dex-aggregator-trades The `dex_aggregator.trades` table captures data on actions taken on aggregators - recording all events across various aggregators and blockchains. [https://dune.com/embeds/3787155/6367567](https://dune.com/embeds/3787155/6367567) This table stores data on aggregator trades across protocols... [https://dune.com/embeds/3787158/6367574](https://dune.com/embeds/3787158/6367574) ... and chains ## Table Description The `dex_aggregator.trades` table captures high-level trade data executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools.\ For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC -> PEPE trade. Complementary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The table covers the following decentralized exchanges and their versions: [https://dune.com/embeds/3457736/5810651](https://dune.com/embeds/3457736/5810651) ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain on which the DEX is deployed | | `project` | `VARCHAR` | Name of the aggregator project | | `version` | `VARCHAR` | Version of the contract built and deployed by the project | | `block_date` | `TIMESTAMP` | UTC event block date | | `block_month` | `TIMESTAMP` | UTC event block month (partition key) | | `block_time` | `TIMESTAMP` | UTC event block time | | `token_bought_symbol` | `VARCHAR` | Symbol of the token bought | | `token_sold_symbol` | `VARCHAR` | Symbol of the token sold | | `token_pair` | `VARCHAR` | Token symbol pair for each token involved | | `token_bought_amount` | `DOUBLE` | Amount of the token bought in display units | | `token_sold_amount` | `DOUBLE` | Amount of the token sold in display units | | `token_bought_amount_raw` | `UINT256` | Raw amount of the token bought | | `token_sold_amount_raw` | `UINT256` | Raw amount of the token sold | | `amount_usd` | `DOUBLE` | USD value of the trade at time of execution | | `token_bought_address` | `VARBINARY` | Contract address of the token bought | | `token_sold_address` | `VARBINARY` | Contract address of the token sold | | `taker` | `VARBINARY` | Address of trader who purchased tokens | | `maker` | `VARBINARY` | Address of trader who sold tokens | | `project_contract_address` | `VARBINARY` | Project contract address which executed the trade | | `tx_hash` | `VARBINARY` | Transaction hash | | `tx_from` | `VARBINARY` | Address which initiated the trade | | `tx_to` | `VARBINARY` | Address which received the trade | | `trace_address` | `ARRAY(BIGINT)` | Trace address within the transaction | | `evt_index` | `BIGINT` | Index of the corresponding trade event | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dex_aggregator\&table_name_t6f0df=trades](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dex_aggregator\&table_name_t6f0df=trades) # dex.sandwiched Source: https://docs.dune.com/data-catalog/curated/dex-trades/evm/dex-sandwiched The `dex.sandwiched` table captures detailed data on the victim trades of sandwich attacks in decentralized exchanges (DEXs), recording transactions that have been sandwiched across various EVM networks. ## Table Description The `dex.sandwiched` table captures detailed data on the victim trades of sandwich attacks executed via decentralized exchanges (DEXs). This table records the transactions that have been sandwiched between front-running and back-running trades. It provides a comprehensive view of sandwich attack victims across various EVM networks. ## Functional Overview The `dex.sandwiched` table provides an in-depth view of the victim trades in sandwich attacks on decentralized exchanges. A sandwich attack occurs when a trader (usually a bot) spots a pending transaction in the mempool, quickly executes a trade before it (front-running), and then immediately after it (back-running) to profit from the price movement caused by the victim's trade. This table includes entries for: 1. The victim trade that has been sandwiched Note that the front-running and back-running trades that sandwich these victim trades are captured in a separate table, `dex.sandwiches`. This detailed approach allows for granular analysis of sandwich attack patterns, enabling users to: * **Identify Sandwich Attack Victims**: Easily spot instances of trades that have been sandwiched across different DEXs and networks. * **Analyze Attack Impacts**: Understand the frequency, size, and potential losses of sandwiched trades. * **Monitor Market Vulnerability**: Gain insights into which trades are most susceptible to sandwich attacks across different DEXs and EVM networks. By providing comprehensive details of the victim trades in sandwich attacks, the `dex.sandwiched` table supports advanced analytics and research into DEX trading behavior, market manipulation, and potential areas for improved trade execution or protocol design to protect users from sandwich attacks. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain on which this trade occurred | | `project` | `VARCHAR` | Name of the DEX on which the trade occurred | | `version` | `VARCHAR` | Version of the DEX protocol/contract | | `block_time` | `TIMESTAMP` | UTC event block time | | `block_month` | `DATE` | UTC event block month (partition key) | | `block_number` | `BIGINT` | Block number in which the trade occurred | | `token_sold_address` | `VARBINARY` | Contract address of the token sold | | `token_bought_address` | `VARBINARY` | Contract address of the token bought | | `token_sold_symbol` | `VARCHAR` | Symbol of the token sold | | `token_bought_symbol` | `VARCHAR` | Symbol of the token bought | | `maker` | `VARBINARY` | Address that sold tokens (can be contract or EOA) | | `taker` | `VARBINARY` | Address that purchased tokens (can be contract or EOA) | | `tx_hash` | `VARBINARY` | Transaction hash | | `tx_from` | `VARBINARY` | EOA address that sent the transaction | | `tx_to` | `VARBINARY` | Address called in the first call of this transaction | | `project_contract_address` | `VARBINARY` | Smart contract address which emitted the trade event | | `token_pair` | `VARCHAR` | Symbol pair for the tokens involved, always alphabetical order | | `tx_index` | `BIGINT` | Index of the transaction in the block | | `token_sold_amount_raw` | `UINT256` | Raw amount of the token sold | | `token_bought_amount_raw` | `UINT256` | Raw amount of the token bought | | `token_sold_amount` | `DOUBLE` | Amount of the token sold in display units | | `token_bought_amount` | `DOUBLE` | Amount of the token bought in display units | | `amount_usd` | `DOUBLE` | USD value of the trade at time of execution | | `evt_index` | `BIGINT` | Index of the event in the transaction | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dex\&table_name_t6f0df=sandwiched](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dex\&table_name_t6f0df=sandwiched) ## Related Tables * `dex.sandwiches`: This complementary table captures the front-running and back-running trades that sandwich the victim trades recorded in `dex.sandwiched`. * `dex.trades`: This table captures all trades and is the basis for the `dex.sandwiched` table. # dex.sandwiches Source: https://docs.dune.com/data-catalog/curated/dex-trades/evm/dex-sandwiches The `dex.sandwiches` table captures detailed data on the outer trades of sandwich attacks in decentralized exchanges (DEXs), recording front-running and back-running trades across various EVM networks. ## Table Description The `dex.sandwiches` table captures detailed data on the outer trades of sandwich attacks executed via decentralized exchanges (DEXs). This table records the trades that constitute the "bread" of the sandwich attack, which can include both front-running and back-running trades, as well as more complex patterns. It provides a comprehensive view of sandwich attack patterns across various EVM networks. ## Functional Overview The `dex.sandwiches` table provides an in-depth view of the outer trades in sandwich attacks on decentralized exchanges. A sandwich attack typically occurs when a searcher spots a pending transaction in the mempool, quickly executes a trade before it (front-running), and then immediately after it (back-running) to profit from the price movement caused by the victim's trade. However, this table also captures more complex sandwich attack patterns. For example: bot1: ETH>USDC victim1: USDC>ETH bot1: USDC>ETH victim2: ETH>USDC bot1: ETH>USDC In this scenario, the bot executes trades on both sides of the liquidity pool, sandwiching multiple victim trades in a single sequence. This table includes entries for all bot trades involved in these attack patterns. Note that the victim trades sandwiched between these outer trades are captured in a separate table, `dex.sandwiched`. This detailed approach allows for granular analysis of sandwich attack patterns, enabling users to: * **Identify Sandwich Attacks**: Easily spot instances of sandwich attacks across different DEXs and networks, including complex multi-trade patterns. * **Analyze Attack Patterns**: Understand the frequency, size, and potential profitability of sandwich attacks, including sophisticated strategies that target multiple victims in a single sequence. * **Monitor Market Manipulation**: Gain insights into various forms of market manipulation across different DEXs and EVM networks. By providing comprehensive details of the trades involved in sandwich attacks, the `dex.sandwiches` table supports advanced analytics and research into DEX trading behavior, market manipulation, and potential areas for improved trade execution or protocol design. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain on which this trade occurred | | `project` | `VARCHAR` | Name of the DEX on which the trade occurred | | `version` | `VARCHAR` | Version of the DEX protocol/contract | | `block_time` | `TIMESTAMP` | UTC event block time | | `block_month` | `DATE` | UTC event block month (partition key) | | `block_number` | `BIGINT` | Block number in which the trade occurred | | `token_sold_address` | `VARBINARY` | Contract address of the token sold | | `token_bought_address` | `VARBINARY` | Contract address of the token bought | | `token_sold_symbol` | `VARCHAR` | Symbol of the token sold | | `token_bought_symbol` | `VARCHAR` | Symbol of the token bought | | `maker` | `VARBINARY` | Address that sold tokens (can be contract or EOA) | | `taker` | `VARBINARY` | Address that purchased tokens (can be contract or EOA) | | `tx_hash` | `VARBINARY` | Transaction hash | | `tx_from` | `VARBINARY` | EOA address that sent the transaction | | `tx_to` | `VARBINARY` | Address called in the first call of this transaction | | `project_contract_address` | `VARBINARY` | Smart contract address which emitted the trade event | | `token_pair` | `VARCHAR` | Symbol pair for the tokens involved, always alphabetical order | | `tx_index` | `BIGINT` | Index of the transaction in the block | | `token_sold_amount_raw` | `UINT256` | Raw amount of the token sold | | `token_bought_amount_raw` | `UINT256` | Raw amount of the token bought | | `token_sold_amount` | `DOUBLE` | Amount of the token sold in display units | | `token_bought_amount` | `DOUBLE` | Amount of the token bought in display units | | `amount_usd` | `DOUBLE` | USD value of the trade at time of execution | | `evt_index` | `BIGINT` | Index of the event in the transaction | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dex\&table_name_t6f0df=sandwiches](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dex\&table_name_t6f0df=sandwiches) ## Examples The following query demonstrates how to use the `dex.sandwiches` table to calculate the total volume of sandwich attack trades on a weekly basis. ```sql theme={null} SELECT date_trunc('week', block_time) AS week, COUNT(*) AS sandwich_count, SUM(token_sold_amount_usd) AS total_volume_usd FROM dex.sandwiches WHERE blockchain = 'ethereum' AND block_time >= NOW() - INTERVAL '90' DAY GROUP BY 1 ORDER BY 1 ``` ## Related Tables * `dex.sandwiched`: This complementary table captures the victim trades that are sandwiched between the trades recorded in `dex.sandwiches`. * `dex.trades`: This table captures all trades and is the basis for the `dex.sandwiches` table. # dex.trades Source: https://docs.dune.com/data-catalog/curated/dex-trades/evm/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols and blockchains. [https://dune.com/embeds/4319/8411](https://dune.com/embeds/4319/8411) This table stores data on dex trades across protocols... [https://dune.com/embeds/2180075/3571504](https://dune.com/embeds/2180075/3571504) ... and chains ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liquidity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to: * **Analyze Liquidity Sources**: Understand which liquidity pools are used and how they interact in both single-step and multi-step trades. * **Track Trade Execution Paths**: Follow the exact route a trade takes across different DEXs and liquidity pools. * **Assess Slippage and Execution Quality**: Evaluate the impact of each step on the overall trade execution, including slippage and price changes. * **Monitor Market Dynamics**: Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time. By providing comprehensive trade details, the `dex.trades` table supports advanced analytics and research into DEX trading behavior and liquidity management. Complementary tables include `dex_aggregator.trades`, in which trade-intents that are routed through aggregators are recorded. The volume routed through aggregators is also recorded in the dex.trades table, one row in dex_aggregator trades corresponds to one or more rows in dex.trades. ## Coverage The table covers the following decentralized exchanges and their versions: [https://dune.com/embeds/3453733/5803813](https://dune.com/embeds/3453733/5803813) ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain on which this trade occurred | | `project` | `VARCHAR` | Name of the DEX on which the trade occurred | | `version` | `VARCHAR` | Version of the DEX protocol/contract | | `block_month` | `DATE` | UTC event block month (partition key) | | `block_date` | `DATE` | UTC event block date | | `block_time` | `TIMESTAMP` | UTC event block time | | `block_number` | `BIGINT` | Block number in which the trade occurred | | `token_bought_symbol` | `VARCHAR` | Symbol of the token bought | | `token_sold_symbol` | `VARCHAR` | Symbol of the token sold | | `token_pair` | `VARCHAR` | Symbol pair for the tokens involved, always alphabetical order | | `token_bought_amount` | `DOUBLE` | Amount of the token bought in display units | | `token_sold_amount` | `DOUBLE` | Amount of the token sold in display units | | `token_bought_amount_raw` | `UINT256` | Raw amount of the token bought before decimal adjustment | | `token_sold_amount_raw` | `UINT256` | Raw amount of the token sold before decimal adjustment | | `amount_usd` | `DOUBLE` | USD value of the trade at time of execution | | `token_bought_address` | `VARBINARY` | Contract address of the token bought | | `token_sold_address` | `VARBINARY` | Contract address of the token sold | | `taker` | `VARBINARY` | Address that purchased tokens (can be contract or EOA) | | `maker` | `VARBINARY` | Address that sold tokens (can be contract or EOA) | | `project_contract_address` | `VARBINARY` | Smart contract address which emitted the event (pool, router, etc.) | | `tx_hash` | `VARBINARY` | Transaction hash | | `tx_from` | `VARBINARY` | EOA address that sent the trade transaction | | `tx_to` | `VARBINARY` | Address called in the first call of this transaction | | `evt_index` | `BIGINT` | Index of the event in the transaction | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dex\&table_name_t6f0df=trades](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dex\&table_name_t6f0df=trades) ## Examples The following query demonstrates how to use the dex.trades table to calculate the total volume of trades on a weekly basis. ```sql theme={null} SELECT blockchain, DATE_TRUNC('week', block_time), SUM(CAST(amount_usd AS DOUBLE)) AS usd_volume FROM dex."trades" AS t WHERE block_time > NOW() - INTERVAL '365' day GROUP BY 1,2 ``` [https://dune.com/embeds/2180075/3571504](https://dune.com/embeds/2180075/3571504) > [card] [Dex Dashboard](https://dune.com/dune/dex-metrics) > > For more examples of how to use the `dex.trades` table, check out this dashboard. # DEX Data Source: https://docs.dune.com/data-catalog/curated/dex-trades/overview Curated DEX trading data across multiple blockchain networks Decentralized exchanges (DEXs) have become a cornerstone of DeFi, enabling permissionless trading of tokens directly on-chain. Dune provides comprehensive coverage of DEX activity through curated tables that capture trades, aggregator usage, and MEV events like sandwich attacks across both EVM and Solana networks. These datasets enable analysis of trading volumes, liquidity dynamics, price impact, and market manipulation across major DEX protocols and networks. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~30 min · **Chains:** 50 EVM chains, Solana Explore this dataset on the [DEX trading data page](https://dune.com/data/dex-trading). > [card] [Get This Data](https://dune.com/enterprise?dataset=dex.trades) > > Access DEX trading data via API, Datashare, or the Dune App. ## Cross-Chain DEX Coverage Our DEX data covers multiple blockchain ecosystems: * **EVM Networks**: Ethereum, Arbitrum, Polygon, Base, Optimism, and 50 EVM chains total * **Solana**: Comprehensive coverage of Solana DEX protocols and Jupiter aggregator ## Available Datasets ### EVM DEX Data > [card] [DEX Trades](/data-catalog/curated/dex-trades/evm/dex-trades) > > Individual trades across DEX protocols like Uniswap, SushiSwap, Curve and more > [card] [Aggregator Trades](/data-catalog/curated/dex-trades/evm/dex-aggregator-trades) > > Trades routed through aggregators like 1inch, 0x Protocol, ParaSwap > [card] [Sandwich Attacks](/data-catalog/curated/dex-trades/evm/dex-sandwiches) > > Detected sandwich attack trades and their details > [card] [Sandwiched Trades](/data-catalog/curated/dex-trades/evm/dex-sandwiched) > > Transactions that were victims of sandwich attacks ### Solana DEX Data > [card] [Solana DEX Trades](/data-catalog/curated/dex-trades/solana/solana-dex-trades) > > Detailed trade data across Solana DEX protocols like Orca, Raydium, and more > [card] [Jupiter Aggregator](/data-catalog/curated/dex-trades/solana/jupiter-aggregator-trades) > > Trades executed through the Jupiter aggregator on Solana ## Key Features * **Multi-Chain Coverage**: Analyze DEX activity across EVM and Solana ecosystems * **Standardized Schema**: Consistent data structure for cross-chain analysis * **MEV Detection**: Identify sandwich attacks and other MEV activities (EVM) * **Aggregator Data**: Track trades through major aggregators on both networks * **Real-time Updates**: Data is updated continuously as new blocks are processed ## Sample Cross-Chain Analysis Compare DEX trading volume across different blockchain networks: ```sql theme={null} -- EVM DEX volume SELECT 'EVM' as ecosystem, blockchain, DATE_TRUNC('day', block_time) as date, SUM(amount_usd) as volume_usd FROM dex.trades WHERE block_time >= NOW() - INTERVAL '30' day GROUP BY 1, 2, 3 UNION ALL -- Solana DEX volume SELECT 'Solana' as ecosystem, 'solana' as blockchain, DATE_TRUNC('day', block_time) as date, SUM(amount_usd) as volume_usd FROM dex_solana.trades WHERE block_time >= NOW() - INTERVAL '30' day GROUP BY 1, 2, 3 ORDER BY date DESC, volume_usd DESC ``` ## When to Use These Tables * Analyze DEX trading volumes and market share across protocols and chains * Track token price impact and liquidity depth on specific pairs * Monitor MEV activity (sandwich attacks) and their cost to traders * Build DEX aggregator performance benchmarks * Compare DEX activity across L1s and L2s for ecosystem analysis ## Query Performance **Partition keys for `dex.trades`:** `blockchain`, `project`, `block_month` Always include `blockchain` and a time filter (`block_month` or `block_time` range) for best performance. ```sql theme={null} -- ✅ Good: partition key filters SELECT * FROM dex.trades WHERE blockchain = 'ethereum' AND block_month >= DATE '2025-01-01' AND project = 'uniswap' -- ❌ Slow: no partition filters SELECT * FROM dex.trades WHERE token_bought_symbol = 'USDC' ``` ## Methodology DEX tables are maintained by Dune ([source code](https://github.com/duneanalytics/spellbook)). They aggregate data from protocol-specific base models (e.g., `uniswap_v3_ethereum.trades`, `curve_ethereum.trades`) that decode swap events from each DEX's smart contracts. Token amounts are decimal-adjusted and joined with Dune's price feeds for USD values. The `dex.trades` union view combines all EVM chain models; `dex_solana.trades` covers Solana DEXs separately. ## Example Queries **Daily DEX volume by protocol on Ethereum (last 30 days):** ```sql theme={null} SELECT date_trunc('day', block_time) AS day, project, SUM(amount_usd) AS volume_usd, COUNT(*) AS num_trades FROM dex.trades WHERE blockchain = 'ethereum' AND block_month >= DATE '2025-01-01' AND block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 ORDER BY 1 DESC, 3 DESC ``` **Top traded pairs on Uniswap v3 (last 7 days):** ```sql theme={null} SELECT token_bought_symbol, token_sold_symbol, SUM(amount_usd) AS volume_usd, COUNT(*) AS num_trades FROM dex.trades WHERE blockchain = 'ethereum' AND project = 'uniswap' AND project_version = '3' AND block_time >= NOW() - INTERVAL '7' DAY GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 20 ``` ## Related Tables * `prices.day` / `prices.hour` / `prices.minute` — Token pricing feeds used for USD values * `tokens.erc20` — Token metadata (symbols, decimals, contract addresses) * `nft.trades` — NFT marketplace trades (separate from fungible token DEX trades) * `dex.sandwiches` — MEV sandwich attack data > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom DEX datasets or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private DEX analytics pipelines with the dbt Connector. # jupiter_solana.aggregator_swaps Source: https://docs.dune.com/data-catalog/curated/dex-trades/solana/jupiter-aggregator-trades The `jupiter_solana.aggregator_swaps` table captures data on trades executed through the Jupiter aggregator on Solana. ## Table Description The `jupiter_solana.aggregator_swaps` table captures high-level trade data executed via the Jupiter decentralized exchange (DEX) aggregator on Solana. Jupiter is the most important and only relevant aggregator on Solana, providing users with the best possible trade execution by aggregating liquidity from multiple DEXs. ## Functional Overview Users can expect the `jupiter_solana.aggregator_swaps` table to provide a comprehensive view of DEX trades facilitated by Jupiter on Solana. This table records each trade as a single entry, showing the user's intended swap from input token to output token. For instance, a user might initiate a trade to swap USDC for SOL via Jupiter. The aggregator might route this trade through several liquidity pools, but `jupiter_solana.aggregator_swaps` will record it as a single USDC -> SOL trade, including details such as the amounts, USD values, and the specific AMM used for the swap. ## Coverage This table covers all trades executed through the Jupiter aggregator on Solana, which includes liquidity from various Solana-based DEXs and AMMs. ## Table Schema | Column | Type | Description | | - | - | - | | `amm` | `VARCHAR` | Program ID of the AMM routed through | | `amm_name` | `VARCHAR` | Name of the AMM routed through | | `token_pair` | `VARCHAR` | Token pair routed through | | `input_symbol` | `VARCHAR` | Symbol of the token sold | | `input_mint` | `VARCHAR` | Mint address of the token sold | | `input_amount` | `BIGINT` | Raw amount of the token sold | | `input_decimals` | `BIGINT` | Decimals of the token sold | | `input_usd` | `DOUBLE` | USD value of the token sold | | `output_symbol` | `VARCHAR` | Symbol of the token bought | | `output_mint` | `VARCHAR` | Mint address of the token bought | | `output_amount` | `BIGINT` | Raw amount of the token bought | | `output_usd` | `DOUBLE` | USD value of the token bought | | `output_decimals` | `BIGINT` | Decimals of the token bought | | `log_index` | `BIGINT` | Ordering of the swap within the transaction | | `tx_id` | `VARCHAR` | Transaction ID | | `block_slot` | `BIGINT` | Block slot number | | `block_time` | `TIMESTAMP` | UTC block time | | `block_month` | `DATE` | Block month (partition key) | | `tx_signer` | `VARCHAR` | Signer of the transaction | | `jup_version` | `INTEGER` | Version of the Jupiter aggregator used | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=jupiter_solana\&table_name_t6f0df=aggregator_swaps](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=jupiter_solana\&table_name_t6f0df=aggregator_swaps) # Trading Source: https://docs.dune.com/data-catalog/curated/dex-trades/solana/overview Analyzing trading activity across Solana's decentralized exchanges. The Solana blockchain hosts various decentralized exchanges (DEXs) and trading protocols that facilitate token swaps and trading activities. Dune provides comprehensive trading data through prepared tables that capture trades across different DEX protocols and aggregators on the Solana network. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~3 hours · **Chain:** Solana ## Tables > [card] [DEX Trades](/data-catalog/curated/dex-trades/solana/solana-dex-trades) > > Detailed trade data across Solana DEX protocols > [card] [Jupiter Aggregator](/data-catalog/curated/dex-trades/solana/jupiter-aggregator-trades) > > Trades executed through the Jupiter aggregator ## Key Features The trading tables provide essential data for analyzing Solana's DEX ecosystem: * Comprehensive coverage of major DEX protocols * Detailed trade execution data including amounts, prices, and USD values * Aggregator-specific data for Jupiter trades * Transaction and block details for each trade ## Common Use Cases These datasets enable various types of trading analysis: * Track trading volume across different DEX protocols * Monitor market activity for specific token pairs * Analyze price impact and slippage in trades * Compare performance between different DEXs and aggregators * Identify trading patterns and trends ## Sample Query Here's a simple query to get started analyzing DEX trading volume: ```sql theme={null} SELECT DATE_TRUNC('day', block_time) as date, project, COUNT(*) as num_trades, SUM(amount_usd) as volume_usd FROM dex_solana.trades WHERE block_time >= NOW() - INTERVAL '30' day GROUP BY 1, 2 ORDER BY 1 DESC, 4 DESC ``` These datasets provide valuable insights into trading activity across the Solana ecosystem, enabling users to understand market dynamics and analyze trading patterns on the network. # dex_solana.trades Source: https://docs.dune.com/data-catalog/curated/dex-trades/solana/solana-dex-trades The `dex_solana.trades` table captures detailed data on decentralized exchange (DEX) trades on the Solana blockchain, recording all raw trade events across various protocols. ## Table Description The `dex_solana.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs) on the Solana blockchain. This table records all raw trade events that occur across all liquidity pools on Solana DEXs, providing a comprehensive view of the entire trade execution process and detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex_solana.trades` table provides an in-depth view of trades on Solana-based decentralized exchanges like Raydium, Orca, or Serum. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for RAY. If this trade is executed through multiple liquidity pools, such as USDC-SOL and SOL-RAY, the `dex_solana.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for SOL, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths on Solana, enabling users to: * **Analyze Liquidity Sources**: Understand which liquidity pools are used and how they interact in both single-step and multi-step trades on Solana DEXs. * **Track Trade Execution Paths**: Follow the exact route a trade takes across different Solana DEXs and liquidity pools. * **Assess Slippage and Execution Quality**: Evaluate the impact of each step on the overall trade execution, including slippage and price changes in the Solana ecosystem. * **Monitor Market Dynamics**: Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time on the Solana blockchain. By providing comprehensive trade details, the `dex_solana.trades` table supports advanced analytics and research into DEX trading behavior and liquidity management specific to the Solana ecosystem. ## Coverage [https://dune.com/embeds/4009956/6750980](https://dune.com/embeds/4009956/6750980) ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain (always `solana`) | | `project` | `VARCHAR` | Name of the DEX protocol | | `version` | `INTEGER` | Version of the contract | | `version_name` | `VARCHAR` | Version name | | `block_month` | `DATE` | UTC event block month (partition key) | | `block_date` | `DATE` | UTC event block date | | `block_time` | `TIMESTAMP` | UTC event block time | | `block_slot` | `BIGINT` | Block slot number | | `trade_source` | `VARCHAR` | Whether the trade was a direct call or routed through an aggregator like Jupiter | | `token_bought_symbol` | `VARCHAR` | Symbol of the token bought | | `token_sold_symbol` | `VARCHAR` | Symbol of the token sold | | `token_pair` | `VARCHAR` | Token symbol pair | | `token_bought_amount` | `DOUBLE` | Amount of the token bought in display units | | `token_sold_amount` | `DOUBLE` | Amount of the token sold in display units | | `token_bought_amount_raw` | `UINT256` | Raw amount of the token bought | | `token_sold_amount_raw` | `UINT256` | Raw amount of the token sold | | `amount_usd` | `DOUBLE` | USD value of the trade at time of execution | | `fee_tier` | `DOUBLE` | Pool fee tier (fee percentage) | | `fee_usd` | `DOUBLE` | Fee paid on swap in USD | | `token_bought_mint_address` | `VARCHAR` | Mint address of the token bought | | `token_sold_mint_address` | `VARCHAR` | Mint address of the token sold | | `token_bought_vault` | `VARCHAR` | Token vault address for the pool, of the token bought | | `token_sold_vault` | `VARCHAR` | Token vault address for the pool, of the token sold | | `project_program_id` | `VARCHAR` | Pool program ID of the DEX project | | `project_main_id` | `VARCHAR` | Project main ID | | `trader_id` | `VARCHAR` | Address of the trader who initiated the swap | | `tx_id` | `VARCHAR` | Transaction ID | | `outer_instruction_index` | `INTEGER` | Top-level instruction index for the transaction | | `inner_instruction_index` | `INTEGER` | Inner instruction index for the transaction | | `tx_index` | `INTEGER` | Index of the transaction in the block slot | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dex_solana\&table_name_t6f0df=trades](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=dex_solana\&table_name_t6f0df=trades) ## Examples The following query demonstrates how to use the `dex_solana.trades` table to calculate the total volume of trades on a weekly basis for Solana DEXs. ```sql theme={null} SELECT DATE_TRUNC('week', block_time) AS week, SUM(CAST(amount_usd AS DOUBLE)) AS usd_volume FROM dex_solana.trades WHERE block_time > NOW() - INTERVAL '365' day GROUP BY 1 ORDER BY 1 ``` > [card] [DEX Dashboard](https://dune.com/hagaetc/dex-metrics) > > For more examples of how to use the `dex_solana.trades` table, check out this dashboard. # gas.fees Source: https://docs.dune.com/data-catalog/curated/gas-fees/fees Transaction-level gas fee data across EVM chains — base fee, priority fee, L1/L2 breakdowns, and gas consumption. The `gas.fees` table provides transaction-level gas fee data across 55 EVM chains, including fee breakdowns via the `tx_fee_breakdown` MAP column. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain name | | `block_month` | `DATE` | Block month (partition key) | | `block_date` | `DATE` | Block date | | `block_time` | `TIMESTAMP` | Block timestamp in UTC | | `block_number` | `BIGINT` | Block number | | `tx_hash` | `VARBINARY` | Transaction hash | | `tx_from` | `VARBINARY` | Address that initiated the transaction | | `tx_to` | `VARBINARY` | Address that received the transaction | | `gas_price` | `UINT256` | Gas price per unit in gwei | | `gas_used` | `BIGINT` | Gas units consumed by the transaction | | `currency_symbol` | `VARCHAR` | Native token symbol for the blockchain | | `tx_fee` | `DOUBLE` | Total gas fee in native tokens | | `tx_fee_usd` | `DOUBLE` | Total gas fee in USD | | `tx_fee_raw` | `UINT256` | Raw transaction fee | | `tx_fee_breakdown` | `MAP(VARCHAR,DOUBLE)` | Fee breakdown in native tokens | | `tx_fee_breakdown_usd` | `MAP(VARCHAR,DOUBLE)` | Fee breakdown in USD | | `tx_fee_breakdown_raw` | `MAP(VARCHAR,UINT256)` | Raw fee breakdown | | `tx_fee_currency` | `VARBINARY` | Fee currency address | | `block_proposer` | `VARBINARY` | Block validator/proposer address | | `gas_limit` | `UINT256` | Maximum gas units allowed | | `gas_limit_usage` | `DOUBLE` | Percentage of gas used relative to gas limit | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gas\&table_name_t6f0df=fees](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gas\&table_name_t6f0df=fees) ## Query performance Partition keys: `blockchain`, `block_month`, `block_date`. Always include `blockchain` and a date filter. ```sql theme={null} -- ✅ Good: chain + date filter SELECT * FROM gas.fees WHERE blockchain = 'ethereum' AND block_date = CURRENT_DATE ``` # Gas & Fees Source: https://docs.dune.com/data-catalog/curated/gas-fees/overview Curated transaction fee datasets across 55+ EVM chains and Solana on Dune Dune's gas tables provide transaction-level fee data across 55+ EVM chains and Solana, including fee breakdowns (base fee, priority fee, L1 data fee for L2s), gas pricing, and validator/proposer identification. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~10 min · **Chains:** 55 EVM + Solana > [card] [Get This Data](https://dune.com/enterprise?dataset=gas.fees) > > Access gas fee data via API, Datashare, or the Dune App. ## Available Tables > [card] [gas.fees](/data-catalog/curated/gas-fees/fees) > > Transaction-level gas fees across 55 EVM chains > [card] [gas_solana.fees](/data-catalog/curated/gas-fees/solana_fees) > > Transaction-level fees on Solana (including vote transactions) ## When to Use These Tables * Analyze transaction costs across chains * Compare gas pricing and fee structures between L1s and L2s * Track fee revenue for validators and block proposers * Understand fee breakdowns (base vs priority vs L1 data costs on rollups) * Build gas cost estimators or optimize transaction timing ## Coverage **gas.fees (55 EVM chains):** > [accordion] View all chains > > Abstract, Apechain, Arbitrum, Avalanche C-Chain, B3, Base, Berachain, Blast, BNB Chain, Bob, Boba, Celo, Corn, Degen, Ethereum, Fantom, Flare, Gnosis, Hemi, Henesys, HyperEVM, Ink, Kaia, Katana, Lens, Linea, Mantle, MegaETH, Mezo, Monad, Nova, opBNB, Optimism, Peaq, Plasma, Plume, Polygon, Ronin, Scroll, Sei, Shape, Somnia, Sonic, Sophon, Story, Superseed, TAC, Taiko, Tron, Unichain, Worldchain, X Layer, zkEVM, zkSync, Zora **gas_solana.fees:** Solana (includes vote transactions) ## Query Performance `gas.fees` is a view over chain-specific incremental tables using `block_month` and `block_date` as partition keys. ```sql theme={null} -- ✅ Good: chain + time filter SELECT * FROM gas.fees WHERE blockchain = 'ethereum' AND block_date = DATE '2025-02-01' -- ✅ L2 analysis with month filter SELECT * FROM gas.fees WHERE blockchain = 'base' AND block_month >= DATE '2025-01-01' ``` ## Methodology Gas tables are maintained by Dune ([source code](https://github.com/duneanalytics/spellbook)). Each chain has its own underlying gas model reading from the chain's `transactions` table, enriched with native token pricing for USD values. A key feature is the `tx_fee_breakdown` MAP column, which decomposes fees into their components. For L2s like Base, this breaks down into base fee, priority fee, and L1 data fee — enabling precise rollup cost analysis. ## Example Queries **Average gas price by chain (today):** ```sql theme={null} SELECT blockchain, AVG(tx_fee_usd) AS avg_fee_usd, APPROX_PERCENTILE(tx_fee_usd, 0.5) AS median_fee_usd, COUNT(*) AS num_transactions FROM gas.fees WHERE block_date = CURRENT_DATE GROUP BY 1 ORDER BY 2 DESC ``` **L2 fee breakdown on Base (base fee vs L1 data cost):** ```sql theme={null} SELECT date_trunc('day', block_time) AS day, SUM(tx_fee_breakdown['base_fee']) AS total_base_fee_eth, SUM(tx_fee_breakdown['l1_fee']) AS total_l1_fee_eth, SUM(tx_fee_usd) AS total_fee_usd FROM gas.fees WHERE blockchain = 'base' AND block_month >= DATE '2025-01-01' GROUP BY 1 ORDER BY 1 ``` ## Related Tables * `rollup_economics_ethereum.l1_fees` — Aggregate daily L1 posting costs per rollup * `rollup_economics_ethereum.l2_revenue` — Aggregate daily gas revenue per rollup > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom gas analytics or additional chain coverage? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private gas fee analysis pipelines with the dbt Connector. # gas_solana.fees Source: https://docs.dune.com/data-catalog/curated/gas-fees/solana_fees Solana transaction fee data — compute units, priority fees, and fee payer details per transaction. The `gas_solana.fees` table provides transaction-level fee data on Solana, including compute unit pricing and vote/non-vote transaction classification. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain (always solana) | | `block_month` | `DATE` | Block month | | `block_date` | `DATE` | Block date | | `block_time` | `TIMESTAMP` | Block timestamp | | `block_slot` | `BIGINT` | Block slot number | | `tx_index` | `INTEGER` | Transaction index | | `tx_hash` | `VARCHAR` | Transaction hash | | `signer` | `VARCHAR` | Transaction signer address | | `compute_unit_price` | `DOUBLE` | Compute unit price in lamports | | `compute_limit` | `BIGINT` | Compute units used or limit set | | `currency_symbol` | `VARCHAR` | Currency symbol (SOL) | | `tx_fee_raw` | `BIGINT` | Raw transaction fee in lamports | | `tx_fee` | `DOUBLE` | Transaction fee in SOL | | `tx_fee_usd` | `DOUBLE` | Transaction fee in USD | | `tx_fee_breakdown_raw` | `MAP(VARCHAR,DOUBLE)` | Fee breakdown (base_fee, prioritization_fee) in raw | | `tx_fee_breakdown` | `MAP(VARCHAR,DOUBLE)` | Fee breakdown in SOL | | `tx_fee_breakdown_usd` | `MAP(VARCHAR,DOUBLE)` | Fee breakdown in USD | | `tx_fee_currency` | `VARCHAR` | Fee currency address | | `leader` | `VARCHAR` | Validator that proposed the block | | `tx_type` | `VARCHAR` | Transaction type (vote or normal) | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gas_solana\&table_name_t6f0df=fees](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gas_solana\&table_name_t6f0df=fees) ## Query performance Filter on `block_date`. Use `tx_type = 'normal'` to exclude validator vote transactions from analysis. ```sql theme={null} -- ✅ Good: date filter, non-vote only SELECT * FROM gas_solana.fees WHERE block_date = CURRENT_DATE AND tx_type = 'normal' ``` # labels.addresses Source: https://docs.dune.com/data-catalog/curated/labels/address-labels Comprehensive address labeling and attribution data — maps blockchain addresses to known entities, categories, and usage metrics across all supported chains The `labels.addresses` table on Dune catalogs specific blockchain addresses, associating them with descriptive labels, categories, and usage metrics. This table is a superset of many other `labels.` tables, providing a comprehensive overview of labeled addresses across various categories and blockchains. You can use the `category` column to filter labels for the specific type of address you are interested in. > [!NOTE] > > The `labels.addresses` table serves as a central repository for all labeled addresses on Dune, offering a consolidated view of labeled entities across different categories and blockchains. ## Available Categories Here are all the distinct category values available in the `labels.addresses` table: [https://dune.com/embeds/5488568/8942954](https://dune.com/embeds/5488568/8942954) ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain the address belongs to | | `address` | `VARBINARY` | Labeled blockchain address | | `name` | `VARCHAR` | Human-readable label name for the address | | `category` | `VARCHAR` | Label category (e.g., dex, cex, bridge, dao) | | `contributor` | `VARCHAR` | Contributor(s) who created the label | | `source` | `VARCHAR` | How the label was generated (static or query-based) | | `created_at` | `DATE` | When the label was created | | `updated_at` | `TIMESTAMP` | When the label was last updated | | `model_name` | `VARCHAR` | Name of the label model sourced from | | `label_type` | `VARCHAR` | Type of label | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=labels\&table_name_t6f0df=addresses](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=labels\&table_name_t6f0df=addresses) ## Example Query The following SQL query demonstrates how to find addresses categorized under 'dex' within the Binance blockchain: ```sql theme={null} SELECT address, name FROM labels.addresses WHERE category = 'dex' AND blockchain = 'bnb' ``` # labels.ens Source: https://docs.dune.com/data-catalog/curated/labels/ens-labels Ethereum Name Service (ENS) domain resolution data — links human-readable .eth names to blockchain addresses for identity verification and aggregation The `labels.ens` table on Dune provides key information about Ethereum Name Service (ENS) domains and their associated addresses. This table is instrumental in linking human-readable names with blockchain addresses, aiding in identity verification and data aggregation within the Ethereum ecosystem. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain (always Ethereum) | | `address` | `VARBINARY` | Resolved blockchain address | | `name` | `VARCHAR` | ENS domain name (e.g., vitalik.eth) | | `category` | `VARCHAR` | Label category | | `contributor` | `VARCHAR` | Contributor(s) who created the label | | `source` | `VARCHAR` | How the label was generated (static or query-based) | | `created_at` | `DATE` | When the label was created | | `updated_at` | `TIMESTAMP` | When the label was last updated | | `model_name` | `VARCHAR` | Name of the label model sourced from | | `label_type` | `VARCHAR` | Type of label | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=labels\&table_name_t6f0df=ens](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=labels\&table_name_t6f0df=ens) ## Example Query The following SQL query demonstrates how to retrieve details for a specific ENS name within the Ethereum blockchain: ```sql theme={null} SELECT address, name FROM labels.ens WHERE name = 'vitalik.eth' ``` # Labels Data Source: https://docs.dune.com/data-catalog/curated/labels/overview Labels provide valuable context and clarity to blockchain addresses, enhancing the readability and understanding of blockchain transaction data. ## Why Labels Matter Labels are more than just simple tags or annotations. They provide valuable context and clarity to blockchain addresses, enhancing the readability and understanding of blockchain transaction data. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** N/A · **Chains:** Cross-chain Explore this dataset on the [labels and identity data page](https://dune.com/data/labels-and-identity). > [card] [Get This Data](https://dune.com/enterprise?dataset=labels) > > Access label data via API, Datashare, or the Dune App. In the world of blockchain analysis, labels play a crucial role in identifying and categorizing different entities and activities. They act as signposts, guiding analysts through the complex web of transactions and addresses, making it easier to identify the parties involved and their roles. By mapping blockchain addresses to **known entities**, labels bring transparency to transaction analysis. They help distinguish between individuals, organizations, smart contracts, and other important actors in the blockchain ecosystem. This clarity is essential for compliance, risk assessment, and investigative purposes. Labels also provide insights into the roles and functions of addresses, helping analysts understand the nature of transactions and the relationships between different entities in the blockchain ecosystem. [https://dune.com/embeds/3730609/6274344](https://dune.com/embeds/3730609/6274344) ## Labels datasets We provide several label datasets that can be used to enrich your analysis: > [card] [All Labels](/data-catalog/curated/labels/address-labels) > > A comprehensive collection of labeled addresses across various categories and blockchains, serving as a central repository for all labeled entities on Dune. > [card] [ENS Labels](/data-catalog/curated/labels/ens-labels) > > Ethereum Name Service (ENS) data linking human-readable names with blockchain addresses, facilitating easier interactions and identifications within the Ethereum ecosystem. > [card] [Owner Addresses](/data-catalog/curated/labels/owner-addresses) > > Detailed mapping of blockchain addresses to their owners and custodians, providing insights into ownership and custody of assets across blockchains. > [card] [Owner Details](/data-catalog/curated/labels/owner-details) > > Comprehensive information about entities within the ecosystem, including their operational profiles, categories, and online presence. ## When to Use These Tables * Identify counterparties in transaction analysis (exchanges, protocols, DAOs) * Enrich compliance workflows with entity attribution * Build address reputation and risk scoring systems * Resolve ENS names to blockchain addresses and vice versa * Track protocol treasury and operational addresses ## Query Performance `labels.addresses` is a large table. Always filter on `blockchain` and use additional filters where possible. ```sql theme={null} -- ✅ Good: chain + category filter SELECT * FROM labels.addresses WHERE blockchain = 'ethereum' AND label_type = 'cex' -- ❌ Slow: searching by label name across all chains SELECT * FROM labels.addresses WHERE name LIKE '%Binance%' ``` ## Methodology Labels are maintained by Dune ([source code](https://github.com/duneanalytics/spellbook)). They aggregate address identifications from multiple sources: manually curated seed files (exchanges, protocols, DAOs), automated contract analysis (factory-deployed contracts, proxy patterns), ENS domain resolution, and community contributions. Labels include entity names, categories (e.g., `cex`, `dex`, `dao`, `bridge`), and metadata about the source of identification. ## Example Queries **Find all labeled Binance addresses on Ethereum:** ```sql theme={null} SELECT address, name, label_type, model_name FROM labels.addresses WHERE blockchain = 'ethereum' AND name LIKE '%Binance%' ``` **Resolve ENS name to address:** ```sql theme={null} SELECT address, name FROM labels.ens WHERE name = 'vitalik.eth' ``` ## Related Tables * `cex.addresses` — CEX-specific address identification (more targeted than labels) * `tokens.transfers` — Transfer events enriched by label data * `cex.flows` — Exchange flows that rely on label-identified addresses > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom address labeling or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private address intelligence pipelines with the dbt Connector. # labels.owner_addresses Source: https://docs.dune.com/data-catalog/curated/labels/owner-addresses Owner-to-address mapping data — associates blockchain addresses with known entities for tracking ownership, contract deployments, and operational scope The `labels.owner_addresses` table on Dune provides detailed data on blockchain addresses associated with various owners within the ecosystem, enhancing visibility into ownership distributions, contract deployments, and operational scopes. It’s a crucial tool for analysts to track ownership and custody of assets across blockchains. > [!TIP] > > You can find more details on the account owners and custody owners in the `labels.owner_details` table. ## Table Schema | Column | Type | Description | | - | - | - | | `address` | `VARBINARY` | Blockchain address | | `blockchain` | `VARCHAR` | Blockchain the address belongs to | | `owner_key` | `VARCHAR` | Unique key linking to owner_details | | `custody_owner` | `VARCHAR` | Entity that has custody of the address | | `account_owner` | `VARCHAR` | Entity that owns the account | | `contract_name` | `VARCHAR` | Name of the deployed contract | | `contract_version` | `VARCHAR` | Version of the deployed contract | | `eoa` | `VARCHAR` | Whether the address is an EOA | | `factory_contract` | `VARCHAR` | Factory contract used to deploy | | `source` | `VARCHAR` | Source of the label data | | `identifying_transaction` | `VARCHAR` | Transaction used to identify the address | | `algorithm_name` | `VARCHAR` | Algorithm used for identification | | `source_website` | `VARCHAR` | Website source for the label | | `source_evidence` | `VARCHAR` | Evidence supporting the label | | `created_at` | `TIMESTAMP` | When the record was created | | `created_by` | `VARCHAR` | Who created the record | | `updated_at` | `TIMESTAMP` | When the record was last updated | | `updated_by` | `VARCHAR` | Who last updated the record | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=labels\&table_name_t6f0df=owner_addresses](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=labels\&table_name_t6f0df=owner_addresses) ## Example Query The following SQL query demonstrates how to retrieve details about addresses owned by 'Coinbase': ```sql theme={null} SELECT * FROM labels.owner_addresses where custody_owner = 'Coinbase' ``` The other way around is also possible, to find the custody owner of specific addresses. Here we match entities that have deposited assets to the `0x00000000219ab540356cBB839Cbe05303d7705Fa` address, which is the ETH 2.0 deposit contract. ```sql theme={null} Select "from", "to", value, block_date, hash, custody_owner from ethereum.transactions inner join labels.owner_addresses on "from" = labels.owner_addresses.address where "to" = 0x00000000219ab540356cBB839Cbe05303d7705Fa ``` [https://dune.com/embeds/3730682/6274458](https://dune.com/embeds/3730682/6274458) # labels.owner_details Source: https://docs.dune.com/data-catalog/curated/labels/owner-details Entity profile data — operational details, categories, social presence, and technical profiles for known blockchain entities The `labels.owner_details` table on Dune provides essential information about various entities within the ecosystem, detailing their operational, social, and technical profiles. Data in this table is sourced from community contributions and official documentation, offering a comprehensive overview of the entities' activities, categories, and online presence. Analysts can leverage this data to track the latest developments, partnerships, and projects associated with specific entities. > [!TIP] > > You can find addresses associated with the account owners and custody owners in the `labels.owner_addresses` table. ## Table Schema | Column | Type | Description | | - | - | - | | `name` | `VARCHAR` | Entity name | | `owner_key` | `VARCHAR` | Unique key linking to owner_addresses | | `website` | `VARCHAR` | Entity website URL | | `dune_team` | `VARCHAR` | Associated Dune team | | `project_documentation` | `VARCHAR` | Link to project documentation | | `project_github_url` | `VARCHAR` | Link to project GitHub repository | | `social` | `VARCHAR` | Social media links | | `primary_category` | `VARCHAR` | Primary business category (e.g., Decentralized Exchange) | | `category_tags` | `ARRAY(VARCHAR)` | Additional category tags | | `country_name` | `VARCHAR` | Country of incorporation or operation | | `description` | `VARCHAR` | Brief entity description | | `created_at` | `TIMESTAMP` | When the record was created | | `created_by` | `VARCHAR` | Who created the record | | `updated_at` | `TIMESTAMP` | When the record was last updated | | `updated_by` | `VARCHAR` | Who last updated the record | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=labels\&table_name_t6f0df=owner_details](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=labels\&table_name_t6f0df=owner_details) ## Example Query The following SQL query demonstrates how to retrieve basic information about entities categorized as 'Decentralized Exchange': ```sql theme={null} SELECT name, website, primary_category FROM labels.owner_details WHERE primary_category = 'Decentralized Exchange' ``` # safe.safes_all Source: https://docs.dune.com/data-catalog/curated/labels/safe-safes-all All Safe (formerly Gnosis Safe) multisig wallet addresses across supported chains, with creation version and creation time. The `safe.safes_all` table lists all deployed Safe multisig wallets across supported EVM chains. Each row represents a unique Safe contract with its creation metadata. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain on which the Safe is deployed | | `address` | `VARBINARY` | Safe contract address | | `creation_version` | `VARCHAR` | Initial Safe version during creation | | `block_date` | `DATE` | Date of Safe creation | | `creation_time` | `TIMESTAMP` | Datetime of Safe creation | | `tx_hash` | `VARBINARY` | Transaction hash of Safe creation | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=safe\&table_name_t6f0df=safes_all](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=safe\&table_name_t6f0df=safes_all) # lending.borrow Source: https://docs.dune.com/data-catalog/curated/lending/borrow DeFi borrowing events — borrows and repayments across major lending protocols with rates and collateral context. The `lending.borrow` table contains all borrow-side transactions across DeFi lending protocols — borrows, repayments, and borrow-side liquidations — across 15+ EVM chains. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain name | | `project` | `VARCHAR` | Lending protocol name | | `version` | `VARCHAR` | Protocol contract version | | `transaction_type` | `VARCHAR` | Transaction type (borrow, repay, liquidation) | | `loan_type` | `VARCHAR` | Type of loan | | `symbol` | `VARCHAR` | Token symbol | | `token_address` | `VARBINARY` | Token contract address | | `borrower` | `VARBINARY` | Borrower wallet address | | `on_behalf_of` | `VARBINARY` | Wallet address the tx was executed on behalf of | | `repayer` | `VARBINARY` | Repayer wallet address | | `liquidator` | `VARBINARY` | Liquidator wallet address | | `amount` | `DOUBLE` | Token amount in display units | | `amount_raw` | `UINT256` | Raw token amount | | `amount_usd` | `DOUBLE` | Token amount in USD | | `block_month` | `TIMESTAMP` | Block month (partition key) | | `block_time` | `TIMESTAMP` | Block timestamp in UTC | | `block_number` | `BIGINT` | Block number | | `project_contract_address` | `VARBINARY` | Protocol contract address | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `INTEGER` | Event index | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lending\&table_name_t6f0df=borrow](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lending\&table_name_t6f0df=borrow) ## Query performance Partition keys: `blockchain`, `project`, `block_month`. Always include `blockchain` and a time filter. ```sql theme={null} -- ✅ Good: filters on partition keys SELECT * FROM lending.borrow WHERE blockchain = 'ethereum' AND block_month >= DATE '2025-01-01' ``` # lending.flashloans Source: https://docs.dune.com/data-catalog/curated/lending/flashloans Flash loan executions across DeFi protocols — borrowed amounts, fees, and initiator details. The `lending.flashloans` table contains all flash loan transactions across DeFi lending protocols. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain name | | `project` | `VARCHAR` | Lending protocol name | | `version` | `VARCHAR` | Protocol contract version | | `token_address` | `VARBINARY` | Token contract address | | `symbol` | `VARCHAR` | Token symbol | | `recipient` | `VARBINARY` | Flashloan recipient address | | `amount` | `DOUBLE` | Token amount in display units | | `amount_raw` | `UINT256` | Raw token amount | | `amount_usd` | `DOUBLE` | Token amount in USD | | `fee` | `DOUBLE` | Flashloan fee amount | | `project_contract_address` | `VARBINARY` | Protocol contract address | | `block_month` | `TIMESTAMP` | Block month (partition key) | | `block_time` | `TIMESTAMP` | Block timestamp in UTC | | `block_number` | `BIGINT` | Block number | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `INTEGER` | Event index | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lending\&table_name_t6f0df=flashloans](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lending\&table_name_t6f0df=flashloans) ## Query performance Partition keys: `blockchain`, `project`. Always include `blockchain` in your filter. # lending.info Source: https://docs.dune.com/data-catalog/curated/lending/info DeFi lending market snapshots — supply rates, borrow rates, utilization, and total value locked by protocol and asset. The `lending.info` table provides static metadata about lending protocols, including display names, flash loan support, and social handles. ## Table Schema | Column | Type | Description | | - | - | - | | `project` | `VARCHAR` | Lending protocol codename | | `name` | `VARCHAR` | Lending protocol display name | | `has_flashloans` | `BOOLEAN` | Whether the protocol supports flashloans | | `x_username` | `VARCHAR` | Protocol's X (Twitter) username | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lending\&table_name_t6f0df=info](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lending\&table_name_t6f0df=info) # Lending Source: https://docs.dune.com/data-catalog/curated/lending/overview Curated DeFi lending datasets across 15+ EVM chains on Dune Dune's lending tables provide standardized data on DeFi lending protocol activity — supply (deposit/withdraw), borrow (borrow/repay/liquidation), and flash loans — across 15+ EVM chains. All major lending protocols are aggregated into a single schema. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~20 min · **Chains:** 15 EVM chains Explore this dataset on the [lending data page](https://dune.com/data/lending). > [card] [Get This Data](https://dune.com/enterprise?dataset=lending) > > Access lending data via API, Datashare, or the Dune App. ## Available Tables > [card] [lending.supply](/data-catalog/curated/lending/supply) > > All supply-side transactions: deposits, withdrawals, and supply-side liquidations > [card] [lending.borrow](/data-catalog/curated/lending/borrow) > > All borrow-side transactions: borrows, repayments, and borrow-side liquidations > [card] [lending.flashloans](/data-catalog/curated/lending/flashloans) > > All flash loan transactions across lending protocols > [card] [lending.info](/data-catalog/curated/lending/info) > > Static lookup of lending protocol metadata ## When to Use These Tables * Track supply and borrow volumes across DeFi lending protocols * Analyze liquidation events and at-risk positions * Monitor flash loan activity and fees * Compare lending protocol market share across chains * Build lending analytics dashboards for protocol teams or investors ## Coverage **Chains (15):** Arbitrum, Avalanche C-Chain, Base, BNB Chain, Celo, Ethereum, Fantom, Gnosis, Linea, Optimism, Polygon, Scroll, Sonic, zkSync, Unichain **Protocols:** Aggregated from all integrated lending protocols including Aave, Compound, and others. Use `SELECT DISTINCT project FROM lending.supply` for the current list. ## Query Performance **Partition keys:** * `lending.supply`: `blockchain`, `project`, `block_month` * `lending.borrow`: `blockchain`, `project`, `block_month` * `lending.flashloans`: `blockchain`, `project` Always include `blockchain` and `block_month` (or a `block_time` range) in your WHERE clause. ```sql theme={null} -- ✅ Good: filters on partition keys SELECT * FROM lending.supply WHERE blockchain = 'ethereum' AND block_month >= DATE '2025-01-01' AND project = 'aave' -- ❌ Slow: no partition filters SELECT * FROM lending.supply WHERE symbol = 'USDC' ``` ## Methodology Lending tables are maintained by Dune ([source code](https://github.com/duneanalytics/spellbook)). They aggregate data from protocol-specific base models (`lending_base_supply`, `lending_base_borrow`, `lending_base_flashloans`), which decode on-chain events from each protocol's smart contracts. Token amounts are decimal-adjusted and joined with Dune's price feeds (`prices.minute`, `prices.hour`, `prices.day`) for USD values. ## Example Queries **Daily supply volume by protocol on Ethereum:** ```sql theme={null} SELECT date_trunc('day', block_time) AS day, project, SUM(amount_usd) AS supply_volume_usd FROM lending.supply WHERE blockchain = 'ethereum' AND block_month >= DATE '2025-01-01' AND transaction_type = 'deposit' GROUP BY 1, 2 ORDER BY 1 DESC, 3 DESC ``` **Top borrowers by total USD borrowed (last 30 days):** ```sql theme={null} SELECT borrower, SUM(amount_usd) AS total_borrowed_usd, COUNT(*) AS num_borrows FROM lending.borrow WHERE blockchain = 'ethereum' AND block_time >= NOW() - INTERVAL '30' DAY AND transaction_type = 'borrow' GROUP BY 1 ORDER BY 2 DESC LIMIT 20 ``` **Flash loan volume by chain:** ```sql theme={null} SELECT blockchain, project, SUM(amount_usd) AS flashloan_volume_usd, COUNT(*) AS num_flashloans FROM lending.flashloans WHERE block_time >= NOW() - INTERVAL '7' DAY GROUP BY 1, 2 ORDER BY 3 DESC ``` ## Related Tables * `dex.flashloans` — Flash loans from DEX protocols (Balancer, Uniswap, dYdX) as opposed to lending-native flash loans * `prices.day` / `prices.hour` / `prices.minute` — Token price feeds * `tokens.erc20` — Token metadata (symbols, decimals) > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom lending datasets or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private lending analytics pipelines with the dbt Connector. # lending.supply Source: https://docs.dune.com/data-catalog/curated/lending/supply DeFi lending supply events — deposits and withdrawals across Aave, Compound, and other lending protocols. The `lending.supply` table contains all supply-side transactions across DeFi lending protocols — deposits, withdrawals, and supply-side liquidations — across 15+ EVM chains. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain name | | `project` | `VARCHAR` | Lending protocol name | | `version` | `VARCHAR` | Protocol contract version | | `transaction_type` | `VARCHAR` | Transaction type (deposit, withdraw, liquidation) | | `symbol` | `VARCHAR` | Token symbol | | `token_address` | `VARBINARY` | Token contract address | | `depositor` | `VARBINARY` | Depositor wallet address | | `on_behalf_of` | `VARBINARY` | Wallet address the tx was executed on behalf of | | `withdrawn_to` | `VARBINARY` | Withdrawal recipient address | | `liquidator` | `VARBINARY` | Liquidator wallet address | | `amount` | `DOUBLE` | Token amount in display units | | `amount_raw` | `UINT256` | Raw token amount | | `amount_usd` | `DOUBLE` | Token amount in USD | | `block_month` | `TIMESTAMP` | Block month (partition key) | | `block_time` | `TIMESTAMP` | Block timestamp in UTC | | `block_number` | `BIGINT` | Block number | | `project_contract_address` | `VARBINARY` | Protocol contract address | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `INTEGER` | Event index | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lending\&table_name_t6f0df=supply](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lending\&table_name_t6f0df=supply) ## Query performance Partition keys: `blockchain`, `project`, `block_month`. Always include `blockchain` and a time filter. ```sql theme={null} -- ✅ Good: filters on partition keys SELECT * FROM lending.supply WHERE blockchain = 'ethereum' AND block_month >= DATE '2025-01-01' ``` # NFT Metadata Source: https://docs.dune.com/data-catalog/curated/nft-trades/evm/nft-metadata Metadata for NFTs across EVM networks. The `tokens.nft` table contains metadata for NFTs across all EVM-compatible networks indexed on Dune. This dataset provides essential information about NFTs, including: * The blockchain on which the NFT exists * The contract address of the NFT * The name of the NFT collection * The symbol of the NFT collection * The standard used by the NFT (e.g., ERC721, ERC1155) ### Utility The NFT metadata table offers valuable information for NFT analysis and integration, allowing you to: * Identify NFT collections across different blockchains * Retrieve essential NFT information for calculations and display * Cross-reference NFT data with other tables like `tokens.nft_transfers` ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain on which the NFT exists | | `contract_address` | `VARBINARY` | Contract address of the NFT collection | | `name` | `VARCHAR` | Name of the NFT collection | | `symbol` | `VARCHAR` | Symbol of the NFT collection | | `standard` | `VARCHAR` | Token standard (ERC721, ERC1155) | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens\&table_name_t6f0df=nft](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens\&table_name_t6f0df=nft) ### Network Coverage NFT metadata is available for all EVM-compatible networks indexed by Dune. ## Sample Queries **Query NFT collections on a specific blockchain** This query returns NFT collections on the Ethereum blockchain: ```sql theme={null} SELECT contract_address, name, symbol, standard FROM tokens.nft WHERE blockchain = 'ethereum' LIMIT 100 ``` **Find NFTs with a specific standard across blockchains** This query finds all NFTs using the ERC721 standard across different blockchains: ```sql theme={null} SELECT blockchain, contract_address, name, symbol FROM tokens.nft WHERE standard = 'erc721' ``` **List NFT collections with a specific keyword in their name** This query lists NFT collections that have "Punk" in their name: ```sql theme={null} SELECT blockchain, contract_address, name, symbol, standard FROM tokens.nft WHERE name LIKE '%Punk%' ORDER BY blockchain, name LIMIT 50 ``` # nft.mints Source: https://docs.dune.com/data-catalog/curated/nft-trades/evm/nft-mints Dataset capturing NFT minting events across multiple blockchains, providing crucial insights into NFT creation and project launches. ## Table Description The `nft.mints` table captures Non-Fungible Token (NFT) minting events across various blockchain networks. It provides insights into project launches, artist activity, and the growth of NFT collections. > [!WARNING] > > This table is not well maintained and misses coverage on chains and projects. ## Usage The nft.mints table is a valuable tool for examining the NFT creation process. It offers detailed information about each NFT minting event, including data points such as the minting timestamp, the address of the minter, the contract address, and specifics about the minted NFT. This table enables analysts to explore trends in NFT creation, track the launch of new collections, and analyze patterns in minting behavior across different projects and blockchain networks. ## Coverage [https://dune.com/embeds/4009897/6750923](https://dune.com/embeds/4009897/6750923) ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain on which the mint occurred | | `project` | `VARCHAR` | NFT marketplace/project name | | `version` | `VARCHAR` | Contract version | | `block_date` | `DATE` | UTC event block date | | `block_month` | `DATE` | UTC event block month (partition key) | | `block_time` | `TIMESTAMP` | UTC event block time | | `token_id` | `UINT256` | NFT token ID | | `collection` | `VARCHAR` | NFT collection name | | `amount_usd` | `DOUBLE` | USD value at time of mint | | `token_standard` | `VARCHAR` | Token standard (ERC721, ERC1155) | | `trade_type` | `VARCHAR` | Single or multiple NFTs minted | | `number_of_items` | `UINT256` | Number of items minted | | `trade_category` | `VARCHAR` | Mint category (direct, auction, etc.) | | `evt_type` | `VARCHAR` | Event type (Mint) | | `seller` | `VARBINARY` | Seller/creator address | | `buyer` | `VARBINARY` | Minter/buyer address | | `amount_original` | `DOUBLE` | Amount in original currency | | `amount_raw` | `UINT256` | Raw amount before decimal adjustment | | `currency_symbol` | `VARCHAR` | Symbol of currency used for payment | | `currency_contract` | `VARBINARY` | Contract address of payment token | | `nft_contract_address` | `VARBINARY` | NFT contract address | | `project_contract_address` | `VARBINARY` | Marketplace contract address | | `aggregator_name` | `VARCHAR` | Aggregator name if applicable | | `aggregator_address` | `VARBINARY` | Aggregator contract address | | `tx_hash` | `VARBINARY` | Transaction hash | | `block_number` | `BIGINT` | Block number | | `tx_from` | `VARBINARY` | Address that initiated the transaction | | `tx_to` | `VARBINARY` | Address that received the transaction | | `evt_index` | `INTEGER` | Event index | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nft\&table_name_t6f0df=mints](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nft\&table_name_t6f0df=mints) # nft.trades Source: https://docs.dune.com/data-catalog/curated/nft-trades/evm/nft-trades NFT trade execution data across EVM chains — captures sales, bids, and listings across major marketplaces with pricing, buyer/seller details, and collection metadata ## Table Description The nft.trades table on Dune is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The nft.trades table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Coverage The `nft.trades` table is maintained by Dune and covers the following marketplaces and versions: [https://dune.com/embeds/3457808/5810746](https://dune.com/embeds/3457808/5810746) ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain on which the trade occurred | | `project` | `VARCHAR` | NFT marketplace name | | `version` | `VARCHAR` | Marketplace contract version | | `block_date` | `DATE` | UTC event block date | | `block_month` | `DATE` | UTC event block month (partition key) | | `block_time` | `TIMESTAMP` | UTC event block time | | `token_id` | `DOUBLE` | NFT token ID | | `collection` | `VARCHAR` | NFT collection name | | `amount_usd` | `DOUBLE` | USD value of the trade at time of execution | | `token_standard` | `VARCHAR` | Token standard (ERC721, ERC1155) | | `trade_type` | `VARCHAR` | Single or multiple NFTs traded | | `number_of_items` | `UINT256` | Number of items traded | | `trade_category` | `VARCHAR` | How the NFT was traded (direct buy, auction, etc.) | | `evt_type` | `VARCHAR` | Event type (Trade, Mint, Burn) | | `seller` | `VARBINARY` | Seller wallet address | | `buyer` | `VARBINARY` | Buyer wallet address | | `amount_original` | `DOUBLE` | Traded amount in original currency | | `amount_raw` | `UINT256` | Traded amount before decimals correction | | `currency_symbol` | `VARCHAR` | Symbol of currency used for payment | | `currency_contract` | `VARBINARY` | Contract address of payment token | | `nft_contract_address` | `VARBINARY` | NFT contract address | | `project_contract_address` | `VARBINARY` | Marketplace contract address | | `aggregator_name` | `VARCHAR` | Aggregator name if trade went through an aggregator | | `aggregator_address` | `VARBINARY` | Aggregator contract address | | `tx_hash` | `VARBINARY` | Transaction hash | | `block_number` | `BIGINT` | Block number | | `tx_from` | `VARBINARY` | Address that initiated the transaction | | `tx_to` | `VARBINARY` | Address that received the transaction | | `platform_fee_amount_raw` | `UINT256` | Raw platform fee amount | | `platform_fee_amount` | `DOUBLE` | Platform fee in original currency | | `platform_fee_amount_usd` | `DOUBLE` | Platform fee in USD | | `platform_fee_percentage` | `DOUBLE` | Platform fee as percentage of trade amount | | `royalty_fee_receive_address` | `VARBINARY` | Address receiving royalty fees | | `royalty_fee_currency_symbol` | `VARCHAR` | Symbol of the royalty fee currency | | `royalty_fee_amount_raw` | `UINT256` | Raw royalty fee amount | | `royalty_fee_amount` | `DOUBLE` | Royalty fee in original currency | | `royalty_fee_amount_usd` | `DOUBLE` | Royalty fee in USD | | `royalty_fee_percentage` | `DOUBLE` | Royalty fee as percentage of trade amount | | `unique_trade_id` | `VARCHAR` | Unique trade identifier | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nft\&table_name_t6f0df=trades](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nft\&table_name_t6f0df=trades) # NFT Transfers Source: https://docs.dune.com/data-catalog/curated/nft-trades/evm/nft-transfers NFT transfer events across EVM networks. The `nft.transfers` table contains NFT transfer events across ERC721 and ERC1155 tokens for all EVM-compatible networks indexed on Dune. This dataset encompasses: * Transfer events for ERC721 tokens * Transfer events for ERC1155 tokens > [!NOTE] > > This table covers all standard ERC-721 and ERC-1155 transfer events. Some NFTs may have non-standard transfer mechanisms and might not be included. > You can check the logic for the transfers table [here](https://github.com/duneanalytics/spellbook/tree/main/dbt_subprojects/hourly_spellbook/models/_sector/nft/transfers). The level of detail of the transfers table will vary by chain. ### Utility The NFT transfers table provides a comprehensive view of NFT movement across networks, enabling you to: * Track NFT flows between addresses * Analyze NFT transaction volumes and patterns * Identify significant NFT movements * Monitor NFT marketplace and protocol activity ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain on which the transfer occurred | | `block_time` | `TIMESTAMP` | UTC event block time | | `block_month` | `DATE` | UTC event block month (partition key) | | `block_date` | `DATE` | UTC event block date | | `block_number` | `BIGINT` | Block number | | `token_standard` | `VARCHAR` | Token standard (ERC721, ERC1155) | | `transfer_type` | `VARCHAR` | Single or batch transfer | | `evt_index` | `INTEGER` | Event index within the transaction | | `contract_address` | `VARBINARY` | NFT contract address | | `token_id` | `UINT256` | ID of the transferred token | | `amount` | `UINT256` | Number of tokens transferred | | `from` | `VARBINARY` | Sender address | | `to` | `VARBINARY` | Recipient address | | `executed_by` | `VARBINARY` | Address that executed the transaction | | `tx_hash` | `VARBINARY` | Transaction hash | | `unique_transfer_id` | `VARCHAR` | Unique transfer identifier | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nft\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nft\&table_name_t6f0df=transfers) ### Network Coverage NFT transfer data is available for the following EVM-compatible networks: [https://dune.com/embeds/3695907/6218008](https://dune.com/embeds/3695907/6218008) ## Sample Queries **Query recent NFT transfers for a specific address** This query returns the most recent NFT transfers (both incoming and outgoing) for a specified address: ```sql theme={null} SELECT block_time, token_standard, CASE WHEN "from" = {{address}} THEN 'Outgoing' WHEN "to" = {{address}} THEN 'Incoming' END AS direction, contract_address, token_id, amount FROM nft.transfers WHERE ("from" = {{address}} OR "to" = {{address}}) AND block_time > now() - interval '30' day ORDER BY block_time DESC LIMIT 100 ``` **Calculate daily transfer volume for a specific NFT contract** This query calculates the daily transfer volume for a specific NFT contract: ```sql theme={null} SELECT block_date, COUNT(*) AS num_transfers, SUM(amount) AS total_amount FROM nft.transfers WHERE contract_address = {{contract_address}} AND block_time > now() - interval '30' day AND blockchain = 'ethereum' GROUP BY 1 ORDER BY 1 DESC ``` **Identify most active NFT contracts in the last 24 hours** This query finds the most active NFT contracts by transfer count in the last 24 hours: ```sql theme={null} SELECT blockchain, contract_address, token_standard, COUNT(*) AS transfer_count FROM nft.transfers WHERE block_time > now() - interval '1' day GROUP BY 1, 2, 3 ORDER BY transfer_count DESC LIMIT 50 ``` # nft.wash_trades Source: https://docs.dune.com/data-catalog/curated/nft-trades/evm/nft-wash-trades Dataset for identifying and analyzing potential wash trading activities in NFT transactions across various marketplaces and blockchains ## Table Description The nft.wash_trades table on Dune is crucial for identifying and analyzing potential wash trading activities in Non-Fungible Token (NFT) transactions across various marketplaces. It provides insights into the authenticity of NFT trades and helps in understanding market manipulation within the NFT space. ## Usage The nft.wash_trades table serves as an essential tool for analyzing the integrity of NFT market activities. It offers a detailed view of each NFT transaction, including data points such as blockchain, project, buyer and seller addresses, and various filters to detect potential wash trades. This table allows analysts to identify suspicious trading patterns, assess the prevalence of wash trading in different NFT projects, and gain insights into the overall health and authenticity of the NFT market. ## Coverage The `nft.wash_trades` table is maintained by Dune and covers various blockchains and NFT projects, identifying potential wash trading activities using pattern-based detection. [https://dune.com/embeds/3457808/5810746](https://dune.com/embeds/3457808/5810746) ## Mechanism The nft.wash_trades table employs a multi-faceted approach to identify potential wash trades: 1. Basic Trade Information: Each entry includes details such as blockchain, project, NFT contract address, token ID, buyer, seller, and transaction specifics. 2. Funding Source Analysis: The table tracks the first funding sources for both buyers and sellers (buyer_first_funded_by, seller_first_funded_by) to identify potential connections between trading parties. 3. Wash Trade Filters: Several filters are applied to flag suspicious activities: * filter_1_same_buyer_seller: Identifies trades where the buyer and seller are the same. * filter_2_back_and_forth_trade: Detects repetitive trading between the same parties. * filter_3_bought_or_sold_3x: Flags NFTs that have been traded frequently in a short period. * filter_4_first_funded_by_same_wallet: Identifies trades where both parties were initially funded by the same wallet. * filter_5_flashloan: Detects trades potentially facilitated by flash loans. 4. Wash Trade Classification: The is_wash_trade column provides a final verdict on whether a trade is considered a wash trade based on the applied filters. This mechanism allows for a comprehensive analysis of NFT trades, helping to distinguish genuine market activity from potential manipulation. ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain on which the trade occurred | | `project` | `VARCHAR` | NFT marketplace name | | `version` | `VARCHAR` | Contract version | | `nft_contract_address` | `VARBINARY` | NFT contract address | | `token_id` | `DOUBLE` | NFT token ID | | `token_standard` | `VARCHAR` | Token standard (ERC721, ERC1155) | | `trade_category` | `VARCHAR` | How the NFT was traded | | `buyer` | `VARBINARY` | Buyer wallet address | | `seller` | `VARBINARY` | Seller wallet address | | `project_contract_address` | `VARBINARY` | Marketplace contract address | | `aggregator_name` | `VARCHAR` | Aggregator name if applicable | | `aggregator_address` | `VARBINARY` | Aggregator contract address | | `tx_from` | `VARBINARY` | Address that initiated the transaction | | `tx_to` | `VARBINARY` | Address that received the transaction | | `block_time` | `TIMESTAMP` | UTC event block time | | `block_date` | `DATE` | UTC event block date | | `block_number` | `BIGINT` | Block number | | `tx_hash` | `VARBINARY` | Transaction hash | | `unique_trade_id` | `VARCHAR` | Unique trade identifier | | `buyer_first_funded_by` | `VARBINARY` | Wallet that first funded the buyer in ETH | | `seller_first_funded_by` | `VARBINARY` | Wallet that first funded the seller in ETH | | `filter_1_same_buyer_seller` | `BOOLEAN` | Whether buyer and seller are the same address | | `filter_2_back_and_forth_trade` | `BOOLEAN` | Whether the NFT was traded back and forth between buyer and seller | | `filter_3_bought_or_sold_3x` | `BOOLEAN` | Whether the same NFT was bought 3+ times (excluding ERC1155) | | `filter_4_first_funded_by_same_wallet` | `BOOLEAN` | Whether the same wallet first funded both buyer and seller | | `filter_5_flashloan` | `BOOLEAN` | Whether the transaction included a flashloan | | `is_wash_trade` | `BOOLEAN` | Final verdict: true if any filter was triggered | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nft\&table_name_t6f0df=wash_trades](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nft\&table_name_t6f0df=wash_trades) # NFT Data Source: https://docs.dune.com/data-catalog/curated/nft-trades/overview Curated NFT market data across multiple blockchain networks Non-fungible tokens (NFTs) have emerged as a major force in the crypto ecosystem, enabling unique digital assets and collectibles. Dune provides comprehensive coverage of NFT market activity through curated tables that capture trades, mints, transfers, and metadata across both EVM and Solana networks. These datasets enable analysis of sales volumes, collection trends, minting patterns, and market dynamics across major NFT marketplaces and networks. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~1 hour · **Chains:** 12 chains (EVM + Solana) > [card] [Get This Data](https://dune.com/enterprise?dataset=nft.trades) > > Access NFT trading data via API, Datashare, or the Dune App. ## Cross-Chain NFT Coverage Our NFT data covers multiple blockchain ecosystems: * **EVM Networks**: Ethereum, BNB, Polygon, Arbitrum, Optimism, zkSync, Blast, Ronin, Nova, Abstract, Apechain * **Solana**: Comprehensive coverage of Solana NFT ecosystem and metadata ## Available Datasets ### EVM NFT Data > [card] [NFT Trades](/data-catalog/curated/nft-trades/evm/nft-trades) > > NFT sales across marketplaces like OpenSea, LooksRare, and more > [card] [NFT Mints](/data-catalog/curated/nft-trades/evm/nft-mints) > > Initial NFT creation and minting events > [card] [Wash Trades](/data-catalog/curated/nft-trades/evm/nft-wash-trades) > > Detected wash trading activity and suspicious patterns ### Solana NFT Data > [card] [NFT Transfers](/data-catalog/curated/nft-trades/solana/solana-nft-transfers) > > Transfer events for Solana NFTs across the network > [card] [NFT Metadata](/data-catalog/curated/nft-trades/solana/solana-nft-metadata) > > Comprehensive metadata for Solana NFTs including attributes and collections ## Key Features * **Multi-Chain Coverage**: Analyze NFT activity across EVM and Solana ecosystems * **Marketplace Integration**: Data from major NFT marketplaces and platforms * **Wash Trade Detection**: Identify suspicious trading patterns (EVM) * **Metadata Tracking**: Comprehensive NFT metadata and attributes * **Collection Analytics**: Track performance at the collection level * **Real-time Updates**: Data is updated continuously as new blocks are processed ## Sample Cross-Chain Analysis Compare NFT trading activity across different blockchain networks: ```sql theme={null} -- EVM NFT trades SELECT 'EVM' as ecosystem, blockchain, DATE_TRUNC('day', block_time) as date, COUNT(*) as num_trades, SUM(amount_usd) as volume_usd FROM nft.trades WHERE block_time >= NOW() - INTERVAL '30' day GROUP BY 1, 2, 3 UNION ALL -- Solana NFT transfers (as proxy for activity) SELECT 'Solana' as ecosystem, 'solana' as blockchain, DATE_TRUNC('day', block_time) as date, COUNT(*) as num_transfers, NULL as volume_usd FROM solana.nft_transfers WHERE block_time >= NOW() - INTERVAL '30' day GROUP BY 1, 2, 3 ORDER BY date DESC, volume_usd DESC NULLS LAST ``` ## When to Use These Tables * Analyze NFT sales volumes and trends across marketplaces * Track collection floor prices, minting activity, and holder distribution * Monitor wash trading and market manipulation patterns * Build marketplace performance benchmarks (OpenSea vs Blur vs others) * Research creator royalty flows and marketplace fee structures ## Query Performance **Partition keys for `nft.trades`:** `blockchain`, `project`, `block_month` Always include `blockchain` and a time filter for best performance. ```sql theme={null} -- ✅ Good: partition key filters SELECT * FROM nft.trades WHERE blockchain = 'ethereum' AND block_month >= DATE '2025-01-01' -- ❌ Slow: no partition filters SELECT * FROM nft.trades WHERE nft_contract_address = 0x... ``` ## Methodology NFT tables are maintained by Dune ([source code](https://github.com/duneanalytics/spellbook)). They aggregate data from marketplace-specific base models that decode trade events from each marketplace's smart contracts (OpenSea Seaport, Blur, LooksRare, etc.). Each trade is enriched with collection metadata, token pricing for payment tokens, and standardized trade type classification (buy, sell, offer accepted). ## Example Queries **Daily NFT volume by marketplace on Ethereum:** ```sql theme={null} SELECT date_trunc('day', block_time) AS day, project AS marketplace, SUM(amount_usd) AS volume_usd, COUNT(*) AS num_trades FROM nft.trades WHERE blockchain = 'ethereum' AND block_month >= DATE '2025-01-01' AND block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 ORDER BY 1 DESC, 3 DESC ``` **Top NFT collections by volume (last 7 days):** ```sql theme={null} SELECT nft_contract_address, collection, SUM(amount_usd) AS volume_usd, COUNT(*) AS num_sales FROM nft.trades WHERE blockchain = 'ethereum' AND block_time >= NOW() - INTERVAL '7' DAY GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 20 ``` ## Related Tables * `prices.day` / `prices.hour` — Token pricing for payment token USD values * `tokens.nft` — NFT collection metadata * `nft.mints` — NFT minting events (separate from secondary market trades) > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom NFT datasets or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private NFT analytics pipelines with the dbt Connector. # Solana NFT Metadata Source: https://docs.dune.com/data-catalog/curated/nft-trades/solana/solana-nft-metadata Metadata for non-fungible tokens (NFTs) on the Solana blockchain. The `tokens_solana.nft` table contains metadata for non-fungible tokens (NFTs) on the Solana blockchain indexed on Dune. This dataset provides essential information about Solana NFTs, including: * The NFT mint address and associated accounts * Token details such as name, symbol, and URI * Creator and collection information * Transaction details of the NFT creation ### Utility The Solana NFT metadata table offers valuable information for NFT analysis and integration, allowing you to: * Identify and track NFTs on the Solana blockchain * Retrieve essential NFT information for display and analysis * Access creator and collection data for comprehensive NFT insights ## Table Schema | Column | Type | Description | | - | - | - | | `account_mint` | `VARCHAR` | NFT mint address | | `token_name` | `VARCHAR` | NFT name | | `token_symbol` | `VARCHAR` | NFT symbol | | `token_uri` | `VARCHAR` | NFT metadata URI | | `token_standard` | `VARCHAR` | Token standard (e.g., NonFungible) | | `collection_mint` | `VARCHAR` | Collection mint address | | `verified_creator` | `VARCHAR` | Verified creator address | | `metadata_program` | `VARCHAR` | Program used for metadata | | `call_block_time` | `TIMESTAMP` | Block time of NFT creation | | `call_tx_signer` | `VARCHAR` | Transaction signer | | `call_tx_id` | `VARCHAR` | Transaction ID | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_solana\&table_name_t6f0df=nft](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_solana\&table_name_t6f0df=nft) ### Network Coverage This table covers NFT metadata for the Solana blockchain. ## Sample Queries **Query Solana NFTs** This query returns NFTs on the Solana blockchain: ```sql theme={null} SELECT account_mint, token_name, token_symbol, token_uri FROM tokens_solana.nft LIMIT 100 ``` **Find NFTs from a specific collection** This query finds all NFTs from a specific collection on Solana: ```sql theme={null} SELECT account_mint, token_name, token_symbol, token_uri FROM tokens_solana.nft WHERE collection_mint = 'your_collection_mint_address_here' LIMIT 50 ``` **List NFTs by a specific creator** This query lists NFTs created by a specific verified creator on Solana: ```sql theme={null} SELECT account_mint, token_name, token_symbol, token_uri, call_block_time FROM tokens_solana.nft WHERE verified_creator = 'your_creator_address_here' ORDER BY call_block_time DESC LIMIT 50 ``` # Solana NFT Transfers Source: https://docs.dune.com/data-catalog/curated/nft-trades/solana/solana-nft-transfers NFT transfer events on the Solana blockchain. The `tokens_solana.nft` table contains NFT transfer events for tokens on the Solana blockchain indexed on Dune. This dataset encompasses transfer events for various Solana NFT standards. > [!NOTE] > > This table covers all standard Solana NFT transfer events. Some Solana NFTs may have non-standard transfer mechanisms and might not be included. > You can check the logic for the transfers table [here](https://github.com/duneanalytics/spellbook/blob/main/dbt_subprojects/solana/models/tokens/solana/tokens_solana_nft.sql). ### Utility The Solana NFT transfers table provides a comprehensive view of NFT movement on the Solana network, enabling you to: * Track NFT flows between accounts * Analyze NFT transaction volumes and patterns * Identify significant NFT movements * Monitor NFT marketplace and protocol activity on Solana ## Table Schema | Column | Type | Description | | - | - | - | | `account_mint` | `VARCHAR` | NFT mint address | | `token_name` | `VARCHAR` | NFT name | | `token_symbol` | `VARCHAR` | NFT symbol | | `token_uri` | `VARCHAR` | NFT metadata URI | | `token_standard` | `VARCHAR` | Token standard | | `collection_mint` | `VARCHAR` | Collection mint address | | `verified_creator` | `VARCHAR` | Verified creator address | | `metadata_program` | `VARCHAR` | Program used for metadata | | `call_block_time` | `TIMESTAMP` | Block time of the transfer | | `call_tx_signer` | `VARCHAR` | Transaction signer | | `call_tx_id` | `VARCHAR` | Transaction ID | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_solana\&table_name_t6f0df=nft](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_solana\&table_name_t6f0df=nft) ## Sample Queries **Query recent NFT transfers for a specific account** This query returns the most recent NFT transfers for a specified account: ```sql theme={null} SELECT call_block_time, token_standard, account_mint, token_name, token_symbol, call_tx_signer FROM tokens_solana.nft WHERE call_tx_signer = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' AND call_block_time > now() - interval '30' day ORDER BY call_block_time DESC LIMIT 100 ``` # Curated Data Overview Source: https://docs.dune.com/data-catalog/curated/overview Pre-built, cross-chain datasets maintained by Dune — the fastest path from raw blockchain data to production analytics. Dune's curated data tables are pre-built, validated datasets that normalize data from hundreds of protocols across dozens of chains into consistent schemas. Built and maintained by Dune's data team, they are production-ready for analytics, applications, and data pipelines. For example, the `dex.trades` table aggregates data from multiple sources to provide a comprehensive view of all trades on decentralized exchanges across EVM networks, while `dex_solana.trades` provides similar coverage for Solana DEXs. ## Getting Started You can access curated data tables in several ways: > [card] [Data Hub](https://dune.com) > > Browse curated tables in the Data Hub within the Dune App. Use the data explorer to search tables, preview schemas, and see sample data. > [card] [Data Hub](https://dune.com) > > Write SQL queries against any curated table directly in the Data Hub — no infrastructure needed. > [card] [Data API](/api-reference/overview/introduction) > > Access query results programmatically via the Dune API for application integrations and data pipelines. > [card] [Datashare](/datashare/datashare) > > Access curated tables directly in your own Snowflake, BigQuery, or Databricks environment via Datashare. ## Benefits of Curated Data Tables * **Simplified Queries**: High-level views that abstract away raw data complexity. * **Cross-Chain Analysis**: Consistent data models enable easy comparison between different blockchain networks. * **Validated and Tested**: Automated tests on key columns, run whenever a dataset's code changes. * **Transparent Methodology**: Every dataset documents how it's built, design decisions, and limitations. ## Cross-Chain Coverage Our curated data covers multiple blockchain ecosystems: * **EVM Networks**: Ethereum, Arbitrum, Polygon, Base, Optimism, and 55+ other EVM chains * **Solana**: Comprehensive coverage of Solana DeFi and NFT ecosystems * **Non-EVM**: Bitcoin, Aptos, Sui, TON, Tron, and others for pricing and select datasets Here is a non-exhaustive list of some of the curated data tables available: [https://dune.com/embeds/3708634/6239879](https://dune.com/embeds/3708634/6239879) ## Available Categories > [card] [DEX Trades](/data-catalog/curated/dex-trades/overview) > > Comprehensive DEX trading data across EVM and Solana networks > [card] [Prediction Markets](/data-catalog/curated/prediction-markets/overview) > > Polymarket and Kalshi market activity, positions, and pricing > [card] [Perpetuals Trading](/data-catalog/curated/perpetuals/overview) > > Hyperliquid perpetual futures — trades, market metrics, positions, account activity, and order book snapshots > [card] [NFT Trades](/data-catalog/curated/nft-trades/overview) > > NFT trading, minting, and metadata across multiple blockchains > [card] [Token Transfers](/data-catalog/curated/token-transfers/overview) > > Token transfers and balances across EVM and Solana > [card] [Address Labels](/data-catalog/curated/labels/overview) > > Identify and categorize blockchain addresses > [card] [Token Prices](/data-catalog/curated/prices/overview) > > Historical and real-time token pricing data > [card] [Balances](/data-catalog/curated/balances/overview) > > Current and historical token balances by address > [card] [Token Metadata](/data-catalog/curated/token-metadata/overview) > > Token names, symbols, decimals, and contract addresses > [card] [Stablecoins](/data-catalog/curated/stablecoins/overview) > > Stablecoin transfers, balances, and activity classification across EVM, Solana, Tron, and XRPL > [card] [Lending](/data-catalog/curated/lending/overview) > > DeFi lending protocol data — supply, borrow, flash loans, and liquidations across 15+ chains > [card] [Bridges](/data-catalog/curated/bridges/overview) > > Cross-chain bridge transfers — deposits, withdrawals, and matched flows across 41 EVM chains > [card] [Staking](/data-catalog/curated/staking/overview) > > Ethereum beacon chain staking — deposits, withdrawals, and entity identification > [card] [CEX Flows](/data-catalog/curated/cex-flows/overview) > > Centralized exchange inflows and outflows across 29 chains > [card] [Gas & Fees](/data-catalog/curated/gas-fees/overview) > > Transaction-level fee data across 55+ EVM chains and Solana > [card] [Rollup Economics](/data-catalog/curated/rollup-economics/overview) > > L2 rollup profitability — revenue vs L1 posting costs > [card] [Utilities](/data-catalog/curated/utilities/overview) > > Time-series scaffolding tables for building continuous analytics ## Resources > [card] [Open-Source Models](https://github.com/duneanalytics/spellbook) > > All curated data models are open-source — inspect the logic, contribute improvements, or build on top. > [card] [Model Documentation](https://github.com/duneanalytics/spellbook) > > Browse model definitions, dependencies, and documentation for every curated table. > [card] [Contributing Guide](https://github.com/duneanalytics/spellbook/tree/main/docs) > > Learn how to contribute new models or improve existing ones. > [card] [Adding Protocol Coverage](https://github.com/duneanalytics/spellbook/blob/main/dbt_subprojects/dex/README.md) > > Add your protocol's data to curated tables like dex.trades and nft.trades. # Agentic Payments Source: https://docs.dune.com/data-catalog/curated/payments/agentic-payments Machine-to-machine onchain payment activity across open HTTP 402 payment standards — x402 and MPP (onchain Tempo rails only). The `payments.agentic_payments` table captures machine-to-machine onchain payment activity settled through open payment standards built on HTTP 402. The dataset covers two protocols: * **x402** — an onchain-native payment standard. Payment settlement is fully trackable onchain via facilitator infrastructure. * **MPP (Machine Payments Protocol)** — supports both onchain and offchain payment methods; this dataset tracks only its onchain Tempo rails: Tempo Charge (one-time onchain payments) and Tempo Session (onchain escrow and settlement, with offchain usage metering between onchain events). Each row represents one onchain payment settlement — order creation, authorization, and intermediate protocol events that do not themselves settle onchain are excluded. Agentic payments feed into `payments.commerce_flows` as a Tier A (label-based) source, classified as `party_pair = b2b`, `purpose = commerce`, `confidence = high`. ## Why this dataset matters Agentic payments let AI agents and automated services pay each other onchain without human involvement. Tracking them separately makes it possible to: * Measure the scale and growth of machine-to-machine payment activity. * Attribute stablecoin transfers to specific agentic protocols (x402, MPP). * Compare protocol adoption across chains and over time. ## Coverage **Protocols:** x402, MPP (onchain Tempo rails only). **Chains:** Base, Polygon, and Solana (x402); Tempo (MPP). **Tokens:** Not restricted to stablecoins — x402 rows can include EIP-3009 tokens (e.g. USDC, EURC), other ERC-20 tokens, and classic SPL token transfers on Solana. `settlement_pattern` is currently enriched only for decoded USDC EIP-3009 transfers on EVM; Permit2 and Solana settlement decoding are future phases. Native SOL and Token-2022 are not covered yet (excluded follow-ups). **x402 facilitators** are tracked via `facilitator_name`. New facilitators are added as they appear onchain. ## How detection works Detection is protocol-specific: * **x402** is identified via known facilitator addresses and transfer patterns. On EVM, `settlement_pattern` is `transferWithAuthorization` when the transfer matches a decoded USDC EIP-3009 call, and `NULL` otherwise. Solana `settlement_pattern` is `NULL` in v1; Permit2 and Solana settlement decoding are future phases. * **MPP** is identified via known Tempo payment infrastructure and decoded charge and session settlement patterns, captured in `settlement_pattern`: `charge` (per-request onchain payments) or `session` (onchain escrow / channel open / settle / close, with offchain usage metering in between). Each row is linked to the underlying token transfer via `transfer_unique_key`, enabling downstream reuse in broader payments or stablecoin datasets. ## Table schema Address columns are cast to `varchar` at the top level so that EVM (`varbinary`) and Solana addresses share a common type across the unioned schema. | Column | Type | Description | | - | - | - | | `blockchain` | varchar | Chain name | | `transfer_unique_key` | varchar | Unique transfer identifier; join key back to upstream stablecoin transfer tables | | `block_month` | date | Block month (partition key) | | `block_date` | date | Block date | | `block_time` | timestamp | Block timestamp | | `tx_hash` | varchar | Transaction hash | | `transfer_evt_index` | bigint | Event index of the underlying token transfer | | `activity_evt_index` | bigint | Event index of the protocol activity event; `NULL` where not applicable | | `token_address` | varchar | Token contract address | | `token_symbol` | varchar | Token symbol, e.g. `USDC`, `USDT` | | `sender` | varchar | Raw transfer sender address | | `sender_label` | varchar | Role label for the sender: `payer` or `escrow_contract` | | `receiver` | varchar | Raw transfer receiver address | | `receiver_label` | varchar | Role label for the receiver: `recipient` | | `amount` | double | Normalized token amount | | `amount_usd` | double | USD value at block time | | `amount_raw` | uint256 | Raw token amount | | `tx_type` | varchar | Transaction type: `agentic_payment` (direct payment) or `agentic_fee` (protocol fee leg) | | `payment_protocol` | varchar | Protocol name: `x402` or `mpp` | | `payer` | varchar | Semantic payer address (may differ from `sender` for facilitated flows) | | `recipient` | varchar | Semantic recipient / service provider address | | `facilitator_address` | varchar | Facilitator contract or infrastructure address (where applicable) | | `facilitator_name` | varchar | Name of the facilitator (e.g. Coinbase, payAI) | | `settlement_pattern` | varchar | MPP settlement subtype: `charge` (per-request) or `session` (escrow-based); `NULL` for x402 | | `escrow_contract` | varchar | Escrow or channel contract address for MPP `session` payments; `NULL` otherwise | | `protocol_infra_address` | varchar | Protocol infrastructure contract address | ## Sample query ### Daily x402 agentic payment volume by facilitator Distinct payer / recipient counts highlight the machine-to-machine shape — agentic payments cluster on small tickets across many fresh counterparty pairs. ```sql theme={null} SELECT block_date, facilitator_name, COUNT(*) AS payment_count, SUM(amount_usd) AS volume_usd, APPROX_DISTINCT(payer) AS distinct_payers, APPROX_DISTINCT(recipient) AS distinct_recipients FROM payments.agentic_payments WHERE block_date >= CURRENT_DATE - INTERVAL '14' day AND payment_protocol = 'x402' AND tx_type = 'agentic_payment' GROUP BY 1, 2 ORDER BY block_date DESC, volume_usd DESC ``` ## References * [x402 protocol spec](https://x402.org) * [MPP protocol spec](https://mpp.dev/protocol) * [Tempo docs](https://docs.tempo.xyz) # Card Transactions Source: https://docs.dune.com/data-catalog/curated/payments/card-transactions Unified crypto card activity across issuers, card programs, and chains — card spend, merchant settlement, and top-ups normalised into a shared schema. The `payments.card_transactions` table unifies observable onchain card flows across supported issuers, card programs, and chains into a single schema. It focuses on user-generated activity and counts each card transaction exactly once — picking the best observable event per flow (`card spend`, `top-up`, or `settlement`) so volume is never double-counted across the top-up → settlement hop. The dataset is one of the upstream sources for `payments.commerce_flows`, where card transactions are classified as `party_pair = c2b`, `purpose = commerce`, `confidence = high`, `protocol = card_provider`. ## Why this dataset matters Crypto debit and credit cards are a large, measurable payment surface onchain — real consumer spend you can watch settle in stablecoins. Normalising activity across providers into a single table makes it possible to: * Measure real card spend volume without double-counting across settlement hops. * Compare adoption and volume across card issuers and card programs. * Attribute stablecoin transfers to card payment context in downstream analytics. ## Coverage **Chains:** EVM chains, Solana, Starknet, and Tron. **Tokens:** Not restricted to stablecoins — each row carries `source_asset_type` (`stablecoin`, `volatile_asset`, or `NULL`), so flows funded from volatile assets are included and can be filtered. `NULL` is a third, deliberate state: Blast and Starknet emit it because stablecoin-reference coverage isn't available there yet, so account for it when filtering rather than assuming every row is one of the two typed values. **Issuers / card programs:** Crypto debit and credit card providers whose settlement activity is observable onchain. The `card_provider` is the user-facing card program — the brand the user signs up and holds the card with. The `card_issuer` is the regulated entity or issuing infrastructure that puts the card on the network and settles the funds. The same company can play both roles (e.g. Gnosis Pay). * **Card programs (`card_provider`):** Cypher, Etherfi, Exa, Gnosis Pay, Holyheld, Ready, Redotpay, Safepal. * **Issuers / infrastructure (`card_issuer`):** Fiat24, Gnosis Pay, Holyheld, Immersve, Kulipa, PIX, Rain, Reap, StraitsX, Wirex. * **Card networks (`network`):** Visa, Mastercard. ## What transactions do we track? Detection logic is provider-specific — each issuer or card program exposes a different set of onchain signals, so individual provider models handle address and contract identification and event classification before normalising into the shared schema. The data contains a `tx_type` field so you know exactly what each row represents: | tx_type | Meaning | | - | - | | `card_spend` | Direct card spend event | | `card_top_up` | User funding a card balance | | `batch_settlement` | Batched settlement from custodial wallet to merchant | Which of these events is observable differs by card program — some expose direct spend, others only the batched settlement leg or the top-up. Top-ups fund a card balance rather than record a purchase, so spend-focused analyses typically exclude them by filtering on `tx_type`, as in the sample query below. ## Table schema Address columns are cast to `varchar` at the top level so that EVM (`varbinary`), Solana, and Tron addresses share a common type across the unioned schema. | Column | Type | Description | | - | - | - | | `blockchain` | varchar | Chain name | | `transfer_unique_key` | varchar | Unique transfer identifier; join key back to upstream stablecoin transfer tables | | `block_month` | date | Block month (partition key) | | `block_date` | date | Block date | | `block_time` | timestamp | Block timestamp | | `tx_hash` | varchar | Transaction hash | | `transfer_evt_index` | bigint | Event index of the underlying token transfer | | `activity_evt_index` | integer | Event index of the card activity event; `NULL` where not applicable | | `token_address` | varchar | Token contract address | | `token_symbol` | varchar | Token symbol, e.g. `USDC`, `USDT` | | `sender` | varchar | Transfer sender address | | `sender_label` | varchar | Role label for the sender: `user_wallet`, `custodial_deposit_address`, or `defi_pool` | | `receiver` | varchar | Transfer receiver address | | `receiver_label` | varchar | Role label for the receiver: `payment_collector` or `custodial_deposit_address` | | `amount` | double | Normalized token amount | | `amount_usd` | double | USD value at block time | | `amount_raw` | uint256 | Raw token amount | | `tx_type` | varchar | Card event type: `card_spend` (direct spend), `card_top_up` (user funding), or `batch_settlement` (custodial wallet to merchant) | | `network` | varchar | Card payment network (e.g. `Visa`, `Mastercard`) | | `card_issuer` | varchar | Regulated entity or issuing infrastructure that puts the card on the network and settles the funds (e.g. Rain, StraitsX, Fiat24, Kulipa) | | `card_provider` | varchar | User-facing card program operating the card (e.g. Gnosis Pay, Redotpay, Etherfi) | | `mode` | varchar | Payment mode or transaction subtype; values vary by provider (e.g. `pay_now`, `pay_later`, `liquidation`); `NULL` for providers that do not expose this field | | `user_address` | varchar | End user's wallet address; may differ from `sender` for custodial flows | | `project_version` | varchar | Version of the matched protocol or project | | `project_address` | varchar | Contract or project address matched | | `source_asset_type` | varchar | Type of source asset: `stablecoin`, `volatile_asset`, or `NULL` (unclassified — e.g. Blast, Starknet, where stablecoin-reference coverage is unavailable) | ## Composability Because every row is at the transfer level and carries the end-user wallet (`user_address`) plus a `transfer_unique_key` back to the canonical token transfer, card activity composes with the rest of Dune. Join `user_address` out to other tables to answer questions cards alone can't: * **Where do users get funded from?** Join to `tokens_evm.transfers` on inbound transfers to `user_address` to see which exchanges, on-ramps, or wallets top them up. * **What else do they do onchain?** Join to `dex.trades` (and other protocol tables) to see which DEXs and protocols card users interact with. * **How else do they use stablecoins?** Join to `stablecoins_evm.activity_enriched` on `from_address` / `to_address` to see a card user's full stablecoin footprint — CEX, DeFi, bridging, and payments — broken down by `category`. ## Sample query ### Card spend volume by provider ```sql theme={null} SELECT card_provider, network, SUM(amount_usd) AS volume_usd, COUNT(*) AS tx_count, COUNT(DISTINCT user_address) AS unique_users FROM payments.card_transactions WHERE tx_type IN ('card_spend', 'batch_settlement') -- excludes card top-ups GROUP BY 1, 2 ORDER BY 3 DESC ``` ### Which DEXs do crypto card users trade on? ```sql theme={null} WITH card_users AS ( SELECT DISTINCT blockchain, from_hex(substr(user_address, 3)) AS wallet -- 0x varchar → varbinary FROM payments.card_transactions WHERE user_address LIKE '0x%' ) SELECT t.project AS dex, COUNT(*) AS trades, COUNT(DISTINCT t.taker) AS card_users, SUM(t.amount_usd) AS volume_usd FROM dex.trades t JOIN card_users u ON u.wallet = t.taker AND u.blockchain = t.blockchain WHERE t.block_date >= NOW() - INTERVAL '30' DAY GROUP BY 1 ORDER BY volume_usd DESC ``` # Commerce Flows Source: https://docs.dune.com/data-catalog/curated/payments/commerce-flows Classified stablecoin transfers for real commerce-related onchain activity — B2B, B2C, and C2B flows identified via protocol matches and behavioural heuristics across EVM chains, Tron, and Solana. Not every stablecoin transfer is a payment. `payments.commerce_flows` is a transfer-level dataset that identifies the ones that are — every transfer that is a legitimate commerce transaction, tagged with its flow type (`party_pair`, `purpose`), a `confidence` level, and the `protocol` where one is known. The table is intentionally conservative: transfers that don't match a rule are **excluded**, not bucketed as "unclear". It is not a universal stablecoin classifier and does not try to label everything. Commerce Flows feeds back into the stablecoins dataset — payments are a sub-category of stablecoin activity. Matched transfers have their `category` updated from `unidentified` to `payment` in [`stablecoins_evm.activity_enriched`](/data-catalog/curated/stablecoins/activity-enriched/stablecoins-evm-activity-enriched). ## Why this dataset matters Most stablecoin volume is not payments — it is trading, bridging, and treasury movement. Commerce Flows isolates the slice that is genuine commercial settlement, attaching an explicit rule and a confidence level to every row. It makes it possible to: * Measure onchain commerce volume by flow type (B2B, C2B, B2C) and protocol. * Separate protocol-verified settlement (Tier A) from behavioural inference (Tier B). * Label stablecoin transfers as payment-related for downstream analytics. ## Coverage **Chains:** EVM chains, Tron, and Solana. Solana coverage is label-based (Tier A) only. **Tokens:** Stablecoins only — the dataset classifies transfers from the upstream stablecoin transfer tables. Unlike [`payments.card_transactions`](/data-catalog/curated/payments/card-transactions) and [`payments.agentic_payments`](/data-catalog/curated/payments/agentic-payments), which are not restricted to stablecoins, non-stablecoin settlement does not appear here. **Protocol-verified sources (Tier A):** * Crypto cards — sourced from [`payments.card_transactions`](/data-catalog/curated/payments/card-transactions). * Agentic payments (x402 / MPP) — sourced from [`payments.agentic_payments`](/data-catalog/curated/payments/agentic-payments). * Stripe, Shopify Commerce Payments Protocol, Coinbase Commerce, Request Network, and stablecoin payment processors (e.g. BVNK). **Behavioural flows (Tier B):** B2C payroll-style distributions, C2B merchant aggregation, and recurring B2B commerce. ## Output taxonomy | Party pair | Purpose | Meaning | | - | - | - | | B2B | Commerce | Business pays business for goods or services. | | C2B | Commerce | Consumer pays a merchant or service (checkout, subscriptions where detectable). | | B2C | Payroll | Recurring business-to-many-individuals payouts. | Some reports group these flows by audience instead. The audiences overlap on the raw taxonomy — agentic settlement is itself a B2B row — so apply them in precedence order to keep each row in exactly one bucket: `agents` first (B2B rows with `heuristic_id = 'agentic_payments'`, in full protocol detail in [`payments.agentic_payments`](/data-catalog/curated/payments/agentic-payments)); then `businesses` for the remaining B2B; and `retail` for the consumer-facing pairs (C2B and B2C). ## Methodology The pipeline runs in ordered stages: a **strict exclusion layer** removes non-commerce and non-final activity, then **Tier A** captures protocol-explicit matches (`confidence = high`), and finally **Tier B** applies a small set of high-signal behavioural heuristics to the residual (`confidence = medium`). Each transfer maps to **one** output row, and Tier A always takes precedence over Tier B. ### 1. Exclusion layer Fires before any classification. A transfer matching any rule is dropped from the eligible universe. * **Via upstream stablecoin labels:** issuer mechanics (mint / burn), bridge and wrap infrastructure, CEX legs, DEX / AMM / routing, and DeFi vaults / lending / yield. * **Via behavioural shape:** same-entity / self-transfers, round-trip and reverse transfers (treasury reshuffling, wash patterns), A→B→C pass-through routing (avoids double-counting intermediary legs), high-frequency bot wallets, and large one-off treasury repositioning. > [!NOTE] > > **Eligibility settles 24 hours after block time.** Round-trip and reverse-transfer detection looks 24 hours forward, so a transfer's eligibility is not final until 24 hours after its block time. Rows older than 24 hours are stable; only the most recent 24 hours can still change as later reverse legs land. This keeps both legs of a round trip out of the dataset, at the cost of a short settling window on the leading edge. ### 2. Wallet classification Each address is typed from its full transaction history, with a `wallet_balance_tier` derived from its rolling 30-day average USD balance. | Wallet type | Balance tiers | Profile | | - | - | - | | Consumer | dust (under $100), micro ($100–$1K), small ($1K–\$10K) | Retail-sized transfers, low counterparty diversity | | Business | medium ($10K–$100K) | Recurring inflows from many senders, or outflows to many receivers | | Institutional | large ($100K–$1M), whale (over \$1M) | High-value counterparties, treasury / corporate flow shapes | | Unclassified | any | Average balance under \$10 or sparse history — excluded from classified output | ### 3. B2B commerce | Tier | Detector | What it captures | | - | - | - | | A (labels) | Agentic payments | Agent-to-agent settlement (x402 / MPP), from [`payments.agentic_payments`](/data-catalog/curated/payments/agentic-payments). | | A (labels) | Processor deposits | Stablecoin payment-processor settlement legs (e.g. BVNK). | | B (behavioural) | Recurring B2B | Business / institutional sender → receiver, ticket ≥ \$2K, directional, low recurrence. | ### 4. B2C payroll | Tier | Detector | What it captures | | - | - | - | | A (labels) | Request Network | Protocol-mediated payouts through Request payment proxies. | | B (behavioural) | Payroll batch | Business-tier sender distributing to ≥5 recipients on a regular cadence, mid-size tickets, no return flow. | ### 5. C2B commerce | Tier | Detector | What it captures | | - | - | - | | A (labels) | Crypto cards | Card purchase settlements, from [`payments.card_transactions`](/data-catalog/curated/payments/card-transactions). | | A (labels) | Stripe | Stablecoin checkout settlement into the Stripe MerchantFactory contract. | | A (labels) | Shopify CPP | Final settlement legs of the Shopify Commerce Payments Protocol (captures / charges only). | | A (labels) | Coinbase Commerce | Final settlement into the merchant / operator. | | B (behavioural) | Merchant aggregation | Merchant-like receiver aggregating many payers, then settling out to 1–2 wallets. | ## Table schema Each row is one classified stablecoin transfer. Non-applicable fields are `NULL`. Every row carries `tx_hash` + `transfer_evt_index` + `transfer_unique_key` to join back to the upstream stablecoin transfer. | Column | Type | Description | | - | - | - | | `blockchain` | varchar | Chain name | | `block_month` | date | Block month (partition key) | | `block_date` | date | Block date | | `block_time` | timestamp | Block timestamp | | `tx_hash` | varbinary | Transaction hash of the classified transfer | | `activity_evt_index` | bigint | Event index of the protocol anchor event for Tier A matches; `NULL` for Tier B | | `transfer_evt_index` | bigint | Event index of the underlying token transfer | | `transfer_unique_key` | varchar | Unique transfer identifier; merge key and join key back to upstream | | `token_address` | varbinary | Token contract address | | `token_symbol` | varchar | Token symbol, e.g. `USDC`, `USDT` | | `amount_raw` | uint256 | Raw token amount | | `amount` | double | Normalized token amount | | `amount_usd` | double | USD value at block time | | `sender` | varbinary | Raw transfer sender | | `receiver` | varbinary | Raw transfer receiver | | `payment_uuid` | varchar | Identifier grouping the legs of a single payment; populated only where a multi-leg payment can be reconstructed, `NULL` otherwise | | `sender_wallet_type` | varchar | `consumer`, `business`, `institutional`, or `unclassified` | | `sender_wallet_balance_tier` | varchar | `dust` (under $100), `micro` ($100–$1K), `small` ($1K–$10K), `medium` ($10K–$100K), `large` ($100K–$1M), `whale` (over $1M) | | `receiver_wallet_type` | varchar | Same vocabulary as `sender_wallet_type` | | `receiver_wallet_balance_tier` | varchar | Same vocabulary as `sender_wallet_balance_tier` | | `party_pair` | varchar | `b2b`, `c2b`, or `b2c` | | `purpose` | varchar | `commerce` or `payroll` | | `heuristic_type` | varchar | `labels_based` (Tier A) or `activity_based` (Tier B) | | `heuristic_id` | varchar | Specific rule that matched, e.g. `crypto_card`, `stripe`, `shopify_cpp`, `coinbase_commerce`, `request_network`, `agentic_payments`, `b2b_processor_deposits`, `c2b_commerce_h3_aggregation`, `b2c_payroll_h1_batch`, `b2b_commerce_h_recurring` | | `confidence` | varchar | `high` (Tier A) or `medium` (Tier B) | | `protocol` | varchar | Protocol or provider for Tier A matches (e.g. `x402`, `stripe`, `shopify_base_cpp`, `coinbase_commerce`, `request_network`, or the card brand for crypto cards); `NULL` for Tier B | | `dataset_version` | varchar | Methodology version; bumped when classification logic changes | | `_updated_at` | timestamp | Pipeline load time (when the row was last written) | ## Sample queries ### Commerce flow volume by party pair and purpose ```sql theme={null} SELECT party_pair, purpose, heuristic_type, SUM(amount_usd) AS volume_usd, COUNT(*) AS tx_count, COUNT(DISTINCT sender) AS unique_senders FROM payments.commerce_flows WHERE block_date >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2, 3 ORDER BY 4 DESC ``` ### Protocol-verified flows only ```sql theme={null} SELECT protocol, blockchain, SUM(amount_usd) AS volume_usd, COUNT(*) AS tx_count FROM payments.commerce_flows WHERE confidence = 'high' AND block_date >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 ORDER BY 3 DESC ``` ## Related tables * [`payments.card_transactions`](/data-catalog/curated/payments/card-transactions) — Tier A source for crypto card matches. * [`payments.agentic_payments`](/data-catalog/curated/payments/agentic-payments) — Tier A source for x402 and MPP matches. * [`stablecoins_evm.activity_enriched`](/data-catalog/curated/stablecoins/activity-enriched/stablecoins-evm-activity-enriched) — downstream consumer; exposes `category = 'payment'` for matched transfers. # Payments Source: https://docs.dune.com/data-catalog/curated/payments/overview Curated datasets for exploring real onchain payment activity across card payments, agentic payments, and commerce flows. Cut through transfer noise to see real onchain payments. These curated datasets work at the transfer level — one row per onchain transfer — isolating genuine payment activity from generic stablecoin movement across three surfaces: crypto card spend, agentic (machine-to-machine) payments, and classified commerce flows. Commerce Flows is restricted to stablecoin transfers; Card Transactions and Agentic Payments also track non-stablecoin settlement. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** Daily · **Chains:** EVM chains (Ethereum, Base, Arbitrum, Optimism, Polygon, BNB, and others); Solana and Tron for select tables > [!NOTE] > > 🔒 **Gated dataset.** The Payments collection — `payments.card_transactions`, `payments.agentic_payments`, and `payments.commerce_flows` — is Gated and requires an entitlement on your Dune workspace to query. See the [access tiers overview](/data-catalog/overview#access-tiers-public-vs-gated-datasets) or [contact the Dune team](https://dune.com/enterprise#contact-form) to enable access. > [card] [Explore Payments on Dune](https://dune.com/data/payments) > > Access Payments data via the Dune app, API, or Datashare. For payment-rail workflows, see [solutions for payment rails](https://dune.com/solutions/payment-rails). ## Available Datasets > [card] [Card Transactions](/data-catalog/curated/payments/card-transactions) > > Unified crypto card activity across issuers, card programs, and chains — card spend, merchant settlement, and top-ups normalised into a shared schema. > [card] [Agentic Payments](/data-catalog/curated/payments/agentic-payments) > > Machine-to-machine onchain payment activity across open HTTP 402 payment standards — x402 and MPP (onchain Tempo rails only). > [card] [Commerce Flows](/data-catalog/curated/payments/commerce-flows) > > Classified stablecoin transfers for real commerce-related onchain activity — B2B, B2C, and C2B flows identified via protocol matches and behavioural heuristics on EVM chains. ## Key Features * **Single-count economic payment:** one row per observable onchain payment event, with provider- or protocol-specific detection logic normalised into a shared output schema. * **Layered confidence:** every row carries a `confidence` field (`high` for protocol-explicit matches, `medium` for behavioural heuristics) and a `heuristic_id` so analysts know exactly which rule fired. * **Composable, transfer-level data:** every row sits at the transfer level — linked to the underlying token transfer via `transfer_unique_key` and tagged with the end-user wallet — so payments join cleanly to the rest of Dune. Trace where users get funded from (`tokens_evm.transfers`), what DEXs and protocols they interact with (`dex.trades`), and into stablecoin analytics pipelines. * **Stable cross-rail schema:** provider- and protocol-specific fields are populated where available and `NULL` elsewhere — the unioned schema is stable across rails. ## When to Use These Tables * Measuring onchain payment volume by network, provider, protocol, or chain. * Comparing adoption across payment rails (card payments vs agentic payments vs commerce flows). * Calculating the share of total onchain payments represented by a given rail or protocol. * Labelling stablecoin transfers as payment-related for downstream analytics. ## Methodology Each dataset is built in layers: protocol- or provider-specific per-chain incremental models, per-chain union views, and a final multichain view (`payments.`). Detection and attribution logic varies by rail, but each layer conforms to the shared output schema. See each table's page for rail-specific methodology. `payments.commerce_flows` feeds back into `stablecoins_evm.activity_enriched`, replacing `category = 'unidentified'` with `category = 'payment'` for matched transfers. ## Example Queries ### Payment volume by rail ```sql theme={null} SELECT protocol, SUM(amount_usd) AS volume_usd, COUNT(*) AS tx_count FROM payments.commerce_flows WHERE block_date >= NOW() - INTERVAL '30' DAY GROUP BY 1 ``` ## Related Tables * [`stablecoins_evm.activity_enriched`](/data-catalog/curated/stablecoins/activity-enriched/stablecoins-evm-activity-enriched) — downstream consumer; exposes `category = 'payment'` for transfers matched by these datasets. # All Perpetuals Trading Tables Source: https://docs.dune.com/data-catalog/curated/perpetuals/all-tables-overview Complete inventory of all perpetual futures tables available on Dune Every table below is gated. Collection scope and access are on the [Perpetuals Trading overview](/data-catalog/curated/perpetuals/overview); dataset conventions are on the [Hyperliquid overview](/data-catalog/curated/perpetuals/hyperliquid/overview). | Venue | Table | Grain | Description | Docs | | - | - | - | - | - | | Hyperliquid | `hyperliquid.perp_market_details` | one row per (`perp_dex`, `coin`), current state | Market dimension: registry state, margin parameters, curated classification | [Open](/data-catalog/curated/perpetuals/hyperliquid/perp-market-details) | | Hyperliquid | `hyperliquid.perp_trades` | one row per fill leg, both sides of every match | Venue-wide fills across first-party and HIP-3 builder-deployed markets | [Open](/data-catalog/curated/perpetuals/hyperliquid/perp-trades) | | Hyperliquid | `hyperliquid.perp_market_metrics_hourly` | one row per (`coin`, `block_hour`) | Hourly per-market candles, volume, fees, open interest and funding | [Open](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-hourly) | | Hyperliquid | `hyperliquid.perp_market_metrics_daily` | one row per (`coin`, `block_date`) | Daily per-market OHLCV, volume, fees, liquidations, open interest and funding | [Open](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-daily) | | Hyperliquid | `hyperliquid.perp_positions_hourly` | one row per (`trader`, `coin`, `block_hour`) | Per-account position snapshots taken at each hourly funding round | [Open](/data-catalog/curated/perpetuals/hyperliquid/perp-positions-hourly) | | Hyperliquid | `hyperliquid.perp_accounts_daily` | one row per (`trader`, `block_date`) | Daily per-account rollup of trading, PnL, fees, funding and collateral flows | [Open](/data-catalog/curated/perpetuals/hyperliquid/perp-accounts-daily) | | Hyperliquid | `hyperliquid.perp_oracle_prices` | one row per (`coin`, `block_minute`) | Minute-cadence oracle, mark and mid prices with the mark-oracle spread in bps | [Open](/data-catalog/curated/perpetuals/hyperliquid/perp-oracle-prices) | | Hyperliquid | `hyperliquid.perp_orderbook_1m` | one row per (`coin`, `interval_start`) | One-minute L2 order book snapshots: resting bids and asks by price level, best first | [Open](/data-catalog/curated/perpetuals/hyperliquid/perp-orderbook-1m) | | Hyperliquid | `hyperliquid.perp_market_metadata` | one row per `coin` | Curated coin → classification map, read through `perp_market_details`, which left-joins it | [Open](/data-catalog/curated/perpetuals/hyperliquid/perp-market-details) | # Hyperliquid Perpetuals Source: https://docs.dune.com/data-catalog/curated/perpetuals/hyperliquid/overview Venue-wide curated tables for Hyperliquid perpetual futures, covering first-party and HIP-3 builder-deployed markets in one dataset The `hyperliquid.perp_*` tables cover Hyperliquid perpetual futures venue-wide: first-party markets, where `coin` is the bare symbol (`BTC`), and HIP-3 builder-deployed markets, where `coin` is `dex:SYMBOL` (`xyz:TSLA`), in one set of tables rather than one per dex. Hyperliquid spot is out of scope; HIP-4 outcome markets are covered under [Prediction Markets](/data-catalog/curated/prediction-markets/hip4/overview). This venue sits in the [Perpetuals Trading collection](/data-catalog/curated/perpetuals/overview); every table is listed on [All Tables](/data-catalog/curated/perpetuals/all-tables-overview). > [!NOTE] > > **Maintained by:** Dune · **Refresh:** hourly (`perp_oracle_prices` daily) · **Markets:** every first-party and HIP-3 builder-dex perpetual, live from the on-chain registry · **History:** fills from 2025-07-27, open interest and funding from 2025-09-27 > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Which table answers which question > [card] [perp_market_metrics_daily](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-daily) > > Market-level reporting. One row per market-day: candles, volume, fees, forced flow, end-of-day open interest and funding > [card] [perp_market_metrics_hourly](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-hourly) > > Intraday, same columns at hourly grain — funding's native cadence, and the finest grain at which open interest is defined > [card] [perp_trades](/data-catalog/curated/perpetuals/hyperliquid/perp-trades) > > Per fill. One row per leg with fees, realised PnL, position before the fill, and TWAP, liquidation and ADL detail > [card] [perp_accounts_daily](/data-catalog/curated/perpetuals/hyperliquid/perp-accounts-daily) > > Per account. One row per trader-day: volume, PnL, fees, funding, end-of-day exposure and collateral flows, no market dimension > [card] [perp_positions_hourly](/data-catalog/curated/perpetuals/hyperliquid/perp-positions-hourly) > > Per account per market. Signed position size, notional and settled funding at each hourly funding round > [card] [perp_market_details](/data-catalog/curated/perpetuals/hyperliquid/perp-market-details) > > Reference. One row per market: registry state, margin and leverage parameters, and the curated classification > [card] [perp_oracle_prices](/data-catalog/curated/perpetuals/hyperliquid/perp-oracle-prices) > > Prices. Minute-cadence oracle, mark and mid prices with the signed mark-oracle spread > [card] [perp_orderbook_1m](/data-catalog/curated/perpetuals/hyperliquid/perp-orderbook-1m) > > Liquidity. One-minute L2 order book snapshots, resting bids and asks by price level, best first ## Dataset conventions **`coin` is the join key, `market_symbol` is not.** Every market-grained table carries `coin` and joins to `perp_market_details` on it. `market_symbol` is `coin` with the `dex:` prefix stripped, so two dexes listing the same ticker collide — never join or group on it when HIP-3 markets are in scope. `perp_dex` is `hyperliquid` or the builder dex code, and `perp_market_details.perp_dex_type` (`first_party` / `builder`) is the cheap first-party-only or HIP-3-only filter. `perp_accounts_daily` is per trader and carries no market columns at all. **Two history floors.** Everything aggregated from fills — trades, candles, volume, counts, fees, forced flow — starts 2025-07-27. Open interest, open position counts and funding start 2025-09-27, because they come from the venue's hourly funding events and cannot be reconstructed from fills, which record changes in a position and never the standing position of every account. Rows between the two floors carry flow columns with null stocks. `perp_oracle_prices` is the exception in both directions: first-party rows reach back to 2023-05-20 from Hyperliquid's asset-contexts archive, HIP-3 rows start 2025-10-13. `perp_orderbook_1m` has a third and much later floor, 2026-06-29, because the L2 book feed it reads began there — so any analysis pairing fills with book state is bounded by that date, not by the fills floor. **`perp_trades` holds both legs of every match.** A market-level `SUM(notional_usd)` there is therefore \~2x exchange-reported volume: filter `is_taker` to count each match once, or take volume from the metrics tables, which are already taker-side and are the volume source of truth. At the account grain of `perp_accounts_daily` both legs is not a double count — each leg is one account's own participation — which is why that table aggregates both and exposes `taker_volume_usd` separately for venue-level sums. **Open interest is a stock, and published both-sides.** Summing it across markets at one timestamp is valid, summing it across hours or days is not. The column semantics — longs plus shorts, and the pricing rule behind the gap to the Hyperliquid UI — are on [`perp_market_metrics_hourly`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-hourly). **Bound the partition columns on every query.** They are the only columns that prune, and nothing prunes within a partition — a `coin` filter still reads the whole partition, and `perp_trades` alone adds roughly 8.75M legs a day. | Table | Partition columns | | - | - | | `perp_trades` | `block_date` | | `perp_accounts_daily` | `block_date` | | `perp_positions_hourly` | `block_month`, `trader_prefix` | | `perp_market_metrics_hourly` | `block_month` | | `perp_market_metrics_daily` | `block_month` | | `perp_oracle_prices` | `block_month` | | `perp_orderbook_1m` | `block_date` | | `perp_market_details` | none — an unpartitioned view over the current registry | Every fact table except `perp_orderbook_1m` carries both `block_date` and `block_month`, but only the partitioned one prunes, so filtering `block_month` on a `block_date`-partitioned table reads every day in the month. `perp_orderbook_1m` is a view and carries `block_date` only. `perp_positions_hourly` is the one table with a second partition key. `trader_prefix` — the first byte of the account address as two lowercase hex characters — splits each month into 256 buckets, and a single-account query has to state it alongside `trader`, because Trino derives no partition value from the address predicate on its own. [Its page](/data-catalog/curated/perpetuals/hyperliquid/perp-positions-hourly) has the query shape. The canonical market-level query is a metrics table joined to the dimension on `coin`: ```sql theme={null} SELECT m.block_date, d.market_category, SUM(m.volume_usd) AS volume_usd, SUM(m.fee_usd) AS fee_usd, SUM(m.open_interest_usd) AS open_interest_usd_eod FROM hyperliquid.perp_market_metrics_daily AS m JOIN hyperliquid.perp_market_details AS d ON d.coin = m.coin WHERE m.block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '30' DAY) AND m.block_date >= CURRENT_DATE - INTERVAL '30' DAY AND m.block_date < CURRENT_DATE GROUP BY 1, 2 ORDER BY 1 DESC, 3 DESC ``` Delisted markets stay tombstoned in the registry, so every coin that has ever traded has a row in `perp_market_details` and the inner join drops nothing. # hyperliquid.perp_accounts_daily Source: https://docs.dune.com/data-catalog/curated/perpetuals/hyperliquid/perp-accounts-daily Daily per-account rollup of Hyperliquid perpetual trading, realised PnL, fees, funding, end-of-day exposure and collateral flows. `hyperliquid.perp_accounts_daily` is the account-level entry point to the Hyperliquid perpetuals dataset: it answers per-account questions without scanning the multi-billion-row leaf tables. Grain: one row per `(trader, block_date)`, partitioned by `block_date`. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. Coverage is venue-wide — the first-party dex plus every HIP-3 builder-deployed dex. Spot and HIP-4 outcome markets are out of scope. There is no market dimension here: for a per-`coin` breakdown of the same activity use `hyperliquid.perp_trades` or `hyperliquid.perp_positions_hourly`. ## Table schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | Month of `block_date`, for month-grain grouping. Not the partition key | | `block_date` | `DATE` | Partition key, and the only column a read prunes on | | `trader` | `VARBINARY` | The account, as bytes rather than a hex string. Vaults and sub-accounts are ordinary accounts and are not flagged | | `fills_count` | `BIGINT` | Fill legs the account participated in, taker and maker alike. An account never appears twice in one match, so this is also its match count | | `taker_fills_count` | `BIGINT` | Legs where the account was the aggressor | | `maker_fills_count` | `BIGINT` | Legs where the account was passive | | `volume_usd` | `DOUBLE` | Notional traded across the account's taker and maker legs | | `taker_volume_usd` | `DOUBLE` | Notional traded as aggressor. The column that sums across accounts to `perp_market_metrics_daily.volume_usd` | | `maker_volume_usd` | `DOUBLE` | Notional traded passively | | `buy_volume_usd` | `DOUBLE` | Notional bought, from this account's own side | | `sell_volume_usd` | `DOUBLE` | Notional sold, from this account's own side | | `markets_traded` | `BIGINT` | Distinct `coin` traded in the day. 0 for an account that only held a position or moved collateral | | `dexes_traded` | `BIGINT` | Distinct `perp_dex` traded — `hyperliquid` plus any HIP-3 builder dexes | | `realized_pnl_usd` | `DOUBLE` | Sum of `closed_pnl_usd` on the account's legs. Gross of fees and funding, and on closes only | | `fee_usd` | `DOUBLE` | Net fees for the day. Negative when the account earned more in maker rebates than it paid; denominated in the market's `fee_token`, which is not always USDC and is not FX-converted | | `builder_fee_usd` | `DOUBLE` | Builder / front-end fee on the account's fills. A component of `fee_usd`, never an addend | | `deployer_fee_usd` | `DOUBLE` | HIP-3 deployer fee share, also a component of `fee_usd`. Zero-filled on first-party legs | | `liquidation_count` | `BIGINT` | Legs on which this account was force-closed for undercollateralisation, taker and maker alike | | `liquidation_volume_usd` | `DOUBLE` | Notional of those legs. Not comparable to `perp_market_metrics_daily.forced_volume_usd` | | `adl_count` | `BIGINT` | Legs on which this account was auto-deleveraged against a bankrupt counterparty. Always the taker leg | | `adl_volume_usd` | `DOUBLE` | Notional of those legs | | `funding_paid_usd` | `DOUBLE` | Funding debited across the day's rounds, as a positive magnitude | | `funding_received_usd` | `DOUBLE` | Funding credited to the account, as a positive magnitude | | `net_pnl_usd` | `DOUBLE` | `realized_pnl_usd - fee_usd + funding_received_usd - funding_paid_usd`. `NULL` wherever funding is `NULL` | | `open_positions_eod` | `BIGINT` | Distinct markets held at the day's last global funding round. Explicit 0 when the account was flat | | `position_notional_usd_eod` | `DOUBLE` | Gross exposure at that round, trade-priced through `perp_positions_hourly` — it differs from the mark-priced figure in the Hyperliquid UI by the trade-to-mark basis | | `deposit_usd` | `DOUBLE` | Bridge deposits into the account: genuine external inflow | | `withdraw_usd` | `DOUBLE` | Bridge payouts. The flat withdrawal fee is charged on top and is excluded, so an account that clears itself out nets to zero | | `transfer_in_usd` | `DOUBLE` | Account-to-account inflow: `send`, `internalTransfer`, `subAccountTransfer` | | `transfer_out_usd` | `DOUBLE` | The same movements, outflow side | | `spot_to_perp_usd` | `DOUBLE` | `accountClassTransfer` into the perp balance | | `perp_to_spot_usd` | `DOUBLE` | `accountClassTransfer` out of the perp balance | | `vault_deposit_usd` | `DOUBLE` | Collateral moved from the account into a vault | | `vault_withdraw_usd` | `DOUBLE` | Collateral returned from a vault, net of commission and closing cost | | `net_collateral_flow_usd` | `DOUBLE` | Signed sum of the eight flow columns above | | `_updated_at` | `TIMESTAMP(3) WITH TIME ZONE` | Build timestamp | ## The population is not traders only A row exists if the account traded, held a position, **or** moved perp collateral that day. Holders far outnumber traders, so restricting the population to accounts that traded would miss most of them. `markets_traded` is 0 exactly when `fills_count` is 0, so either column separates the two groups. ## Both legs, and why that is not a double count here `hyperliquid.perp_trades` holds both the maker and the taker leg of every match, which is why a market-level `SUM(notional_usd)` there runs at roughly twice exchange-reported volume unless you filter `is_taker`. At account grain the same two legs are not a double count: each leg is one account's own participation, so `volume_usd` is that account's real traded notional. Only sums that cross accounts double count — use `taker_volume_usd`, which reproduces `perp_market_metrics_daily.volume_usd` when summed. ```sql theme={null} -- Venue daily volume and active-account split, from account rows SELECT block_date, SUM(taker_volume_usd) AS volume_usd, COUNT(*) AS active_accounts, COUNT_IF(fills_count > 0) AS trading_accounts FROM hyperliquid.perp_accounts_daily WHERE block_date >= current_date - INTERVAL '7' day AND block_date < current_date GROUP BY 1 ORDER BY 1 ``` ## realized_pnl_usd vs net_pnl_usd `realized_pnl_usd` is closed-position PnL, gross of fees and funding, and complete rather than partial because `perp_trades` carries both legs of every match. `net_pnl_usd` takes fees off and applies funding, which is the change in account equity that trading caused. Neither carries unrealised PnL: no source records an entry price, so an account sitting on an open position has a `net_pnl_usd` that lags its equity. Subtracting `builder_fee_usd` or `deployer_fee_usd` from either double counts dollars already in `fee_usd`. ## Liquidation and ADL are opposite roles `liquidation_count` is this account failing its own margin; `adl_count` is this account being profitable and deleveraged against someone who failed theirs. Both are keyed on `fill_type`, since `liquidation_method` and `liquidated_trader` are stamped on the match rather than on the role and counting by either doubles. Liquidation counts both legs, so unlike the market tables it includes the legs on which an account was force-closed as a maker — the bankrupt side of a backstop liquidation. ADL is always the taker leg, and is zero on most days because it is concentrated in market-wide stress events. Add the two column pairs for an account's total forced flow. The market tables report the two combined instead, as `forced_count` / `forced_volume_usd`, counted once per match on the taker leg — so an account-level sum does not tie to that figure. ## Collateral flows Eight `ledger_raw` variants map onto the flow columns: `deposit`, `withdraw`, `accountClassTransfer` (split by direction into `spot_to_perp_usd` / `perp_to_spot_usd`), `vaultDeposit`, `vaultWithdraw`, and the three account-to-account variants that make up `transfer_in_usd` / `transfer_out_usd`. `net_collateral_flow_usd` is their signed sum: deposits, transfers in, spot-to-perp and vault withdrawals add; withdrawals, transfers out, perp-to-spot and vault deposits subtract. One ledger row names both sides of a transfer, so the same row credits the sender's outflow and the recipient's inflow. `transfer_in_usd` and `transfer_out_usd` therefore do not sum equal across the venue: a `send` leg is counted only when that side is a perp collateral pool, and spot-to-spot sends are not perp collateral at all. An account moving its own collateral between pools is kept gross — both legs land on its row and net to zero. Flows are account-wide, not per dex. HIP-3 dexes hold separate collateral pools and only the `send` variant names them, so at this grain you can see that an account moved collateral but not which pools it moved between. > [!NOTE] > > `ledger_raw`'s decoded `user` column is `NULL` on `deposit`, `withdraw`, `accountClassTransfer` and `vaultDeposit` — that is, on bridge flows and every spot↔perp transfer. The model resolves the account from the event JSON, so those flows are present here. If your own `ledger_raw` query shows less inflow than this table, that trap is the reason. ## NULL versus zero, and history floors History floors differ by column group, and days before a source's floor carry `NULL` for its columns rather than 0 — an absent source does not assert that nothing happened. | Column group | First day with data | | - | - | | Trading activity, fees, forced flow (`fills_count` … `adl_volume_usd`) | 2025-07-27 | | Funding, `net_pnl_usd`, end-of-day exposure, collateral flows | 2025-09-27 | Inside a covered range the distinction still holds: funding and flow columns are 0 when the source ran and the account simply had nothing, `NULL` on a day the source produced no rows at all, and `open_positions_eod` is 0 for an account that was flat at the day's last round but `NULL` on a day with no round anywhere. `net_pnl_usd` is `NULL` on exactly the days funding is `NULL`, so it is never a net figure that quietly assumed funding was zero. `realized_pnl_usd - fee_usd` is not a substitute in that window: funding was charged, the source merely does not reach back that far. > [!WARNING] > > `SUM(net_pnl_usd)` skips `NULL` days silently, so a window that starts before 2025-09-27 returns a total covering only part of it. Bound such windows at the funding floor, or count the `NULL` days alongside the sum. The newest `block_date` is partial by construction, and its end-of-day columns stay `NULL` until the day's last funding round clears ingestion. Filter `block_date < current_date` for complete rows. # hyperliquid.perp_market_details Source: https://docs.dune.com/data-catalog/curated/perpetuals/hyperliquid/perp-market-details Market dimension for Hyperliquid perpetual futures, one row per market with current registry state, margin parameters, and curated classification. `hyperliquid.perp_market_details` is the market dimension for the Hyperliquid perp dataset, covering first-party markets (`coin` unprefixed, e.g. `BTC`) and HIP-3 builder-deployed markets (`coin` = `dex:SYMBOL`, e.g. `xyz:TSLA`). Grain: one row per (`perp_dex`, `coin`), current state. `coin` is the join key used by every market-grained table in the dataset (`perp_accounts_daily` is per trader and carries none). > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Table schema | Column | Type | Description | | - | - | - | | `coin` | `VARCHAR` | Primary key. Venue-native market id: `BTC` first-party, `xyz:TSLA` HIP-3. The join key used by every market-grained table in the dataset | | `perp_dex` | `VARCHAR` | `hyperliquid` for first-party markets, otherwise the builder DEX code (`xyz`, `flx`, `vntl`, `para`, ...) | | `market_symbol` | `VARCHAR` | `coin` with the `dex:` prefix stripped. Not unique across dexes — never join on it | | `asset_id` | `BIGINT` | Numeric asset id used by the action tables. First-party: `asset_index`. HIP-3: `100000 + dex_index * 10000 + asset_index` | | `asset_index` | `INTEGER` | Per-dex asset index, kept so the `asset_id` arithmetic is reproducible | | `dex_index` | `INTEGER` | Registry index of the dex; 0 is first-party Hyperliquid | | `perp_dex_type` | `VARCHAR` | `first_party` or `builder`. The cheap filter for native-only or HIP-3-only, without string-matching `coin` | | `builder_name` | `VARCHAR` | DEX full name (XYZ, Felix Exchange, Ventuals, ...); `Hyperliquid` on first-party markets | | `deployer` | `VARBINARY` | Address that deployed the DEX and staked the HYPE. Null for first-party | | `oracle_updater` | `VARBINARY` | Address permitted to push oracle prices. Often null, first-party included | | `fee_recipient` | `VARBINARY` | Address receiving the deployer's fee share. Null where the DEX has not set one | | `size_decimals` | `INTEGER` | Decimal precision of order and fill size for the market (`sz_decimals`) | | `max_leverage` | `INTEGER` | Top-tier maximum leverage. Lower for a large position when `is_tiered_margin` | | `margin_table_id` | `INTEGER` | Pointer into the venue's margin tables, namespaced per dex — the same id means different tiers on different dexes. 1-50 is the implicit single-tier ladder, 51+ deployer-defined | | `margin_tiers` | `VARCHAR` | Resolved margin table as JSON, ordered by notional bound: `[{"lowerBound": ..., "maxLeverage": ...}]` | | `is_tiered_margin` | `BOOLEAN` | True when `margin_tiers` has more than one tier, i.e. the leverage cap depends on position size | | `margin_mode` | `VARCHAR` | Deployer-set regime: `cross` (traders may still pick isolated), `noCross`, `strictIsolated`. Source nulls mean `cross` | | `only_isolated` | `BOOLEAN` | True iff `margin_mode <> 'cross'` | | `funding_multiplier` | `DOUBLE` | Per-coin funding multiplier (0.0 = funding disabled). HIP-3 only; null for first-party and for a HIP-3 coin its DEX has not mapped | | `open_interest_cap_usd` | `DOUBLE` | Per-coin streaming open-interest cap, USD. HIP-3 only, same null rule | | `growth_mode` | `VARCHAR` | HIP-3 growth-mode state (`enabled` or null), which caps the deployer fee share at 100% instead of 300% | | `growth_mode_changed_at` | `TIMESTAMP(3) WITH TIME ZONE` | Last growth-mode change. Null when the source omits it and when it carries the source's 1970-01-01 never-changed sentinel | | `is_delisted` | `BOOLEAN` | Latest polled delisting flag. Delisted markets keep their row | | `is_halted` | `BOOLEAN` | Latest decoded `haltTrading` state. `false` means "no decoded halt action", which is weaker than "not halted" | | `listed_at` | `TIMESTAMP(3) WITH TIME ZONE` | Block time of the market's `registerAsset` / `registerAsset2`. Null on most markets — always on first-party ones, where listing is not a `perpDeploy` action — so null means "not in the decoded action log", not "never registered" | | `delisted_at` | `TIMESTAMP(3) WITH TIME ZONE` | First poll observing the market's current delisted spell; null while listed. Poll resolution, floored at 2026-06-29 | | `market_category` | `VARCHAR` | Coarse category of the underlying family, maintained for every listing | | `asset_class` | `VARCHAR` | Top-level class in the shared RWA vocabulary. Null on every crypto market | | `asset_type` | `VARCHAR` | Finer classification within `asset_class`, same vocabulary. Null exactly where `asset_class` is null | | `underlying_ticker` | `VARCHAR` | Underlying's symbol on its primary exchange, local codes included (`0700` = Tencent on HKEX). Null for indices, commodities, fx, pre-IPO names and crypto | | `description` | `VARCHAR` | Curated description of the reference, with the contract unit where the DEX spec states one. Null on plain crypto tickers | | `metadata_last_updated` | `DATE` | Date a curated cell on this row last changed. Says nothing about market activity | | `_updated_at` | `TIMESTAMP(3) WITH TIME ZONE` | Newest poller write among this market's registry row, its dex row and its margin table. Neither a poll clock nor a change clock | ## A live view, current state only The table is a VIEW over the deduped registry snapshots, so a newly listed market appears with no build and no refresh anywhere in the dataset — on the next registry write covering its dex, measured at a median of 32 minutes after the on-chain registration and 18.2 hours worst case. Coverage is every first-party and HIP-3 builder-dex market; Hyperliquid spot and HIP-4 outcome markets are out of scope. There is no `valid_from` / `valid_to`: this is not an SCD. The upstream registry only has change history from 2026-06-29, and intervals would break the one-row-per-market contract that every join here assumes. ## Joins from fact tables drop nothing Delisted markets stay tombstoned in the registry rather than disappearing, so every coin that has traded since the 2025-07-27 fills floor has a row here — verified by an unbounded all-history anti-join over every coin that had traded. An inner join from a fact table is therefore safe. The reverse is not a market list: registered-but-never-traded markets are here too. ## max_leverage is not always the cap that applies `margin_table_id` 1-50 is the implicit single-tier ladder where the id *is* the leverage value; there `margin_tiers` is synthesised from `max_leverage` and the two agree. Ids 51+ are deployer-defined and the only genuinely tiered markets. On those, `max_leverage` is a top-tier cap that a large enough position does not get, and the applicable cap is the last tier whose `lowerBound` the notional clears. ```sql theme={null} -- Leverage cap actually available at $5M notional on tiered markets SELECT d.coin, d.max_leverage AS top_tier_leverage, MIN(CAST(json_extract_scalar(t.tier, '$.maxLeverage') AS INTEGER)) AS leverage_at_5m FROM hyperliquid.perp_market_details AS d CROSS JOIN UNNEST(CAST(json_parse(d.margin_tiers) AS ARRAY(JSON))) AS t(tier) WHERE d.is_tiered_margin AND CAST(json_extract_scalar(t.tier, '$.lowerBound') AS DOUBLE) <= 5e6 GROUP BY 1, 2 ORDER BY 3 ``` Where a trader never set leverage, Hyperliquid's account default is `least(20, max_leverage)`. ## Classification is here and nowhere else `market_category`, `asset_class`, `asset_type`, `underlying_ticker` and `description` are LEFT JOINed from `hyperliquid.perp_market_metadata` and stored on no fact table, so a reclassification rebuilds only that \~500-row table. | `market_category` | Covers | | - | - | | `crypto` | Crypto-native references, single tokens and crypto aggregates alike (dominance, market-cap and NFT indices). Every first-party market | | `equities` | Single-name equities, listed or pre-IPO, and equity funds and ETFs | | `index` | A real-world index level: broad equity, sector or thematic, volatility | | `commodities` | Metals, energy, agriculture | | `fx` | Currency pairs and currency indices | | `other` | Rates (`para:10Y`, `km:USBOND`) and GPU-compute prices (`H100`) | `asset_class` takes `credit`, `fixed_income`, `cash_equivalent`, `equities`, `multi_asset`, `commodities`, `real_estate`, `fx` or `other` — the vocabulary the tokenized-RWA models use. It is null on every crypto market and on the compute markets, where no value in that vocabulary applies. `asset_type` names the exposure rather than a wrapper: a single-name perp is `equities_synthetic` whether the name is listed or pre-IPO, an index perp is `equities_index`, and a perp on an ETF is `equities_exchange_traded_funds` because there the reference genuinely is a fund. ```sql theme={null} -- Traded volume by asset class, last 7 days SELECT d.asset_class, d.asset_type, COUNT(DISTINCT d.coin) AS markets, SUM(t.notional_usd) AS volume_usd FROM hyperliquid.perp_trades AS t JOIN hyperliquid.perp_market_details AS d ON d.coin = t.coin WHERE t.block_date >= current_date - INTERVAL '7' day AND t.is_taker AND (d.market_category IS NULL OR d.market_category <> 'crypto') GROUP BY 1, 2 ORDER BY 4 DESC ``` `perp_trades` holds both legs of every match, hence the `is_taker` filter; `hyperliquid.perp_market_metrics_daily` is already taker-side if you only need the volume. The `IS NULL` arm matters: `market_category`'s `not_null` test runs at warning severity so a newly listed market keeps reporting while it is unclassified, and a bare `<> 'crypto'` would silently drop it. # hyperliquid.perp_market_metrics_daily Source: https://docs.dune.com/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-daily Daily per-market OHLCV, volume, fees, liquidations, open interest and funding for every Hyperliquid perpetual market, first-party and HIP-3. `hyperliquid.perp_market_metrics_daily` is the reporting grain for Hyperliquid perpetual markets: one row per `(coin, block_date)`, venue-wide across first-party markets (`coin` = `BTC`) and HIP-3 builder-deployed markets (`coin` = `dex:SYMBOL`, e.g. `xyz:TSLA`). Same column list as [`perp_market_metrics_hourly`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-hourly), with `block_hour` replaced by `block_date`. Partitioned by `block_month`. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. A row exists for a market-day if the market traded or held an open position. On a day it held positions without trading, the flow columns are zero-filled and the candle columns are null. ## Table schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | Month of `block_date`. Partition key | | `block_date` | `DATE` | UTC calendar day. The grain, with `coin` | | `perp_dex` | `VARCHAR` | `hyperliquid` for first-party markets, otherwise the builder DEX code (`xyz`, `flx`, `para`, ...) | | `coin` | `VARCHAR` | Venue-native market id. The grain, with `block_date`, and the join key to `perp_market_details` | | `market_symbol` | `VARCHAR` | `coin` with the `dex:` prefix stripped. Not unique across dexes, so never join on it | | `asset_id` | `BIGINT` | Numeric asset id used by the action tables. Null for a market that traded before the registry recorded it | | `open_price` | `DOUBLE` | First taker-leg trade price of the day. Null on a day with no trades | | `high_price` | `DOUBLE` | Highest taker-leg trade price of the day | | `low_price` | `DOUBLE` | Lowest taker-leg trade price of the day | | `close_price` | `DOUBLE` | Last taker-leg trade price of the day. Not the price `open_interest_usd` is struck at | | `vwap` | `DOUBLE` | Volume-weighted average taker price over the day: `volume_usd / volume_units` | | `volume_usd` | `DOUBLE` | Taker-leg notional, so each match is counted once. Includes administrative fills | | `volume_units` | `DOUBLE` | Taker-leg volume in base units | | `buy_volume_usd` | `DOUBLE` | Taker-side buy notional. Aggressor flow, not a directional net: on a liquidation or ADL the taker leg is the account being closed out, not a voluntary aggressor | | `sell_volume_usd` | `DOUBLE` | Taker-side sell notional. Same forced-flow caveat | | `trades_count` | `BIGINT` | Matches in the day | | `unique_traders` | `BIGINT` | Distinct accounts on either leg over the day | | `unique_takers` | `BIGINT` | Distinct aggressors over the day | | `unique_makers` | `BIGINT` | Distinct passive accounts over the day | | `fee_usd` | `DOUBLE` | Protocol fee revenue for the market-day, both legs netted | | `taker_fee_usd` | `DOUBLE` | Taker-leg fees | | `maker_fee_usd` | `DOUBLE` | Maker-leg fees, negative where rebated | | `builder_fee_usd` | `DOUBLE` | Front-end / builder-code fee share. A component of `fee_usd`, not an addend | | `deployer_fee_usd` | `DOUBLE` | HIP-3 deployer fee share. A component of `fee_usd`, not an addend | | `forced_count` | `BIGINT` | Matches the engine forced — liquidations and ADL, counted on the taker leg and not split into the two | | `forced_volume_usd` | `DOUBLE` | Notional of those matches, one per match, so directly comparable to `volume_usd` | | `open_interest_units` | `DOUBLE` | Open interest at the day's last global funding round, base units, longs plus shorts. `0` when the market held nothing at that round; null on a day with no round anywhere | | `open_interest_usd` | `DOUBLE` | That same snapshot, priced at the market's last trade at or before the round rather than at `close_price` | | `open_positions` | `BIGINT` | Distinct accounts holding a position at that round | | `funding_rate` | `DOUBLE` | The day's total funding rate, the sum of its hourly rates. Null when the market had no funding round that day | | `funding_rate_annualized` | `DOUBLE` | `funding_rate * 365` — the hourly table annualizes `* 24 * 365` | | `funding_paid_usd` | `DOUBLE` | Funding that changed hands over the day, as a positive magnitude, taken from the paying side. Direction is in `funding_rate` | | `_updated_at` | `TIMESTAMP(3) WITH TIME ZONE` | Build timestamp | ## Not a sum of the hourly rows The two column families are built differently, and neither is an hourly `SUM`: | Family | How the daily value is produced | | - | - | | Flows — candles, volume, counts, fees, forced flow | Re-aggregated from `perp_trades` over the whole day. Daily distinct account counts have to be exact, and hourly distincts do not sum; the candle needs the day's true first and last trade | | Stocks — `open_interest_units`, `open_interest_usd`, `open_positions` | An end-of-day snapshot lifted from the hourly row at the day's last global funding round. Not a sum, not a max | Because `volume_usd` is taker-leg only, this is the volume figure to quote. Summing `notional_usd` on `perp_trades` gives roughly twice the traded volume, since that table holds both legs of every match. > [!WARNING] > > A market that held no open position at the day's last funding round reports `0` for the stocks, not null and not its own stale earlier snapshot. Null there means something different: no funding round happened anywhere on the venue that day, so the state is unknown. Treat `0` and null as distinct in any open-interest series. The snapshot hour is a venue-wide clock — funding fires once an hour for every open market simultaneously — so every market's stock columns on a given `block_date` are struck at the same round, and summing `open_interest_usd` across markets for one day is coherent. ```sql theme={null} -- Venue-wide daily volume and end-of-day open interest, split by market category SELECT d.block_date, md.market_category, SUM(d.volume_usd) AS volume_usd, SUM(d.open_interest_usd) AS open_interest_usd_eod, SUM(d.forced_volume_usd) AS forced_volume_usd FROM hyperliquid.perp_market_metrics_daily AS d LEFT JOIN hyperliquid.perp_market_details AS md ON md.coin = d.coin WHERE d.block_month >= date_trunc('month', current_date - INTERVAL '90' day) AND d.block_date >= current_date - INTERVAL '90' day AND d.block_date < current_date GROUP BY 1, 2 ORDER BY 1 DESC, 3 DESC ``` ## The newest day is partial Trades are still accumulating and the day's "last global round" is only the latest round ingested so far. The row is merge-updated in place on each run, so it moves during the day. Filter `block_date < current_date` for complete days. ## History floors Flows start on 2025-07-27, the floor of the decoded fills source. Open interest and funding start on 2025-09-27. Market-days in between carry flows with null stocks. # hyperliquid.perp_market_metrics_hourly Source: https://docs.dune.com/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-hourly Hourly per-market candles, volume, fees, open interest and funding for every Hyperliquid perpetual market. `hyperliquid.perp_market_metrics_hourly` is the venue-wide hourly market table for Hyperliquid perpetual futures. Grain: one row per `(coin, block_hour)`, covering both first-party markets (`coin` = `BTC`) and HIP-3 builder-deployed markets (`coin` = `xyz:TSLA`); spot and HIP-4 outcome markets are out of scope. `coin` is the join key to [`perp_market_details`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-details); `market_symbol` repeats across dexes, so never join on it. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. This table, not `perp_trades`, is the volume figure to quote: [`hyperliquid.perp_trades`](/data-catalog/curated/perpetuals/hyperliquid/perp-trades) holds both legs of every match, so its raw `SUM(notional_usd)` is exactly twice the volume reported here. The candle, volume and count columns here are measured off the taker leg, so each match is counted once. The participant counts and `fee_usd` deliberately span both legs — `unique_traders` is distinct accounts on either side, and `fee_usd` nets the legs, because a rebated maker fee is negative. ## Table schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | Partition key, and the only column that prunes — filter it on every read | | `block_date` | `DATE` | Date of `block_hour` | | `block_hour` | `TIMESTAMP(3) WITH TIME ZONE` | Start of the hour, UTC. The grain, with `coin` | | `perp_dex` | `VARCHAR` | `hyperliquid` for first-party markets, otherwise the builder DEX code (`xyz`, `flx`, `para`, ...) | | `coin` | `VARCHAR` | Venue-native market id. The grain, with `block_hour`, and the join key to `perp_market_details` | | `market_symbol` | `VARCHAR` | `coin` with the `dex:` prefix stripped. Not unique across dexes | | `asset_id` | `BIGINT` | Numeric asset id used by the raw action tables. `NULL` when the market traded before the registry recorded it | | `open_price` | `DOUBLE` | First trade price in the hour. `NULL` on an hour with no trades | | `high_price` | `DOUBLE` | Highest trade price in the hour | | `low_price` | `DOUBLE` | Lowest trade price in the hour | | `close_price` | `DOUBLE` | Last trade price in the hour. Never carried forward | | `vwap` | `DOUBLE` | `volume_usd / volume_units` | | `volume_usd` | `DOUBLE` | Traded notional, one count per match. Includes administrative fills | | `volume_units` | `DOUBLE` | Traded volume in base units | | `buy_volume_usd` | `DOUBLE` | Aggressor buy notional — not a directional net, and it includes engine-forced closes | | `sell_volume_usd` | `DOUBLE` | Aggressor sell notional. Same forced-flow caveat | | `trades_count` | `BIGINT` | Matches in the hour | | `unique_traders` | `BIGINT` | Distinct accounts on either leg | | `unique_takers` | `BIGINT` | Distinct aggressors | | `unique_makers` | `BIGINT` | Distinct passive accounts | | `fee_usd` | `DOUBLE` | Protocol fee revenue for the market, both legs netted. Denominated in the market's quote token, which is not always USDC | | `taker_fee_usd` | `DOUBLE` | Taker-leg fees | | `maker_fee_usd` | `DOUBLE` | Maker-leg fees, negative where rebated | | `builder_fee_usd` | `DOUBLE` | Front-end / builder-code fee share. A component of `fee_usd`, not an addend | | `deployer_fee_usd` | `DOUBLE` | HIP-3 deployer fee share. A component of `fee_usd`, not an addend | | `forced_count` | `BIGINT` | Matches the engine forced: liquidations and ADL, counted once per match | | `forced_volume_usd` | `DOUBLE` | Notional of those matches, directly comparable to `volume_usd` | | `open_interest_units` | `DOUBLE` | Open interest at the hour's funding round, in base units. `NULL` when no round covered the market | | `open_interest_usd` | `DOUBLE` | `open_interest_units` priced at the last trade at or before the hour | | `open_positions` | `BIGINT` | Distinct accounts holding an open position at the funding round | | `funding_rate` | `DOUBLE` | The hour's funding rate as settled, signed | | `funding_rate_annualized` | `DOUBLE` | `funding_rate * 24 * 365` | | `funding_paid_usd` | `DOUBLE` | Funding that changed hands in the hour, as a positive magnitude | | `_updated_at` | `TIMESTAMP(3) WITH TIME ZONE` | Build timestamp | ## Why hourly, and when a row exists Funding is one global round per hour that covers every market and every account at a single block, so an hour is one clean position snapshot — there is no finer cadence at which open interest is well defined. A row exists if the market had **either** a trade **or** an open position in the hour. That is why an illiquid market with zero trades still reports open interest: the trade columns are zero-filled (`volume_usd = 0`, `trades_count = 0`) while the candles and `vwap` stay `NULL`, because there was no price. The newest hour is partial by construction. Trades are still accumulating, and `open_interest_*`, `open_positions` and `funding_*` stay `NULL` until the top-of-hour round clears ingestion, observed at 30–75+ minutes. Filter `block_hour < date_trunc('hour', now())` for complete hours only. ## Flows and stocks have different history floors Flow columns are aggregated from `perp_trades`, which starts 2025-07-27. Stock columns — `open_interest_units`, `open_interest_usd`, `open_positions`, `funding_rate`, `funding_rate_annualized`, `funding_paid_usd` — come from the venue's hourly funding events, which start 2025-09-27. Rows in between carry trade columns only, with every stock column `NULL`. > [!WARNING] > > Open interest, open position counts and funding rates cannot be reconstructed from fills under any circumstances — a fill records a change in a position, never the standing position of every account. There is no backfill for the two-month gap. ## Open interest is published both-sides `open_interest_units` is longs plus shorts, matching what the Hyperliquid UI and API publish. Classical one-sided open interest is exactly half of it. `open_interest_usd` prices those units at the market's last trade at or before the hour, carried forward on hours the market did not trade. The Hyperliquid UI prices open interest at mark instead, so the two differ by the trade-to-mark basis. ## Funding direction and magnitude `funding_rate` is the rate as it settled for that hour, not the forward-looking rate shown beside the funding countdown in the UI, which prices the round about to close. A long pays at a positive rate. `funding_paid_usd` is the magnitude that changed hands, taken from the paying side. The receiving side is the same figure — open interest is balanced, so funding nets to zero within a market — which means the column is a gross flow, not a net, and direction has to come from the sign of `funding_rate`. ## Classification and administrative fills Curated metadata (`market_category`, `asset_class`, `asset_type`, `underlying_ticker`, `builder_name`) is deliberately not stored here, so that a reclassification never rewrites this table — join `perp_market_details` on `coin` for it. ```sql theme={null} SELECT d.asset_class, m.coin, SUM(m.volume_usd) AS volume_usd, SUM(m.funding_paid_usd) AS funding_paid_usd, MAX_BY(m.open_interest_usd, m.block_hour) AS latest_open_interest_usd FROM hyperliquid.perp_market_metrics_hourly AS m JOIN hyperliquid.perp_market_details AS d ON d.coin = m.coin WHERE m.block_month >= DATE_TRUNC('month', NOW() - INTERVAL '7' DAY) AND m.block_hour >= DATE_TRUNC('hour', NOW()) - INTERVAL '7' DAY AND m.block_hour < DATE_TRUNC('hour', NOW()) GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 50 ``` `volume_usd` includes administrative fills — the engine's force-close of every position when a builder DEX delists a market, and vault position netting. Neither is trading, and neither can be excluded at this grain: for a tape without them, aggregate `perp_trades` with `is_taker AND fill_type NOT IN ('settlement', 'vault_netting')`. > [!NOTE] > > For the reporting grain use [`perp_market_metrics_daily`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-daily), which re-aggregates from fills rather than summing these rows — daily distinct account counts cannot be summed out of hourly ones. # hyperliquid.perp_oracle_prices Source: https://docs.dune.com/data-catalog/curated/perpetuals/hyperliquid/perp-oracle-prices Minute-cadence oracle, mark and mid prices for Hyperliquid perpetual markets, with the signed mark-oracle spread in basis points. `hyperliquid.perp_oracle_prices` is the price-reference table for the Hyperliquid perpetual futures venue. Grain: one row per `(coin, block_minute)` on a fixed one-minute grid, carrying the last update published inside the minute rather than an average. It covers both first-party perps (`coin` = `BTC`) and HIP-3 builder-deployed markets (`coin` = `dex:SYMBOL`, e.g. `xyz:TSLA`), and `price_source` says which family a row belongs to and therefore which price columns are populated. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Table schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | Month of `block_minute`. Partition column | | `block_date` | `DATE` | Date of `block_minute` | | `block_minute` | `TIMESTAMP(3) WITH TIME ZONE` | Start of the one-minute bucket, UTC. Grain, with `coin`. A grid position, not the moment a price was set | | `perp_dex` | `VARCHAR` | `hyperliquid` for first-party perps, otherwise the builder dex code. Derived from the `coin` prefix | | `coin` | `VARCHAR` | Venue-native market id, `BTC` or `dex:SYMBOL`. Grain with `block_minute`, and the join key to `perp_market_details` | | `market_symbol` | `VARCHAR` | Ticker with any `dex:` prefix removed. Two dexes can list the same ticker, so never a join key | | `asset_id` | `BIGINT` | Protocol asset id: the asset index for first-party perps, `100000 + dex_index * 10000 + asset_index` for HIP-3. Null when the market's registry entry cannot be resolved | | `oracle_price` | `DOUBLE` | External reference price funding pulls the perp toward, constructed independently of Hyperliquid's own book. Always populated and always above zero | | `mark_price` | `DOUBLE` | The price margining, liquidations, stop and take-profit triggers and unrealised PnL are computed against. Deployer-nominated on HIP-3 rows; null where a deployer priced the market but omitted it from the mark update | | `mid_price` | `DOUBLE` | Midpoint of best bid and best ask on Hyperliquid's order book. First-party rows only | | `premium` | `DOUBLE` | Book premium over the oracle as a fraction of `oracle_price`, and the input the funding rate is computed from. First-party rows only | | `mark_oracle_spread_bps` | `DOUBLE` | `(mark_price - oracle_price) / oracle_price * 10000`, signed, positive when the mark sits above the oracle | | `impact_bid_price` | `DOUBLE` | VWAP fill of a hypothetical market sell of the market's impact notional against the resting bids. First-party rows only | | `impact_ask_price` | `DOUBLE` | VWAP fill of the same-sized hypothetical market buy against the resting asks. First-party rows only | | `price_source` | `VARCHAR` | `asset_ctxs` for a first-party perp, `set_oracle` for a HIP-3 market. Decides which of the optional columns are populated | | `source_updates` | `INTEGER` | Published updates folded into this minute, of which the last one wins. Always 1 on `asset_ctxs` rows, often higher on `set_oracle` rows | | `_updated_at` | `TIMESTAMP(3) WITH TIME ZONE` | Build timestamp | ## price_source decides which columns are populated | `price_source` | Markets | Beyond oracle and mark | History from | | - | - | - | - | | `asset_ctxs` | first-party perps, unprefixed `coin` | `mid_price`, `premium`, `impact_bid_price`, `impact_ask_price` | 2023-05-20 | | `set_oracle` | HIP-3 builder-deployed, `dex:SYMBOL` | nothing — a deployer publishes prices, not book state | 2025-10-13 | The two families come from different upstream mechanisms, which is why coverage is asymmetric. First-party rows come from Hyperliquid's own asset-contexts series, which carries no HIP-3 rows at all and is re-pulled in batches that trail the present by weeks; every HIP-3 row is reconstructed from deployer `setOracle` actions, which land close to real time. Publishing is also not universal among builder dexes — markets on a dex whose deployer has not published prices have no rows here. So the two families do not reach the same latest minute: check `MAX(block_minute)` per `price_source` before comparing a recent window across them. The split is exact on the `coin` prefix: `asset_ctxs` coins are never dex-prefixed and `set_oracle` coins always are, so filtering on `price_source` and filtering on the prefix select the same rows. ## No carry-forward A minute with no published update produces no row, so gaps are genuine absences of published prices rather than nulls to interpolate. Take the last row at or before your cutoff instead of matching a minute exactly, and bound `block_month` alongside `block_minute` so the query prunes partitions: ```sql theme={null} SELECT coin, MAX_BY(oracle_price, block_minute) AS oracle_price, MAX_BY(mark_price, block_minute) AS mark_price, MAX(block_minute) AS priced_at FROM hyperliquid.perp_oracle_prices WHERE block_month >= DATE '2026-07-01' AND block_minute < TIMESTAMP '2026-08-20 12:00' GROUP BY 1 ``` ## Mark price means different things per family On a first-party row, `mark_price` is Hyperliquid's own published mark: a blend of the oracle, the drift of its book away from the oracle, its own bid/ask/last, and other venues' perp mids. On a HIP-3 row it is the mark the dex deployer nominates. Some deployers derive it independently and some simply republish the oracle they just set — one dex has done both in different periods. That carries straight into `mark_oracle_spread_bps`: a deployer echoing its oracle shows exactly zero, regardless of what the book did. Read `mark_price` before comparing spreads across dexes, and do not read a small spread on a HIP-3 market as a tight market. `mark_price` is never filled in from `oracle_price` where it is missing, so coalesce yourself if that assumption suits your analysis. ## Premium and the impact prices `impact_bid_price` and `impact_ask_price` are the volume-weighted fill prices of a hypothetical market sell and market buy of the market's impact notional — 20,000 USDC on BTC and ETH, 6,000 USDC on every other market — against the resting book. The clip is deliberately small: large enough to average across several price levels so a token-sized quote at the top of the book cannot move it, small enough to still describe the price ordinary flow gets. It is not a slippage estimate for a large order. `premium` is derived from that pair rather than from top-of-book, so it reflects where a real clip would trade. Its sign drives funding: an impact ask below the oracle pushes funding negative, an impact bid above it pushes funding positive. ## Market classification Nothing here classifies the market. Join [`perp_market_details`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-details) on `coin` for asset class, asset type, underlying ticker and leverage caps. # hyperliquid.perp_orderbook_1m Source: https://docs.dune.com/data-catalog/curated/perpetuals/hyperliquid/perp-orderbook-1m One-minute L2 order book snapshots for Hyperliquid perpetual markets, with resting bids and asks aggregated by price level, best price first. `hyperliquid.perp_orderbook_1m` is the order book table for the Hyperliquid perpetual futures venue. Grain: one row per `(coin, interval_start)`, carrying the whole resting book on both sides as arrays of price levels. Top-of-book, spread, depth and slippage curves therefore all come off a single row, with no join and no self-join across levels. It covers both first-party perps (`coin` = `BTC`) and HIP-3 builder-deployed markets (`coin` = `dex:SYMBOL`, e.g. `xyz:TSLA`); Hyperliquid spot and HIP-4 outcome markets are filtered out. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. > [!NOTE] > > **Grain:** one row per (`coin`, `interval_start`) · **Depth:** up to 100 price levels per side · **History:** from 2026-06-29 — a much later floor than the fills tables · **Markets:** every first-party and HIP-3 market with a live book · **Refresh:** a view over the live feed, so no build lag ## Table schema | Column | Type | Description | | - | - | - | | `coin` | `VARCHAR` | Venue-native market id, `BTC` or `dex:SYMBOL`. Grain with `interval_start`, and the join key to `perp_market_details` | | `interval_start` | `TIMESTAMP(3) WITH TIME ZONE` | The minute boundary the book state is as of, UTC. Grain, with `coin`. An instant, not a bucket summarising the minute after it | | `interval` | `VARCHAR` | Cadence label of the snapshot series. Constant `1m` | | `block_time` | `TIMESTAMP(3) WITH TIME ZONE` | Timestamp of the L1 block the book was actually read at. At or just before `interval_start`, never after | | `height` | `BIGINT` | L1 block height the book was read at | | `bids` | `ARRAY(ROW(n INTEGER, px VARCHAR, sz VARCHAR))` | Resting bids, best price first — so descending `px`. `n` is the number of orders at that level, `sz` the total size. Empty array when nothing is resting on the bid | | `asks` | `ARRAY(ROW(n INTEGER, px VARCHAR, sz VARCHAR))` | Resting asks, best price first — so ascending `px`. Same shape as `bids`. Empty array when nothing is resting on the ask | | `staleness_seconds` | `BIGINT` | Whole seconds from `block_time` to `interval_start`: how far back the read sits from the boundary it is labelled with. 0-59 | | `derived_at` | `TIMESTAMP(3) WITH TIME ZONE` | When the snapshot was produced. Not a per-row freshness clock — see below | | `block_date` | `DATE` | UTC date of `interval_start`. Partition column | ## A row is a boundary instant, not a bucket `interval_start` labels the moment the book is as of, and the book comes from the last L1 block at or before it — `block_time` is never later than `interval_start`. So a row describes the book *at* that minute boundary; it says nothing about what the book did during the minute that follows, and there is no open/high/low/close aggregation involved. `staleness_seconds` measures exactly that offset: it equals the whole seconds from `block_time` to `interval_start` on every row. On 2026-08-20 it was 0 on 80.2% of rows, with a 95th percentile of 6 seconds, a 99th of 27, and a maximum of 59 — a fresh market is read essentially at the boundary, and a large value means the last block before the boundary was itself old, which for a quiet market is normal rather than a defect. Read it when you are aligning the book against another table's timestamps to a sub-minute tolerance; ignore it otherwise. `derived_at` is not a per-row freshness clock. It tracks the minute closely while the feed runs in steady state, but backfilled history carries the timestamp of the batch that produced it, so comparing `derived_at` to `interval_start` measures ingestion history rather than data quality. ## Reading bids and asks Both arrays are already sorted best-first, so `bids[1]` is the best bid and `asks[1]` the best ask — no `ORDER BY` inside the array, and no window function to pick the top level. `px` and `sz` are `VARCHAR`, carrying the venue's own decimal strings unrounded, so every arithmetic use needs an explicit cast: ```sql theme={null} SELECT coin, interval_start, CAST(bids[1].px AS DOUBLE) AS best_bid, CAST(asks[1].px AS DOUBLE) AS best_ask, (CAST(asks[1].px AS DOUBLE) - CAST(bids[1].px AS DOUBLE)) / ((CAST(asks[1].px AS DOUBLE) + CAST(bids[1].px AS DOUBLE)) / 2) * 10000 AS spread_bps FROM hyperliquid.perp_orderbook_1m WHERE block_date = DATE '2026-08-20' AND coin = 'BTC' AND CARDINALITY(bids) > 0 AND CARDINALITY(asks) > 0 ORDER BY interval_start ``` Guard the `CARDINALITY` on both sides before indexing: a one-sided book produces an empty array rather than a null row, and `bids[1]` on an empty array raises rather than returning null. It is rare but real — 177 of the 454,797 rows on 2026-08-20 had no resting bid. For anything summed across levels, unnest instead of indexing. Depth within a distance of the mid, per minute: ```sql theme={null} SELECT interval_start, SUM(CAST(b.px AS DOUBLE) * CAST(b.sz AS DOUBLE)) AS bid_notional_within_25bps FROM hyperliquid.perp_orderbook_1m AS o CROSS JOIN UNNEST(o.bids) AS b (n, px, sz) WHERE o.block_date = DATE '2026-08-20' AND o.coin = 'BTC' AND CAST(b.px AS DOUBLE) >= CAST(o.bids[1].px AS DOUBLE) * (1 - 0.0025) GROUP BY 1 ORDER BY 1 ``` ## Absent minutes are not gaps The feed is event-driven, not a dense grid: a coin-minute is missing exactly when the book was unchanged from the snapshot before it. So forward-filling the previous row is exact rather than an approximation, and a missing minute is never a lost snapshot. Density splits sharply by how actively a market is quoted. On 2026-08-20, 263 of the 497 markets had all 1,440 minutes and the median market had a row for every minute, while at the 5th percentile a market had a single row for the whole day. Across all markets that day the table held 454,797 rows against 715,680 possible coin-minutes. Two consequences for queries. First, never read row counts per market as an activity metric without saying what they measure — they count book *changes*, not time covered. Second, to align the book with a fixed grid, or with a timestamp from another table, take the last row at or before your cutoff rather than matching a minute exactly: ```sql theme={null} SELECT coin, MAX_BY(bids[1].px, interval_start) AS best_bid, MAX_BY(asks[1].px, interval_start) AS best_ask, MAX(interval_start) AS book_at FROM hyperliquid.perp_orderbook_1m WHERE block_date BETWEEN DATE '2026-08-19' AND DATE '2026-08-20' AND interval_start < TIMESTAMP '2026-08-20 12:00' AT TIME ZONE 'UTC' AND CARDINALITY(bids) > 0 AND CARDINALITY(asks) > 0 GROUP BY 1 ``` The two-day window is deliberate: a market quoted rarely enough can have its last change on a previous day, so a one-day bound silently drops it. ## Depth is capped at 100 levels per side Each side holds at most 100 price levels, uniform across first-party and HIP-3 markets. The cap binds routinely rather than exceptionally — on 2026-08-20 it bound on 54.8% of rows, and the median row carried 98 bid levels — so a truncated book looks exactly like a complete one from inside this table. That matters whenever a query walks the book to a target size or distance. Depth measured near the mid is unaffected; a slippage estimate for a clip large enough to sweep past the hundredth level is bounded by the cap, not by the market. Check whether you reached the end of the data before concluding you reached the end of the book: ```sql theme={null} SELECT interval_start, CARDINALITY(bids) AS bid_levels, CARDINALITY(bids) = 100 AS bids_possibly_truncated FROM hyperliquid.perp_orderbook_1m WHERE block_date = DATE '2026-08-20' AND coin = 'BTC' ORDER BY interval_start ``` The upstream diff stream this table is built from carries up to 200 levels, so a question that genuinely needs the book past 100 levels has to go there instead. ## coin is the only market identifier here Unlike the other venue-wide tables, this one carries neither `market_symbol` nor `perp_dex`: `coin` is the raw venue string, readable on its own for both perp namespaces. Join [`perp_market_details`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-details) on `coin` for the dex, asset class, size precision and leverage caps. Use a `LEFT JOIN`. The registry behind that dimension is a poller snapshot that trails a new listing, so a freshly listed market can appear in the book before it appears there — everything resolves once the registry catches up, but an inner join is not guaranteed to be lossless on the current day. ## Bound block_date on every query `block_date` is the only partition column, and this table is a view, so there is no `block_month` to fall back on — an unbounded query reads all 24.2M rows and every price level in them. Nothing prunes within a partition either: filtering `coin` still reads the full day. ## Not in this table Traded prices and sizes are in [`perp_trades`](/data-catalog/curated/perpetuals/hyperliquid/perp-trades); this table is resting liquidity, which is why a level can sit in the book for hours without a fill. Oracle, mark and mid prices, plus Hyperliquid's own impact-notional quotes, are in [`perp_oracle_prices`](/data-catalog/curated/perpetuals/hyperliquid/perp-oracle-prices) — prefer `mid_price` there over deriving a mid here when a first-party market is all you need, since it needs no cast and no cardinality guard. Order-level detail — individual resting orders, their owners, placements and cancellations — is not in this dataset at any grain; the levels here are aggregated, with `n` as the only surviving trace of how many orders composed them. # hyperliquid.perp_positions_hourly Source: https://docs.dune.com/data-catalog/curated/perpetuals/hyperliquid/perp-positions-hourly Per-account Hyperliquid perp position snapshots taken at each hourly funding round, with signed size, USD notional and the funding settled on the position. `hyperliquid.perp_positions_hourly` is the per-account position surface for Hyperliquid perpetual futures. Grain: one row per `(trader, coin, block_hour)`, taken at the single global funding round that clears every market and account each hour. It covers first-party markets (`coin` unprefixed, e.g. `BTC`) and HIP-3 builder-deployed markets (`coin` = `dex:SYMBOL`, e.g. `xyz:TSLA`); spot and HIP-4 outcome markets are out of scope. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Table schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | First partition key. Filter it to bound a read in time; only this column prunes partitions outright | | `block_date` | `DATE` | Day of `block_hour`. Not a partition key, but with one file per month partition its min/max still skips whole months | | `block_hour` | `TIMESTAMP(3) WITH TIME ZONE` | The funding round the position was open at, truncated to the hour | | `block_number` | `BIGINT` | Block of the funding round. One value per round, so it identifies the round rather than the row | | `perp_dex` | `VARCHAR` | `hyperliquid` for first-party markets, otherwise the builder DEX code (`xyz`, `flx`, `para`, ...) | | `coin` | `VARCHAR` | Venue-native market id. The join key to `hyperliquid.perp_market_details` | | `market_symbol` | `VARCHAR` | `coin` with the `dex:` prefix stripped. Not unique across dexes, so never join on it | | `asset_id` | `BIGINT` | Numeric asset id used by the raw action tables. Null for a market not yet in the poller's registry | | `trader` | `VARBINARY` | Account holding the position. Vaults, HLP and its child vaults included, are ordinary unflagged accounts here | | `trader_prefix` | `VARCHAR` | Second partition key: the first byte of `trader` as two lowercase hex characters, so an address starting `0xab` lands in `ab`. Filter it alongside `trader` or nothing prunes | | `position_size` | `DOUBLE` | Signed size in base units; negative is short, and never zero | | `position_side` | `VARCHAR` | `long` or `short`, from the sign of `position_size` | | `valuation_price` | `DOUBLE` | The market's close price carried forward, taken from `perp_market_metrics_hourly` | | `position_notional_usd` | `DOUBLE` | `abs(position_size) * valuation_price` | | `funding_amount_usd` | `DOUBLE` | Funding settled on this position in this round, signed from the account's perspective: negative means it paid | | `funding_rate` | `DOUBLE` | The round's settled rate for the market, identical across every account in the round | | `_updated_at` | `TIMESTAMP(3) WITH TIME ZONE` | Build timestamp. Rows are immutable once the round is ingested | ## A snapshot series, not a position history Rows exist only for positions open at the top of the hour. A close is the **absence** of a row in the next hour, never a zero-size row, and a position opened and closed inside the same hour never appears at all. Do not read consecutive rows as events: to detect a close, compare the set of `(trader, coin)` keys between two hours rather than looking for a terminating row. History starts 2025-09-27, the floor of the funding feed. `hyperliquid.perp_trades` reaches further back (2025-07-27), so a position held in the trades era has no snapshot before that date. > [!WARNING] > > The newest hour is **missing rather than empty**: the funding round takes 30-75+ minutes to clear ingestion. Filter `block_hour < date_trunc('hour', now())` for complete data, and never read a zero count at the current hour as zero open interest. A second gap comes from pricing, and it can reach further back than the funding lag. `valuation_price` is joined from `perp_market_metrics_hourly` with an inner join, and the funding feed runs ahead of that build, so an hour whose price is not built yet withholds its position rows entirely instead of emitting them with a null notional. The next run merges them in. ## valuation_price and open interest `valuation_price` is `open_interest_usd / open_interest_units` from `perp_market_metrics_hourly` — the market's last close at or before the hour, carried forward. Both tables therefore price positions with one rule, and rolling this table up to `(coin, block_hour)` reproduces that table's open interest exactly: ```sql theme={null} SELECT block_hour, coin, SUM(position_notional_usd) AS open_interest_usd, SUM(ABS(position_size)) AS open_interest_units, COUNT(*) AS open_positions FROM hyperliquid.perp_positions_hourly WHERE block_month >= DATE_TRUNC('month', current_date - INTERVAL '7' day) AND block_date >= current_date - INTERVAL '7' day AND block_date < current_date GROUP BY 1, 2 ``` That sum counts **both sides** — every long is matched by a short — which is the convention the Hyperliquid UI and API use. Classical one-sided open interest is half of it. Because it is a trade price rather than a mark price, a position's notional differs from the Hyperliquid UI's mark-priced value by the trade-to-mark basis. For mark and oracle prices at minute cadence, use `hyperliquid.perp_oracle_prices`. ## Funding `funding_amount_usd` is the payment the venue actually settled on that position in that round, not a rate applied to a notional you compute yourself — use it directly for per-account funding cost. A long pays (negative) when `funding_rate` is positive and receives when it is negative; a short is the mirror. `funding_amount_usd = 0` means the payment rounded to zero on a live position, not a disabled market. `funding_rate` repeats on every row of a `(coin, block_hour)`, so average it per market-hour rather than per position. It is the rate as settled, not the forward-looking rate shown beside the Hyperliquid funding countdown. ## Partition keys: block_month and trader_prefix The table is partitioned on `(block_month, trader_prefix)`. `block_month` bounds the read in time; `trader_prefix` splits each month into 256 buckets by the first byte of the account address. > [!WARNING] > > A single-account query must filter `trader_prefix` as well as `trader`. Trino derives no partition value from `trader = 0x…` on its own, so a `trader`-only predicate reads every one of the 256 buckets in range. The bucket is a readable hex prefix rather than a hash precisely so you can state it yourself: it is the address's first two hex characters. Where the address is not a literal, `lower(substr(to_hex(trader), 1, 2))` gives the same value. ```sql theme={null} -- One account's positions at the latest complete hour SELECT p.coin, p.position_side, p.position_size, p.position_notional_usd, p.funding_amount_usd FROM hyperliquid.perp_positions_hourly AS p WHERE p.block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '1' day) AND p.trader_prefix = 'ab' -- required, or nothing prunes AND p.trader = 0xab5d5f0a3b1c2d3e4f5061728394a5b6c7d8e9f0 AND p.block_hour = ( SELECT MAX(block_hour) FROM hyperliquid.perp_positions_hourly WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '1' day) AND block_hour < DATE_TRUNC('hour', NOW()) ) ORDER BY p.position_notional_usd DESC ``` `coin` does not prune: filtering it here still reads the full month across all 256 buckets. A market-grain question belongs in [`perp_market_metrics_hourly`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-hourly), which already carries open interest and funding per market-hour. > [!NOTE] > > Entry price, unrealized PnL, and an account's leverage and margin mode are not here: the venue-wide perp models deliberately do not reconstruct leverage. Market-level `max_leverage`, `margin_mode` and margin tiers are in [`perp_market_details`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-details). # hyperliquid.perp_trades Source: https://docs.dune.com/data-catalog/curated/perpetuals/hyperliquid/perp-trades One row per fill leg on Hyperliquid perpetual futures, covering both sides of every match across first-party and HIP-3 builder-deployed markets. `hyperliquid.perp_trades` is the fill table for Hyperliquid perpetual futures, venue-wide: first-party markets (`coin` = `BTC`) and HIP-3 builder-deployed markets (`coin` = `xyz:TSLA`) alike. Grain: one row per fill **leg** — both sides of every match — keyed on `(block_date, coin, trader, oid, tid)`, with `tid` shared by the two legs of a match. Spot and HIP-4 outcome markets are out of scope. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. Fills are decoded from the full node fills stream rather than from taker order actions (`fills_raw`), which misses every engine-generated fill — TWAP child slices and liquidation executions — worth 5-30% of volume. History starts 2025-07-27 and covers every coin that has traded, at millions of fill legs per day. ## Table schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | Month of `block_date`, for month-grain grouping. Not the partition key | | `block_date` | `DATE` | Partition key, and the only column that prunes | | `block_time` | `TIMESTAMP(3) WITH TIME ZONE` | Block time of the fill | | `block_number` | `BIGINT` | Block height | | `event_index` | `INTEGER` | Position of the leg within the block; the two legs of a match sit at consecutive indices | | `perp_dex` | `VARCHAR` | `hyperliquid` for first-party markets, otherwise the builder DEX code (`xyz`, `flx`, `para`, …) | | `coin` | `VARCHAR` | Venue-native market id: `BTC` (first-party), `xyz:TSLA` (HIP-3). Join key to `perp_market_details` | | `market_symbol` | `VARCHAR` | `coin` with the `dex:` prefix stripped. Not unique across dexes — never join on it | | `asset_id` | `BIGINT` | Numeric asset id used by the raw Hyperliquid action tables. `NULL` when a market traded before the registry poller recorded it | | `trader` | `VARBINARY` | The account on this leg, as raw bytes rather than a hex string | | `is_taker` | `BOOLEAN` | Aggressor flag. Exactly one leg per match has it set | | `side` | `VARCHAR` | `buy` or `sell` from this leg's perspective | | `dir` | `VARCHAR` | Raw Hyperliquid direction string, e.g. `Open Long`, `Close Short` — the position effect, not the order side | | `fill_type` | `VARCHAR` | Normalised leg role: `order`, `twap`, `liquidation`, `adl`, `settlement`, `vault_netting` | | `start_position` | `DOUBLE` | Signed position size immediately before this fill | | `price` | `DOUBLE` | Fill price, in the market's quote token (see `fee_token`) | | `size` | `DOUBLE` | Fill size in base units | | `notional_usd` | `DOUBLE` | `price * size`. Sums to \~2x reported volume unless you filter `is_taker` | | `closed_pnl_usd` | `DOUBLE` | Realised PnL on this leg; non-zero on closes | | `fee_usd` | `DOUBLE` | This leg's fee, in `fee_token`. Negative on maker rebates | | `builder_fee_usd` | `DOUBLE` | Front-end / builder-code fee share, populated on \~6% of legs | | `deployer_fee_usd` | `DOUBLE` | HIP-3 deployer fee share | | `fee_token` | `VARCHAR` | Quote / collateral token the prices and fees are denominated in. Not always USDC | | `priority_gas` | `DOUBLE` | HYPE spent in the priority-gas auction. Sparse | | `tid` | `BIGINT` | Match id, shared by both legs — the pairing key | | `oid` | `BIGINT` | Order id, globally unique | | `cloid` | `VARCHAR` | Client order id where the trader set one | | `builder` | `VARBINARY` | Builder (front-end) address, populated on \~6% of legs | | `twap_id` | `BIGINT` | TWAP order id, set only on the taker leg. Group by it to reconstruct an executed schedule | | `liquidation_method` | `VARCHAR` | `market` or `backstop`. Set on both legs of the match — use `fill_type` for the role | | `liquidated_trader` | `VARBINARY` | The account that was liquidated. Also present on both legs | | `liquidation_mark_price` | `DOUBLE` | Mark price at liquidation | | `_updated_at` | `TIMESTAMP(3) WITH TIME ZONE` | Build timestamp. Legs are immutable, so in practice when the leg was first written | > [!WARNING] > > Bound `block_date` on every query. It is the partition key and the only column that prunes: `block_month` is a plain column, so filtering it alone reads every day in the month, and nothing prunes *within* a day — a `coin` filter still scans the full partition. An unbounded scan reads the whole multi-billion-row history. ## Both legs are here, so filter is_taker for volume `SUM(notional_usd)` over this table is \~2x exchange-reported volume, because every match contributes a taker leg and a maker leg. Filtering `is_taker` counts each match once. For pre-aggregated volume, use [`perp_market_metrics_hourly`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-hourly) or [`perp_market_metrics_daily`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-metrics-daily), which are the volume source of truth. ```sql theme={null} -- Traded volume per market, single-counted SELECT block_date, coin, SUM(notional_usd) AS volume_usd, COUNT(*) AS trades FROM hyperliquid.perp_trades WHERE block_date >= current_date - INTERVAL '7' day AND block_date < current_date AND is_taker AND fill_type NOT IN ('settlement', 'vault_netting') GROUP BY 1, 2 ORDER BY 3 DESC ``` Do **not** filter `is_taker` when the question is per-account: at account grain each leg is one account's own participation, which is also why [`perp_accounts_daily`](/data-catalog/curated/perpetuals/hyperliquid/perp-accounts-daily) aggregates both legs. The same applies to `closed_pnl_usd` — maker-side closes carry realised PnL too, and a taker-only filter drops roughly 40% of it. ## fill_type `fill_type` is the leg's role, normalised from `dir`, `liquidation_method`, `is_taker` and `twap_id`. | Value | Leg role | | - | - | | `order` | A voluntary order fill, including the resting order hit by an ordinary liquidation | | `twap` | The leg belongs to a TWAP child slice; always the taker | | `liquidation` | This leg's account was force-closed for undercollateralisation | | `adl` | This leg's account was the profitable side force-closed by auto-deleveraging | | `settlement` | Engine force-close of all open positions when a builder DEX delists a market: one price, one timestamp, zero fees | | `vault_netting` | Vault position netting (`dir = 'Net Child Vaults'`), not a trade at all | `settlement` and `vault_netting` are administrative and belong in no volume or activity measure. `liquidation` and `adl` are genuine risk transfers at market prices, but they are forced, so include them only when the question covers forced flow. TWAP legs inflate fill counts far more than volume — one parent order becomes many slices. Count `DISTINCT twap_id` for order-level figures. ## Liquidation columns mark the match, not the role > [!WARNING] > > `liquidation_method` and `liquidated_trader` are stamped on **both** legs of a liquidation match. Counting rows where `liquidation_method IS NOT NULL` therefore doubles the answer: measured 2026-08-12, 17,044 legs carried a method while only 8,522 accounts were liquidated. Use `fill_type = 'liquidation'` for the forced leg. The roles depend on the method. On `market` (ordinary) liquidations the liquidated account is the taker and its counterparty is a plain `order` leg. On `backstop` (auto-deleveraging) the roles invert: the bankrupt account is the maker leg with `fill_type = 'liquidation'`, and the profitable account force-closed against it is the taker, with `fill_type = 'adl'`. ## side is the order direction, dir is the position effect The two legs of a match always carry opposite `side` values. `dir` is not symmetric that way: it describes what the fill did to this leg's own position — `Open Long`, `Close Short`, `Long > Short` — so a `Close Long` fill has `side = 'sell'`. Use `side` for order flow, `dir` or `start_position` for position intent. Perp scope carries exactly 13 `dir` values, verified across full fill history; an unrecognised value lands in `fill_type = 'order'` until the model is taught it. ## Fees `fee_usd` is negative on maker rebates, so summing it across all legs yields net protocol revenue; add `is_taker` for gross taker fees. `builder_fee_usd` is populated together with `builder` on the \~6% of legs routed through a front-end, and `deployer_fee_usd` only on HIP-3 markets. All three are denominated in `fee_token`, which is not always USDC — a HIP-3 DEX picks its own quote token, and USDC, USDT0, USDH and USDE all appear across history. They are USD-pegged, which is what keeps the `_usd` column names honest, but a fee on a USDH market is paid in USDH. ## Not in this table Curated classification — `market_category`, `asset_class`, `asset_type`, `underlying_ticker`, `builder_name` — is deliberately kept off this table so a reclassification does not rewrite billions of rows. Join [`perp_market_details`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-details) on `coin` for it, along with the market-level `max_leverage`, `margin_tiers` and `margin_mode`. Per-fill leverage and margin mode are absent by design: both are a per-`(user, asset)` account setting rather than a property of a fill, and the venue-wide models do not reconstruct them. # Perpetuals Trading Source: https://docs.dune.com/data-catalog/curated/perpetuals/overview Curated perpetual futures data on Dune — markets, fills, hourly and daily market metrics, positions, account rollups, oracle prices, and order book snapshots The Perpetuals Trading collection covers perpetual futures venues, one schema per venue. **Hyperliquid** lives in the `hyperliquid` schema as `perp_*` tables, covering first-party and HIP-3 builder-deployed markets in one set of tables. Explore the [perpetuals trading data page](https://dune.com/data/perpetuals-trading) on dune.com. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** hourly (`perp_oracle_prices` daily) · **Venues:** Hyperliquid > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. > [card] [Hyperliquid](/data-catalog/curated/perpetuals/hyperliquid/overview) > > Market registry, fill-leg trades, hourly and daily market metrics, hourly positions, daily account rollups, minute oracle prices, and minute order book snapshots > [card] [All Tables](/data-catalog/curated/perpetuals/all-tables-overview) > > Complete inventory of all perpetuals tables ## Conventions Scope, join keys, history floors, both-leg volume and partition pruning are venue-level: the [Hyperliquid overview](/data-catalog/curated/perpetuals/hyperliquid/overview) documents them and routes each question to its table. Column semantics live on the individual table pages. # All Prediction Market Tables Source: https://docs.dune.com/data-catalog/curated/prediction-markets/all-tables-overview Complete inventory of all prediction market tables available on Dune ## All Prediction Market Tables | Protocol | Table | Description | Docs | Version | | - | - | - | - | - | | Cross-venue | `prediction_markets.markets` | Unified market dimension across Polymarket and Kalshi | [Open](/data-catalog/curated/prediction-markets/prediction_markets/markets) | v2 | | Cross-venue | `prediction_markets.trades` | Unified taker fills with P(Yes)-normalized prices, side traded and taker action | [Open](/data-catalog/curated/prediction-markets/prediction_markets/trades) | v2 | | Cross-venue | `prediction_markets.ohlcv_hourly` | Unified Yes-side hourly OHLCV bars per market in probability space | [Open](/data-catalog/curated/prediction-markets/prediction_markets/ohlcv_hourly) | v2 | | Cross-venue | `prediction_markets.open_interest_hourly` | Unified hourly open interest and traded volume per market | [Open](/data-catalog/curated/prediction-markets/prediction_markets/open_interest_hourly) | v2 | | Polymarket | `polymarket_polygon.market_trades` | Trade-level activity across all market outcomes and exchange versions | [Open](/data-catalog/curated/prediction-markets/polymarket/market_trades) | v2 | | Polymarket | `polymarket_polygon.market_details` | Enriched market metadata and resolution fields | [Open](/data-catalog/curated/prediction-markets/polymarket/market_details) | v2 | | Polymarket | `polymarket_polygon.market_actions` | Position lifecycle actions: splits, merges, redemptions, converts | [Open](/data-catalog/curated/prediction-markets/polymarket/market_actions) | v2 | | Polymarket | `polymarket_polygon.ohlcv_hourly` | Hourly OHLCV candles per outcome token, markets and combos | [Open](/data-catalog/curated/prediction-markets/polymarket/ohlcv_hourly) | v2 | | Polymarket | `polymarket_polygon.open_interest_hourly` | Hourly open interest and traded volume per market | [Open](/data-catalog/curated/prediction-markets/polymarket/open_interest_hourly) | v2 | | Polymarket | `polymarket_polygon.positions` | Daily wallet holdings and their USD value, markets and combos | [Open](/data-catalog/curated/prediction-markets/polymarket/positions) | v2 | | Polymarket | `polymarket_polygon.market_prices_hourly` | Hourly outcome token prices; in v2, use `ohlcv_hourly` | [Open](/data-catalog/curated/prediction-markets/polymarket/market_prices_hourly) | v1 | | Polymarket | `polymarket_polygon.combo_trades` | Combo (multi-leg parlay) trade fills on the v3 Exchange | [Open](/data-catalog/curated/prediction-markets/polymarket/combo_trades) | v2 | | Polymarket | `polymarket_polygon.combo_details` | Combo dimension: legs, generated names, resolution status | [Open](/data-catalog/curated/prediction-markets/polymarket/combo_details) | v2 | | Polymarket | `polymarket_polygon.combo_actions` | Combo lifecycle actions and structuring primitives | [Open](/data-catalog/curated/prediction-markets/polymarket/combo_actions) | v2 | | Polymarket | `polymarket_polygon.combo_prices_hourly` | Hourly combo token prices (joint probabilities) | [Open](/data-catalog/curated/prediction-markets/polymarket/combo_prices_hourly) | v1 | | Polymarket | `polymarket_polygon.users_address_lookup` | Proxy wallet ↔ owner address mapping with first-funding metadata | [Open](/data-catalog/curated/prediction-markets/polymarket/users_address_lookup) | v2 | | Kalshi | `kalshi.market_details` | Per-market reference with lifecycle status, settlement, strike, rules, parlay legs, and series metadata | [Open](/data-catalog/curated/prediction-markets/kalshi/market_details) | v2 | | Kalshi | `kalshi.market_trades` | Per-fill trade activity with P(Yes), USD notional, and estimated taker and maker fees | [Open](/data-catalog/curated/prediction-markets/kalshi/market_trades) | v1 | | Kalshi | `kalshi.ohlcv_hourly` | Hourly OHLCV candles with VWAP, volume, and trade count | [Open](/data-catalog/curated/prediction-markets/kalshi/ohlcv_hourly) | v2 | | Kalshi | `kalshi.open_interest_hourly` | Hourly open interest and traded volume per single market | [Open](/data-catalog/curated/prediction-markets/kalshi/open_interest_hourly) | v1 | | Kalshi | `kalshi.market_report` | Legacy daily market-level reporting | [Open](/data-catalog/curated/prediction-markets/kalshi/market_report) | v1 | | Kalshi | `kalshi.trade_report` | Legacy daily aggregated trade reporting | [Open](/data-catalog/curated/prediction-markets/kalshi/trade_report) | v1 | | Hyperliquid HIP-4 | `hip4_hyperliquid.market_details` | One row per binary market: question, event grouping, strike, expiry, settlement | [Open](/data-catalog/curated/prediction-markets/hip4/market_details) | v2 | | Hyperliquid HIP-4 | `hip4_hyperliquid.market_trades` | Every fill leg: trades plus split, merge, negate and settlement legs | [Open](/data-catalog/curated/prediction-markets/hip4/market_trades) | v2 | | Hyperliquid HIP-4 | `hip4_hyperliquid.ohlcv_hourly` | Hourly OHLCV candles per outcome token | [Open](/data-catalog/curated/prediction-markets/hip4/ohlcv_hourly) | v2 | | Hyperliquid HIP-4 | `hip4_hyperliquid.open_interest_hourly` | Hourly open interest and traded volume per market | [Open](/data-catalog/curated/prediction-markets/hip4/open_interest_hourly) | v1 | | Hyperliquid HIP-4 | `hip4_hyperliquid.positions_daily` | Daily holdings and value per account and outcome token | [Open](/data-catalog/curated/prediction-markets/hip4/positions_daily) | v1 | # hip4_hyperliquid.market_details Source: https://docs.dune.com/data-catalog/curated/prediction-markets/hip4/market_details One row per Hyperliquid HIP-4 market, with its question, sides, event, strike, expiry and settlement. > [!NOTE] > > Current version: **v2** > · query it as `hip4_hyperliquid.market_details_v2` > . The `hip4_hyperliquid.market_details` table has one row per Hyperliquid HIP-4 market, unique on `market_id`. Every market is a Yes/No pair. Use this table to look up what a market asks, which event it belongs to, when it expires and how it settled. To get its trades, join [`hip4_hyperliquid.market_trades`](/data-catalog/curated/prediction-markets/hip4/market_trades) on `market_id`. For one side only, join `outcome_id` to `yes_outcome_id` or `no_outcome_id`. Hyperliquid publishes most market descriptions as `key:value` fields separated by pipes, not as sentences. `title` and `event_title` turn those fields into readable text. The raw values are kept in `template`, `description` and `template_fields`. Compared with v1, `source_updated_at` is removed. Use `_updated_at` instead. > [!NOTE] > > Markets listed before Hyperliquid started publishing market names have no name or description: `template` and `title` are null. They are real markets, not missing data. ## Table Schema | Column | Type | Description | | - | - | - | | `market_id` | `VARCHAR` | Market identifier. One binary Yes/No contract. | | `event_id` | `VARCHAR` | The event this market is one outcome of, where the venue groups markets into mutually exclusive sets. Null for a standalone market, and null while the venue has not published the grouping. | | `yes_outcome_id` | `VARCHAR` | Token that pays out when the market settles yes. Joins hip4_hyperliquid.market_trades on outcome_id. | | `no_outcome_id` | `VARCHAR` | Token that pays out when the market settles no. Joins hip4_hyperliquid.market_trades on outcome_id. | | `title` | `VARCHAR` | Readable one-line statement of what the market asks, composed from the venue's parameters. Null where the venue published no name, where it published a template whose parameters are incomplete, and on the venue's fallback templates, which carry no parameters at all. | | `yes_outcome_name` | `VARCHAR` | What the Yes side is called on this market — Yes on a plain binary, a team or a range on the others. | | `no_outcome_name` | `VARCHAR` | What the No side is called on this market. | | `event_title` | `VARCHAR` | Name of the event this market belongs to: composed from the venue's parameters where the event is templated, otherwise the venue's own name. Null for standalone markets. | | `template_id` | `VARCHAR` | Which of the venue's market templates the market was created from, in the venue's own spelling. manual on a hand-written market, fallback on an event's catch-all outcome, recurring on a recurring market whose product the venue has not yet described. Null where the venue published no name. | | `is_fallback` | `BOOLEAN` | TRUE on an event's fallback outcome, the venue's catch-all for none of the named outcomes happening | | `market_type` | `VARCHAR` | standalone for a market that stands alone, question_outcome for one of the mutually exclusive outcomes of an event. | | `is_mutually_exclusive_event` | `BOOLEAN` | TRUE where the market is one outcome of an event whose outcomes are mutually exclusive: exactly one of them settles yes. FALSE for a standalone market, and where no grouping is known. | | `event_outcome_count` | `INTEGER` | How many named outcomes make up this market's event, as the venue lists it. The event's fallback outcome carries this event_id but is not counted. Null for a standalone market. | | `outcome_position` | `INTEGER` | The market's published slot within its event, counting from 0. Null where the venue publishes no ordering, which is every event except the price-range ones. | | `quote_token` | `VARCHAR` | Stablecoin the market is collateralised and paid out in: USDC, or USDH on the earliest markets. Read from the payout once the market settles and from the venue's listing before that. | | `deployer` | `VARBINARY` | Account that listed the market, or its event where the market is one of its outcomes. Null on markets the venue's validators listed before permissionless listing existed. | | `deployer_venue` | `VARCHAR` | Namespace the deployer listed under. One account lists under one namespace; a namespace can hold several accounts. | | `frequency` | `VARCHAR` | Cadence of the recurring series this market is an instance of: fifteen_min, hourly, daily, weekly, monthly or annual. Null on one-off markets. | | `underlying` | `VARCHAR` | Symbol the market settles against, on markets that resolve off a price. Null on every other kind. | | `underlying_dex` | `VARCHAR` | Builder venue listing the underlying, where it is not a first-party Hyperliquid market. Null on first-party underlyings and on markets that do not resolve off a price. | | `strike_type` | `VARCHAR` | How the market's strike is read: greater_or_equal and greater resolve yes above the floor, less below the cap, between inside the two, structured for markets settled on an identity rather than a number, custom for everything else. Null where the venue published no metadata. | | `floor_strike` | `DOUBLE` | Lower bound of the range the market resolves yes in, in the units of underlying. Null where the market is open below its cap, and on markets with no numeric strike. | | `cap_strike` | `DOUBLE` | Upper bound of the range the market resolves yes in, in the units of underlying. Null where the market is open above its floor, and on markets with no numeric strike. | | `observation_seconds` | `INTEGER` | How long the underlying has to hold the strike for the market to resolve yes. Null where resolution is a single reading rather than a sustained one. | | `listed_at` | `TIMESTAMP` | Earliest the venue is known to have listed the market: its registration where that is published, otherwise its first appearance in the registry, in a trader action or in a settlement. A member created with its question is dated by the question; one added to an existing question later is dated by its own registration. Not its first trade, which can come earlier on markets whose registration the venue does not publish. | | `scheduled_start_time` | `TIMESTAMP` | When the underlying event is scheduled to begin, on markets whose subject has a start time. | | `expected_expiration_time` | `TIMESTAMP` | When the market is due to stop trading and resolve. Null where the venue published no deadline. | | `status` | `VARCHAR` | active while the market is open, closed once its expiration has passed without the venue recording a settlement, settled once it has. A market that expired with no open positions still settles: the venue records the result even when there is nothing to pay out. | | `result` | `VARCHAR` | How the market settled: yes, no, void where both sides were paid equally, scalar where the payout is a fraction. Null until it settles. | | `settlement_value_usd` | `DOUBLE` | What one Yes token paid, in the market's quote stablecoin, on a 0 to 1 scale. Null until the market settles. | | `settlement_details` | `VARCHAR` | The reference value the venue settled on, where it published one. | | `settlement_ts` | `TIMESTAMP` | When the market settled: the payout where anyone held a token, otherwise the venue's settlement instruction. Null until it settles. | | `settlement_block_number` | `BIGINT` | Block the payout was made in. Null until the market settles, and on a market that settled with no holder to pay. | | `category` | `VARCHAR` | Unified prediction-market category, one of sports, crypto, politics, finance, technology, culture, weather, world, health, other. other where the venue's descriptors do not place the market. | | `category_native` | `ARRAY(VARCHAR)` | The venue's own descriptors for this market, as published | | `template` | `VARCHAR` | The venue's name for the market. On templated markets this is the template label rather than a readable question; title is the readable form. | | `description` | `VARCHAR` | The venue's description, verbatim. Templated markets carry pipe-delimited key:value parameters rather than prose. | | `event_description` | `VARCHAR` | Description of the event this market belongs to. Templated events carry pipe-delimited key:value parameters rather than prose. Null where the venue has published neither the event's registration nor its settlement. | | `template_fields` | `MAP(VARCHAR, VARCHAR)` | The market's template parameters as a key to value map. Empty where the description is prose or absent. | | `event_template_fields` | `MAP(VARCHAR, VARCHAR)` | The event's template parameters as a key to value map. Empty where the event has no templated description. | | `_updated_at` | `TIMESTAMP` | When the row was last written by the pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hip4_hyperliquid\&table_name_t6f0df=market_details_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hip4_hyperliquid\&table_name_t6f0df=market_details_v2) ## Example query Active markets closest to expiry: ```sql theme={null} SELECT market_id, event_title, title, yes_outcome_name, no_outcome_name, category, expected_expiration_time FROM hip4_hyperliquid.market_details_v2 WHERE status = 'active' ORDER BY expected_expiration_time LIMIT 20 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `market_id` | `VARCHAR` | Market identifier (Hyperliquid's outcome index). One binary Yes/No contract | > | `event_id` | `VARCHAR` | Event this market is one outcome of, where the venue groups markets into mutually exclusive sets. NULL for standalone markets and while the venue has not published the grouping | > | `yes_outcome_id` | `VARCHAR` | Token that pays out when the market settles yes. Joins `market_trades.outcome_id` | > | `no_outcome_id` | `VARCHAR` | Token that pays out when the market settles no. Joins `market_trades.outcome_id` | > | `title` | `VARCHAR` | Readable one-line statement of what the market asks, built from the venue's parameters. NULL where the venue published no name, incomplete parameters, or a fallback template | > | `yes_outcome_name` | `VARCHAR` | What the Yes side is called: `Yes` on a plain binary, a team or range on others | > | `no_outcome_name` | `VARCHAR` | What the No side is called | > | `event_title` | `VARCHAR` | Name of the event this market belongs to. NULL for standalone markets | > | `template_id` | `VARCHAR` | Venue template the market was created from (e.g. `priceBinary`, `priceTouch`, `sportsTournamentParticipant`). `manual` for hand-written markets, `fallback` for an event's catch-all outcome, `recurring` for a recurring market the venue has not yet described. NULL where the venue published no name | > | `is_fallback` | `BOOLEAN` | TRUE on an event's fallback outcome, which settles yes when none of the named outcomes happens | > | `market_type` | `VARCHAR` | `standalone` or `question_outcome` (one of the mutually exclusive outcomes of an event) | > | `is_mutually_exclusive_event` | `BOOLEAN` | TRUE where exactly one of the event's outcomes settles yes. FALSE for standalone markets and where no grouping is known | > | `event_outcome_count` | `INTEGER` | Number of named outcomes in the event, excluding the fallback outcome. NULL for standalone markets | > | `outcome_position` | `INTEGER` | Published slot within the event, counting from 0. Only set on price-range events | > | `quote_token` | `VARCHAR` | Stablecoin the market is collateralised and paid out in: `USDC`, or `USDH` on the earliest markets | > | `deployer` | `VARBINARY` | Account that listed the market (or its event). NULL on markets listed by validators before permissionless listing | > | `deployer_venue` | `VARCHAR` | Namespace the deployer listed under | > | `frequency` | `VARCHAR` | Cadence of a recurring series: `fifteen_min`, `hourly`, `daily`, `weekly`, `monthly`, `annual`. NULL on one-off markets | > | `underlying` | `VARCHAR` | Symbol the market settles against, on price-based markets | > | `underlying_dex` | `VARCHAR` | HIP-3 builder dex listing the underlying, where it is not a first-party Hyperliquid market | > | `strike_type` | `VARCHAR` | How the strike is read: `greater`, `greater_or_equal`, `less`, `less_or_equal`, `between`, `structured`, `custom` | > | `floor_strike` | `DOUBLE` | Lower bound of the range the market resolves yes in, in units of `underlying` | > | `cap_strike` | `DOUBLE` | Upper bound of the range the market resolves yes in, in units of `underlying` | > | `observation_seconds` | `INTEGER` | How long the underlying must hold the strike to resolve yes. NULL where resolution is a single reading | > | `listed_at` | `TIMESTAMP` | Earliest the venue is known to have listed the market (registration, or first appearance in the registry, a trader action, or a settlement). Not the first trade | > | `scheduled_start_time` | `TIMESTAMP` | When the underlying event is scheduled to begin, where applicable | > | `expected_expiration_time` | `TIMESTAMP` | When the market is due to stop trading and resolve | > | `status` | `VARCHAR` | `active` while open, `closed` once expiration passed without a recorded settlement, `settled` once settled | > | `result` | `VARCHAR` | `yes`, `no`, `void` (both sides paid equally), or `scalar` (fractional payout). NULL until settled | > | `settlement_value_usd` | `DOUBLE` | What one Yes token paid, on a 0 to 1 scale. NULL until settled | > | `settlement_details` | `VARCHAR` | Reference value the venue settled on, where published | > | `settlement_ts` | `TIMESTAMP` | When the market settled. NULL until settled | > | `settlement_block_number` | `BIGINT` | Block the payout was made in. NULL until settled, and on markets settled with no holder to pay | > | `category` | `VARCHAR` | Unified prediction-market category: `sports`, `crypto`, `politics`, `finance`, `technology`, `culture`, `weather`, `world`, `health`, `other` | > | `category_native` | `ARRAY(VARCHAR)` | The venue's own descriptors for the market | > | `template` | `VARCHAR` | The venue's name for the market. On templated markets this is the template label; `title` is the readable form | > | `description` | `VARCHAR` | The venue's description, verbatim. Templated markets carry pipe-delimited `key:value` parameters | > | `event_description` | `VARCHAR` | Description of the parent event, verbatim | > | `template_fields` | `MAP(VARCHAR, VARCHAR)` | The market's template parameters as a key-value map | > | `event_template_fields` | `MAP(VARCHAR, VARCHAR)` | The event's template parameters as a key-value map | > | `source_updated_at` | `TIMESTAMP` | Latest the venue changed anything this row reports | > | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline | # hip4_hyperliquid.market_trades Source: https://docs.dune.com/data-catalog/curated/prediction-markets/hip4/market_trades Hyperliquid HIP-4 fill ledger — one row per fill leg, covering both sides of every trade plus the split, merge, negate and settlement legs. The `hip4_hyperliquid.market_trades` table is the Hyperliquid HIP-4 fill ledger. Grain: one row per fill leg, keyed on `(block_month, trade_id, trader, outcome_id)`. It has both sides of every match, plus the engine legs that mint, burn and settle outcome tokens. `fill_type` tells trades apart from the other legs. Every leg is present, so `start_position` gives each account's balance before every change, and positions and open interest can be rebuilt exactly. A match is either: * **Two legs on the same token**: a buyer and a seller, sharing a `trade_id`. * **One leg on each side of the market**: a Yes buyer matched with a No buyer, or a Yes seller with a No seller, at prices that sum to 1. These legs have their own `trade_id`s and sit at consecutive `event_index` values in the same block. > [!WARNING] > > `SUM(amount_usd)` over all rows counts every match twice. For traded volume, filter `is_taker AND fill_type = 'trade'`. ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | First day of the UTC month of `block_time`. Partition key | | `block_date` | `DATE` | UTC date of the fill | | `block_time` | `TIMESTAMP` | Block time of the fill | | `block_number` | `BIGINT` | Block number | | `event_index` | `INTEGER` | Position of the leg within the block. The two legs of a Yes-versus-No match sit at consecutive indices | | `tx_hash` | `VARBINARY` | Hash of the action that produced the fill | | `trade_id` | `BIGINT` | Fill identifier (Hyperliquid `tid`). Shared by both legs on the same token. Unique across taker legs | | `order_id` | `BIGINT` | Order this leg filled (Hyperliquid `oid`). Engine legs carry an engine-minted id | | `client_order_id` | `VARCHAR` | Client order id (Hyperliquid `cloid`), where the trader set one | | `twap_id` | `BIGINT` | TWAP order this leg is a child slice of. Set only on the taker leg | | `market_id` | `VARCHAR` | Market identifier. Joins `hip4_hyperliquid.market_details` | | `outcome_id` | `VARCHAR` | Outcome token traded on this leg, in Hyperliquid's coin notation `#N` | | `outcome_index` | `INTEGER` | Side of the market: `0` is Yes, `1` is No | | `trader` | `VARBINARY` | Account on this leg | | `is_system_account` | `BOOLEAN` | TRUE when the account is the venue's settlement counterparty. Exclude from supply, open interest and position measures | | `is_taker` | `BOOLEAN` | TRUE on the aggressor leg. Filter it to count each match once | | `side` | `VARCHAR` | `buy` or `sell` from this leg's perspective. Buying No is not the same as selling Yes: see `outcome_index` | | `dir` | `VARCHAR` | Venue-native fill direction, passed through. Prefer `fill_type` | | `fill_type` | `VARCHAR` | `trade` (order matched on the book — the only type that reflects price discovery), `split` (collateral minted into a Yes/No pair), `merge` (Yes/No pair burned back to collateral), `negate` (a No token converted into Yes tokens of the question's other outcomes), `merge_question` (one Yes of every outcome burned back to collateral), `settlement` (holder redeemed at the payout), `other` | | `start_position` | `DOUBLE` | Tokens of `outcome_id` the account held before this leg | | `price` | `DOUBLE` | Price of `outcome_id` in the quote stablecoin, 0 to 1. Not always the Yes price: on a No leg, Yes price is `1 - price`. Splits and merges are booked at 0.5 per side; settlement legs carry the payout | | `num_contracts` | `DOUBLE` | Outcome tokens on this leg | | `amount_usd` | `DOUBLE` | `price * num_contracts` in the market's quote stablecoin | | `closed_pnl_usd` | `DOUBLE` | Realised PnL on this leg, non-zero when tokens are sold, merged or settled | | `fee_usd` | `DOUBLE` | Total fee in the quote stablecoin, builder and deployer fees included. Fees are charged on the side receiving the quote asset | | `builder_fee_usd` | `DOUBLE` | Builder (front-end) share of `fee_usd`. NULL on legs not routed through a builder | | `deployer_fee_usd` | `DOUBLE` | Market deployer's share of `fee_usd`. NULL where no deployer fee applies | | `fee_token` | `VARCHAR` | Token the fee is denominated in | | `builder` | `VARBINARY` | Builder (front-end) address, on legs routed through a builder | | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hip4_hyperliquid\&table_name_t6f0df=market_trades](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hip4_hyperliquid\&table_name_t6f0df=market_trades) ## Query performance `block_month` is the partition key. Always include a `block_month` filter alongside any `block_time` range. ## Example query For volume and trade counts only, [`open_interest_hourly`](/data-catalog/curated/prediction-markets/hip4/open_interest_hourly) is much cheaper and returns the same totals. Use `market_trades` when you need what only the ledger has: individual accounts, fees, and non-trade legs. Fees are charged on merge and settlement legs as well as trades, so fee totals should include every fill type. ```sql theme={null} -- Daily fee revenue by recipient and active traders, last 30 days SELECT block_date, SUM(fee_usd - COALESCE(builder_fee_usd, 0) - COALESCE(deployer_fee_usd, 0)) AS protocol_fee_usd, SUM(builder_fee_usd) AS builder_fee_usd, SUM(deployer_fee_usd) AS deployer_fee_usd, COUNT(DISTINCT trader) AS active_traders FROM hip4_hyperliquid.market_trades WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '30' DAY) AND block_time >= NOW() - INTERVAL '30' DAY AND NOT is_system_account GROUP BY 1 ORDER BY 1 ``` # hip4_hyperliquid.ohlcv_hourly Source: https://docs.dune.com/data-catalog/curated/prediction-markets/hip4/ohlcv_hourly Hourly price candles for Hyperliquid HIP-4 markets, one series per side, with VWAP, volume and trade count. > [!NOTE] > > Current version: **v2** > · query it as `hip4_hyperliquid.ohlcv_hourly_v2` > . The `hip4_hyperliquid.ohlcv_hourly` table holds hourly price candles (open, high, low, close and volume) for Hyperliquid HIP-4 markets. It has one row per `(hour, market_id, outcome_id)`, unique on `(block_month, hour, market_id, outcome_id)`. The Yes and No sides of a market each have **their own candle**, because each side trades on its own order book. Filter `outcome_index = 0` for the Yes series. An hour without trades gets a **flat bar at the last close**, with zero volume and `trade_count` and `is_forward_filled = TRUE`. Some bars have real prices but zero volume: in those hours the side only traded as the resting order in a match against the other side. Use `is_forward_filled` to tell filled-in bars from real ones. **Settlement.** When a market settles, the bar in its settlement hour closes at what that side paid: 1 on the winning token, 0 on the losing one, or the fraction on a scalar market. `high` and `low` stretch to include it. No flat bars are added after that bar, and real trades after settlement keep their actual prices. Until a market settles, its candles run to its expected expiration. Compared with v1, `market_end_time` is removed. For `settlement_ts` and `expected_expiration_time`, join [`hip4_hyperliquid.market_details`](/data-catalog/curated/prediction-markets/hip4/market_details) on `market_id`. > [!NOTE] > > `market_outcome` shows the state **at the time of each bar**. The other market columns, such as `market_name` and `category`, keep the values they had when the bar was written. For a market's current state, use [`hip4_hyperliquid.market_details`](/data-catalog/curated/prediction-markets/hip4/market_details). ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | First day of the UTC month of hour. Partition key; filter on it to limit the data scanned. | | `hour` | `TIMESTAMP` | UTC hour bucket for the candle | | `market_id` | `VARCHAR` | Market this candle's token belongs to. Joins hip4_hyperliquid.market_details on market_id; both of a market's candles carry it, so filter outcome_index to pick a side. | | `outcome_id` | `VARCHAR` | The outcome token this candle prices. One market has two, and the pair is the candle identity here. | | `outcome_index` | `INTEGER` | Side of the market this candle prices: 0 is Yes, 1 is No. Prices are that token's own, not the Yes price. | | `outcome_name` | `VARCHAR` | What this side is called on this market — Yes or No on a plain binary, a team or a range on the others. | | `market_name` | `VARCHAR` | Readable one-line statement of what the market asks, as written with the bar. Null where the venue published no usable parameters. | | `event_market_name` | `VARCHAR` | Name of the event this market belongs to, as written with the bar. Null for standalone markets. | | `category` | `VARCHAR` | Unified prediction-market category as written with the bar. hip4_hyperliquid.market_details carries the current value. | | `open` | `DOUBLE` | First trade price of the token in the hour. Equal to the carried close on forward-filled hours. On the settlement bar it keeps the last traded price; settlement pins only the close. | | `high` | `DOUBLE` | Highest trade price of the token in the hour. Equal to the carried close on forward-filled hours. On the settlement bar, widened to include the payout. | | `low` | `DOUBLE` | Lowest trade price of the token in the hour. Equal to the carried close on forward-filled hours. On the settlement bar, widened to include the payout. | | `close` | `DOUBLE` | Last trade price of the token in the hour, carried forward through no-trade hours. On the settlement bar, pinned to what this side was paid; bars from real trades after settlement keep their actual close. | | `vwap` | `DOUBLE` | Volume-weighted average price. Null for forward-filled (no-trade) hours. | | `volume_contracts` | `DOUBLE` | Tokens of this outcome taken by aggressors in the hour; the resting side of a match against the other outcome does not count, so a market's pair is additive. Zero for forward-filled hours. | | `volume_usd` | `DOUBLE` | Cash paid by aggressors for this outcome in the hour, in the market's quote stablecoin; the resting side of a match against the other outcome does not count, so a market's pair is additive. Zero for forward-filled hours. | | `trade_count` | `BIGINT` | Matches in the hour taken by an aggressor on this outcome; the resting side of a match against the other outcome does not count. Zero for forward-filled hours. | | `expected_expiration_time` | `TIMESTAMP` | When the market is due to stop trading and resolve. Bounds the candle series until it settles. | | `market_outcome` | `VARCHAR` | The market's state at this hour (point-in-time): unresolved until it has settled and this bar is at or after the settlement hour, then how it settled. Reaching the expected expiration does not resolve a market. | | `is_forward_filled` | `BOOLEAN` | True if this bar was generated by forward-fill (no trades in this hour) | | `_updated_at` | `TIMESTAMP` | When the row was last written by the pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hip4_hyperliquid\&table_name_t6f0df=ohlcv_hourly_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hip4_hyperliquid\&table_name_t6f0df=ohlcv_hourly_v2) ## Query performance The table is partitioned by `block_month`. Always filter on `block_month` or `hour`. ## Example query Hourly Yes price path for a single market: ```sql theme={null} SELECT hour, open, high, low, close, vwap, volume_usd FROM hip4_hyperliquid.ohlcv_hourly_v2 WHERE market_id = '1209' AND outcome_index = 0 AND block_month >= DATE '2026-09-01' ORDER BY hour ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `block_month` | `DATE` | First day of the UTC month of `hour`. Partition key | > | `hour` | `TIMESTAMP` | UTC hour bucket for the candle | > | `market_id` | `VARCHAR` | Market the candle's token belongs to. Joins `hip4_hyperliquid.market_details` | > | `outcome_id` | `VARCHAR` | Outcome token this candle prices | > | `outcome_index` | `INTEGER` | Side of the market: `0` is Yes, `1` is No. Prices are that token's own, not the Yes price | > | `outcome_name` | `VARCHAR` | What this side is called: `Yes`/`No` on a plain binary, a team or range on others | > | `market_name` | `VARCHAR` | Readable market question, as written with the bar | > | `event_market_name` | `VARCHAR` | Parent event name, as written with the bar. NULL for standalone markets | > | `category` | `VARCHAR` | Unified prediction-market category, as written with the bar | > | `open` | `DOUBLE` | First trade price in the hour. Equal to the carried close on forward-filled hours. Keeps the last traded price on the settlement bar | > | `high` | `DOUBLE` | Highest trade price in the hour. Widened to include the payout on the settlement bar | > | `low` | `DOUBLE` | Lowest trade price in the hour. Widened to include the payout on the settlement bar | > | `close` | `DOUBLE` | Last trade price in the hour, carried forward through no-trade hours. Pinned to the payout on the settlement bar | > | `vwap` | `DOUBLE` | Volume-weighted average price. NULL on forward-filled hours | > | `volume_contracts` | `DOUBLE` | Tokens of this outcome taken by aggressors in the hour. A market's Yes and No rows are additive | > | `volume_usd` | `DOUBLE` | Cash paid by aggressors for this outcome in the hour, in the quote stablecoin. A market's Yes and No rows are additive | > | `trade_count` | `BIGINT` | Matches in the hour taken by an aggressor on this outcome | > | `market_end_time` | `TIMESTAMP` | End of the candle series: settlement time once known, otherwise the expected expiration | > | `expected_expiration_time` | `TIMESTAMP` | When the market is due to stop trading and resolve | > | `market_outcome` | `VARCHAR` | Market state at this hour: `unresolved` before the settlement hour, then `yes`, `no`, `void` or `scalar` | > | `is_forward_filled` | `BOOLEAN` | TRUE when the bar has no trades and was carried forward | > | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline | # hip4_hyperliquid.open_interest_hourly Source: https://docs.dune.com/data-catalog/curated/prediction-markets/hip4/open_interest_hourly Hyperliquid HIP-4 hourly open interest and traded volume per market, from first activity to settlement. > [!NOTE] > > Current version: **v1** > > . The `hip4_hyperliquid.open_interest_hourly` table provides hourly open interest and traded volume per Hyperliquid HIP-4 market. Grain: one row per `(hour, market_id)`, with a row for every hour from the market's first activity to its settlement. Open interest is a level at the end of the hour; volume is the flow within it. Open interest is built from the full token ledger (trades, splits, merges, negations and settlements) and excludes the venue's settlement counterparty. It is counted **per side**. On standalone markets the Yes and No sides are equal. On event members they can diverge once No tokens are converted into Yes tokens of sibling outcomes. `event_oi_contracts` gives the collateral locked behind the whole event. > [!WARNING] > > `event_oi_contracts` is repeated on every member row of an event. Summing it across members overstates event open interest. Take it once per `event_id` and `hour`. Per-token prices are in [`hip4_hyperliquid.ohlcv_hourly`](/data-catalog/curated/prediction-markets/hip4/ohlcv_hourly). ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | First day of the UTC month of `hour`. Partition key | | `hour` | `TIMESTAMP` | UTC hour the figures describe. Open interest is the level at the end of it, volume the flow within it | | `market_id` | `VARCHAR` | Market identifier. Joins `hip4_hyperliquid.market_details` | | `event_id` | `VARCHAR` | Event this market is one outcome of. NULL for standalone markets and where the venue has not published the grouping | | `market_oi_yes_contracts` | `DOUBLE` | Yes tokens outstanding at the end of the hour. Zero once the market settles and every holder has been paid | | `market_oi_no_contracts` | `DOUBLE` | No tokens outstanding at the end of the hour. Equal to the Yes side except on event members | | `event_oi_contracts` | `DOUBLE` | Collateral locked behind the market's event: the Yes tokens of one member plus the No tokens of every other member. Equal to the Yes side on a standalone market. One contract pays 1 unit of the quote stablecoin | | `volume_contracts` | `DOUBLE` | Outcome tokens traded in the hour, both sides together, each match counted once | | `volume_usd` | `DOUBLE` | Cash traded in the hour in the quote stablecoin, each match counted once from the aggressor's side | | `trade_count` | `BIGINT` | Matches in the hour, both sides together | | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hip4_hyperliquid\&table_name_t6f0df=open_interest_hourly](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hip4_hyperliquid\&table_name_t6f0df=open_interest_hourly) ## Query performance `block_month` is the partition key. Always include a `block_month` or `hour` filter. ## Example query ```sql theme={null} -- Standalone markets with the most open interest at the latest hour SELECT o.market_id, m.title, o.market_oi_yes_contracts, o.volume_usd FROM hip4_hyperliquid.open_interest_hourly o JOIN hip4_hyperliquid.market_details m ON m.market_id = o.market_id WHERE o.block_month = DATE_TRUNC('month', CURRENT_DATE) AND o.hour = ( SELECT MAX(hour) FROM hip4_hyperliquid.open_interest_hourly WHERE block_month = DATE_TRUNC('month', CURRENT_DATE) ) AND m.market_type = 'standalone' ORDER BY o.market_oi_yes_contracts DESC LIMIT 20 ``` # Hyperliquid HIP-4 Source: https://docs.dune.com/data-catalog/curated/prediction-markets/hip4/overview Curated datasets for Hyperliquid HIP-4 outcome (prediction) markets on Dune HIP-4 is Hyperliquid's outcome-market standard: binary Yes/No prediction markets that trade on HyperCore order books next to Hyperliquid's perpetuals. Dune provides the full HIP-4 ledger — every fill leg, including the engine legs that mint, burn and settle outcome tokens — plus market metadata, hourly candles, hourly open interest, and daily account positions. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** hourly (`positions_daily` daily) · **Source:** Hyperliquid (HyperCore node fills and venue metadata) · **History:** from 2026-05-02 ## Available Tables > [card] [hip4_hyperliquid.market_details](/data-catalog/curated/prediction-markets/hip4/market_details) > > One row per market: question, sides, event grouping, strike, expiry, and settlement > [card] [hip4_hyperliquid.market_trades](/data-catalog/curated/prediction-markets/hip4/market_trades) > > Every fill leg: trades plus split, merge, negate and settlement legs > [card] [hip4_hyperliquid.ohlcv_hourly](/data-catalog/curated/prediction-markets/hip4/ohlcv_hourly) > > Hourly OHLCV candles with VWAP, one series per outcome token > [card] [hip4_hyperliquid.open_interest_hourly](/data-catalog/curated/prediction-markets/hip4/open_interest_hourly) > > Hourly open interest and traded volume per market > [card] [hip4_hyperliquid.positions_daily](/data-catalog/curated/prediction-markets/hip4/positions_daily) > > Daily holdings per account and outcome token, valued at the end-of-day price ## Key concepts * **Market = one binary contract.** `market_id` is Hyperliquid's outcome index. Every market has two outcome tokens, `yes_outcome_id` and `no_outcome_id`, in Hyperliquid's coin notation `#N`. `outcome_index` 0 is Yes and 1 is No. A Yes token pays 1 in the quote stablecoin if the market settles yes; a No token pays 1 if it settles no. * **Events group mutually exclusive markets.** Where the venue groups markets into a question (for example, "Winner of English Premier League 2026/2027"), each member market carries the same `event_id` and `market_type = 'question_outcome'`. Standalone markets have a null `event_id`. An event can include a fallback outcome (`is_fallback`) that settles yes when none of the named outcomes happens. * **Both sides have their own book.** The Yes and No tokens trade separately, and the book can also match a Yes buyer with a No buyer at prices that sum to 1. Prices are always the price of the token on that row, not the Yes price. On a No row, take `1 - price` for the implied Yes probability. * **Quote stablecoin.** Markets are collateralised in USDC. The earliest markets used USDH. `*_usd` columns are denominated in the market's quote stablecoin. ## Notes * `market_trades` has both legs of every match. Filter `is_taker AND fill_type = 'trade'` to count each trade once. Summing `amount_usd` over all rows double-counts volume. * For volume at hourly or coarser grain, use `open_interest_hourly` (per market) or `ohlcv_hourly` (per outcome token). They already count each trade once and match the taker-filtered trades exactly, but scan far fewer rows. * `ohlcv_hourly` has one candle per outcome token, so each market has two price series. To get the Yes series, filter `outcome_index = 0`. * `open_interest_hourly` and `positions_daily` are built from the full token ledger (splits, merges, negations and settlements, not only trades). They exclude the venue's settlement counterparty (`is_system_account`). * About a fifth of markets were listed before the venue published a market registry. Those markets have a null `template` and `title`. They are real markets, not an ingestion gap. * HIP-4 is not yet part of the cross-venue [`prediction_markets`](/data-catalog/curated/prediction-markets/prediction_markets/overview) tables. ## Example query ```sql theme={null} -- Top HIP-4 markets by traded volume, last 7 days SELECT m.market_id, m.title, m.event_title, m.category, SUM(o.volume_usd) AS volume_usd, SUM(o.trade_count) AS num_trades FROM hip4_hyperliquid.open_interest_hourly o JOIN hip4_hyperliquid.market_details_v2 m ON m.market_id = o.market_id WHERE o.block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '7' DAY) AND o.hour >= NOW() - INTERVAL '7' DAY GROUP BY 1, 2, 3, 4 ORDER BY volume_usd DESC LIMIT 20 ``` # hip4_hyperliquid.positions_daily Source: https://docs.dune.com/data-catalog/curated/prediction-markets/hip4/positions_daily Hyperliquid HIP-4 daily positions — end-of-day balance and value per account and outcome token. > [!NOTE] > > Current version: **v1** > > . The `hip4_hyperliquid.positions_daily` table shows what every account holds on Hyperliquid HIP-4 markets, day by day, and what it is worth. Grain: one row per `(day, trader, outcome_id)`. Rows run from the day a position opens to the day it closes or the market settles. A day on which the balance does not change carries the previous balance forward, so a position appears on every day it was open. An account holding nothing has no row. Balances are read from the fill ledger, including splits, merges, negations and settlements, not only trades. The current day is added once it closes. This table has balances and prices only. For what the market asks and how it resolved, join [`hip4_hyperliquid.market_details`](/data-catalog/curated/prediction-markets/hip4/market_details) on `market_id`. For the full price history, join [`hip4_hyperliquid.ohlcv_hourly`](/data-catalog/curated/prediction-markets/hip4/ohlcv_hourly) on `outcome_id`. ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | First day of the UTC month of `day`. Partition key | | `day` | `DATE` | UTC day the holding describes. Balances are as of the end of the day | | `trader` | `VARBINARY` | Account holding the tokens | | `market_id` | `VARCHAR` | Market the held token belongs to. Joins `hip4_hyperliquid.market_details` | | `outcome_id` | `VARCHAR` | Outcome token held | | `outcome_index` | `INTEGER` | Side held: `0` is Yes, `1` is No | | `balance` | `DOUBLE` | Outcome tokens held at the end of the day. Always positive | | `price` | `DOUBLE` | End-of-day price of the token held, in the quote stablecoin, 0 to 1. Not always the Yes price. NULL until the token first trades | | `balance_usd` | `DOUBLE` | End-of-day value of the holding in the quote stablecoin. NULL wherever `price` is | | `_position_updated_at` | `TIMESTAMP` | When the balance last changed. Earlier than `day` where the position was carried through days with no activity | | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hip4_hyperliquid\&table_name_t6f0df=positions_daily](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hip4_hyperliquid\&table_name_t6f0df=positions_daily) ## Query performance `block_month` is the partition key. Always include a `block_month` or `day` filter. ## Example query ```sql theme={null} -- Largest holders of a market yesterday SELECT trader, CASE outcome_index WHEN 0 THEN 'Yes' ELSE 'No' END AS side, balance, price, balance_usd FROM hip4_hyperliquid.positions_daily WHERE market_id = '1473' AND block_month = DATE_TRUNC('month', CURRENT_DATE - INTERVAL '1' DAY) AND day = CURRENT_DATE - INTERVAL '1' DAY ORDER BY balance_usd DESC LIMIT 20 ``` # kalshi.market_details Source: https://docs.dune.com/data-catalog/curated/prediction-markets/kalshi/market_details One row per Kalshi market, with its status, settlement, strikes, resolution rules, parlay legs, and event and series details. > [!NOTE] > > Current version: **v2** > · query it as `kalshi.market_details_v2` > . The `kalshi.market_details` table has one row per Kalshi market, unique on `market_id` (Kalshi's ticker). It covers every single market Kalshi has listed, traded or not, plus every parlay that has traded at least once. Use it to look up a market's question, strikes, status, result and payout, resolution rules, parlay legs, and its event and series, including fee terms. The table has no prices or volume. Those are in [`kalshi.ohlcv_hourly`](/data-catalog/curated/prediction-markets/kalshi/ohlcv_hourly) and [`kalshi.market_trades`](/data-catalog/curated/prediction-markets/kalshi/market_trades), which join on `market_id`. A single market that never traded has no trades or candles. Compared with v1, `source_updated_at` and `updated_time` are removed. `_updated_at` now changes only when a row's values change. `created_date` is new and is the partition column. > [!NOTE] > > `status` comes from Kalshi's market status updates. Where those are missing, it uses the latest market data and the open and close times. `settlement_value_usd` is the source of truth for settlement: if a yes/no `result` disagrees with the payout, `result` is corrected to match. ## Table Schema | Column | Type | Description | | - | - | - | | `market_id` | `VARCHAR` | Unique market identifier — one binary contract. Kalshi calls this the ticker. | | `event_id` | `VARCHAR` | Parent event: the group of markets resolving off the same underlying occurrence. Kalshi calls this the event_ticker. | | `market_type` | `VARCHAR` | Market type (e.g., binary) | | `title` | `VARCHAR` | Market question text | | `subtitle` | `VARCHAR` | Market subtitle | | `yes_sub_title` | `VARCHAR` | Label for the Yes outcome. For threshold and range markets it reflects the strike. | | `no_sub_title` | `VARCHAR` | Label for the No outcome | | `created_time` | `TIMESTAMP` | When the market was created | | `created_date` | `DATE` | UTC date of created_time; the table's partition column | | `open_time` | `TIMESTAMP` | When trading opened | | `close_time` | `TIMESTAMP` | When trading closes. Reflects later changes to the close date, so it can be well past the originally scheduled time. | | `latest_expiration_time` | `TIMESTAMP` | Latest possible expiration time. | | `expected_expiration_time` | `TIMESTAMP` | When the outcome is expected to be known. The scheduled boundary to use for markets that have not settled yet; usually much closer to actual settlement than latest_expiration_time. | | `settlement_ts` | `TIMESTAMP` | When the market settled, falling back to its determination time. NULL until the market resolves. | | `determination_ts` | `TIMESTAMP` | When the outcome was determined. Precedes settlement and is populated whenever result is. | | `status` | `VARCHAR` | Market lifecycle state, derived from the market's lifecycle events, falling back to the snapshot and the open/close times. Values, in order of precedence: finalized (settled), determined (outcome known), inactive (deactivated), closed (past close time), active (open for trading), initialized (not yet open). | | `result` | `VARCHAR` | Settlement outcome: yes, no, void (refund) or scalar (fractional payout). NULL until the market is determined. Binary results are reconciled to settlement_value_usd, which is authoritative. | | `settlement_value_usd` | `DOUBLE` | Payout per contract at settlement, in USD. Authoritative: a yes/no result that contradicts it is corrected to match. | | `expiration_value` | `VARCHAR` | Expiration outcome value | | `can_close_early` | `BOOLEAN` | Whether the market can close before expiration | | `early_close_condition` | `VARCHAR` | Condition that triggers early close | | `notional_value_dollars` | `DOUBLE` | Notional value of one contract in USD | | `strike_type` | `VARCHAR` | Strike type: custom, greater, greater_or_equal, less, less_or_equal, between, or structured. | | `floor_strike` | `DOUBLE` | Lower bound for range/threshold markets | | `cap_strike` | `DOUBLE` | Upper bound for range markets | | `custom_strike` | `VARCHAR` | JSON blob with structured strike metadata (e.g., competitor ID, team ID) | | `fractional_trading_enabled` | `BOOLEAN` | Whether fractional contract trading is enabled | | `rules_primary` | `VARCHAR` | Primary resolution rules text | | `rules_secondary` | `VARCHAR` | Secondary resolution rules text, covering edge cases and settlement sources | | `settlement_timer_seconds` | `INTEGER` | Delay between determination and settlement, in seconds | | `is_provisional` | `BOOLEAN` | Whether the market is provisional and may be withdrawn before opening | | `primary_participant_key` | `VARCHAR` | Identifier of the market's primary participant (team, candidate, or entity). Populated for only some markets. | | `price_ranges` | `VARCHAR` | JSON array describing the tradeable price grid (start, end, step) | | `mve_collection_id` | `VARCHAR` | Multivariate event (MVE) collection grouping related events under one umbrella. NULL for non-MVE markets. | | `legs` | `VARCHAR` | JSON array of the parlay's legs, each with its event ticker, market ticker, and required side. NULL for single markets. | | `leg_count` | `BIGINT` | Number of legs in the parlay. NULL for single markets. | | `is_parlay` | `BOOLEAN` | Whether this market is a multi-leg parlay. See legs and leg_count for the legs. | | `series_id` | `VARCHAR` | Recurring series the event belongs to; carries the category, tags, fee terms and cadence. Kalshi calls this the series_ticker. Inferred from event_id when Kalshi published no event metadata. | | `event_title` | `VARCHAR` | Parent event title | | `event_sub_title` | `VARCHAR` | Parent event subtitle | | `collateral_return_type` | `VARCHAR` | How collateral is returned | | `mutually_exclusive` | `BOOLEAN` | Whether event outcomes are mutually exclusive | | `available_on_brokers` | `BOOLEAN` | Whether available via broker integrations | | `product_metadata` | `VARCHAR` | JSON blob with additional product metadata | | `category` | `VARCHAR` | Unified category shared across prediction-market venues: sports, crypto, politics, finance, technology, culture, weather, world, health, other, or mixed (a parlay whose legs span several categories). A parlay takes its category from its legs rather than from its own series. | | `category_native` | `VARCHAR` | Kalshi's own coarse category, taken from the series and falling back to the event. | | `competition` | `VARCHAR` | Competition name from product_metadata, such as a sports league or a crypto asset | | `strike_date` | `TIMESTAMP` | Strike/resolution date from event metadata | | `strike_period` | `VARCHAR` | Strike period description from event metadata | | `series_title` | `VARCHAR` | Human-readable series name | | `series_tags` | `ARRAY(VARCHAR)` | Series topic tags. Finer-grained than category_native and the main input to category. | | `settlement_sources` | `VARCHAR` | JSON array of the series' settlement sources, each with a name and URL | | `contract_terms_url` | `VARCHAR` | Link to the series' contract terms document | | `frequency` | `VARCHAR` | Series recurrence cadence: custom, one_off, annual, monthly, weekly, daily, hourly, or fifteen_min. | | `fee_type` | `VARCHAR` | Series fee model: quadratic (taker fees only), quadratic_with_maker_fees or quadratic_with_combo_maker_fees. | | `fee_multiplier` | `DOUBLE` | Series fee scalar applied on top of Kalshi's standard fee coefficients (1.0 = standard rate). Used in fee_usd on kalshi.market_trades. | | `_updated_at` | `TIMESTAMP` | When the row was last written by the pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=market_details_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=market_details_v2) ## Query performance `market_details` is partitioned by `created_date`, the UTC date the market was created. Filter on `created_date` when you only need recently listed markets. Lookups by `market_id`, status or settlement time still work, but they read the whole table. ```sql theme={null} -- Markets listed in the last 7 days SELECT market_id, title, status FROM kalshi.market_details_v2 WHERE created_date >= CURRENT_DATE - INTERVAL '7' DAY ``` ## Example queries Single markets settled in the last 7 days, by category and result: ```sql theme={null} SELECT category, result, COUNT(*) AS markets FROM kalshi.market_details_v2 WHERE status = 'finalized' AND settlement_ts >= NOW() - INTERVAL '7' DAY AND NOT is_parlay GROUP BY 1, 2 ORDER BY 3 DESC ``` Active sports markets by 7-day USD volume: ```sql theme={null} SELECT md.market_id, md.event_title, md.title, SUM(t.amount_usd) AS volume_usd_7d FROM kalshi.market_details_v2 md JOIN kalshi.market_trades t ON t.market_id = md.market_id WHERE md.status = 'active' AND md.category = 'sports' AND t.block_month >= DATE_TRUNC('month', CURRENT_DATE) - INTERVAL '1' MONTH AND t.created_time >= NOW() - INTERVAL '7' DAY GROUP BY 1, 2, 3 ORDER BY 4 DESC LIMIT 20 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `market_id` | `VARCHAR` | Unique market identifier, one binary contract (e.g. `KXBTCD-26APR04-T99499.99`). Kalshi calls this the ticker | > | `event_id` | `VARCHAR` | Parent event: the group of markets resolving off the same underlying occurrence. Kalshi calls this the event ticker | > | `market_type` | `VARCHAR` | Market type (e.g. `binary`) | > | `title` | `VARCHAR` | Market question text | > | `subtitle` | `VARCHAR` | Market subtitle | > | `yes_sub_title` | `VARCHAR` | Label for the Yes outcome. For threshold and range markets it reflects the strike | > | `no_sub_title` | `VARCHAR` | Label for the No outcome | > | `created_time` | `TIMESTAMP` | When the market was created | > | `updated_time` | `TIMESTAMP` | When the market was last updated upstream | > | `open_time` | `TIMESTAMP` | When trading opened | > | `close_time` | `TIMESTAMP` | When trading closes. Reflects later changes to the close date, so it can be well past the originally scheduled time | > | `latest_expiration_time` | `TIMESTAMP` | Latest possible expiration time | > | `expected_expiration_time` | `TIMESTAMP` | When the outcome is expected to be known. The scheduled boundary to use for markets that have not settled yet; usually much closer to actual settlement than `latest_expiration_time` | > | `settlement_ts` | `TIMESTAMP` | When the market settled, falling back to its determination time. NULL until the market resolves | > | `determination_ts` | `TIMESTAMP` | When the outcome was determined. Precedes settlement and is populated whenever `result` is | > | `status` | `VARCHAR` | Lifecycle state, in order of precedence: `finalized` (settled), `determined` (outcome known), `inactive` (deactivated), `closed` (past close time), `active` (open for trading), `initialized` (not yet open) | > | `result` | `VARCHAR` | Settlement outcome: `yes`, `no`, `void` (refund) or `scalar` (fractional payout). NULL until the market is determined. Binary results are reconciled to `settlement_value_usd` | > | `settlement_value_usd` | `DOUBLE` | Payout per contract at settlement, in USD. Authoritative: a `yes`/`no` result that contradicts it is corrected to match | > | `expiration_value` | `VARCHAR` | Expiration outcome value | > | `can_close_early` | `BOOLEAN` | Whether the market can close before expiration | > | `early_close_condition` | `VARCHAR` | Condition that triggers early close | > | `notional_value_dollars` | `DOUBLE` | Notional value of one contract in USD | > | `strike_type` | `VARCHAR` | Strike structure: `custom`, `greater`, `greater_or_equal`, `less`, `less_or_equal`, `between` or `structured` | > | `floor_strike` | `DOUBLE` | Lower bound for range and threshold markets | > | `cap_strike` | `DOUBLE` | Upper bound for range markets | > | `custom_strike` | `VARCHAR` | JSON blob with structured strike metadata (e.g. competitor ID, team ID) | > | `fractional_trading_enabled` | `BOOLEAN` | Whether fractional contract trading is enabled | > | `rules_primary` | `VARCHAR` | Primary resolution rules text | > | `rules_secondary` | `VARCHAR` | Secondary resolution rules text, covering edge cases and settlement sources | > | `settlement_timer_seconds` | `INTEGER` | Delay between determination and settlement, in seconds | > | `is_provisional` | `BOOLEAN` | Whether the market is provisional and may be withdrawn before opening | > | `primary_participant_key` | `VARCHAR` | Identifier of the market's primary participant (team, candidate or entity). Populated for only some markets | > | `price_ranges` | `VARCHAR` | JSON array describing the tradeable price grid (start, end, step) | > | `mve_collection_id` | `VARCHAR` | Multivariate event (MVE) collection grouping related events under one umbrella. NULL for non-MVE markets | > | `legs` | `VARCHAR` | JSON array of the parlay's legs, each with its event ticker, market ticker and required side. NULL for single markets | > | `leg_count` | `BIGINT` | Number of legs in the parlay. NULL for single markets | > | `is_parlay` | `BOOLEAN` | Whether this market is a multi-leg parlay. See `legs` and `leg_count` | > | `series_id` | `VARCHAR` | Recurring series the event belongs to; carries the category, tags, fee terms and cadence. Kalshi calls this the series ticker. Inferred from `event_id` when Kalshi published no event metadata | > | `event_title` | `VARCHAR` | Parent event title | > | `event_sub_title` | `VARCHAR` | Parent event subtitle | > | `collateral_return_type` | `VARCHAR` | How collateral is returned | > | `mutually_exclusive` | `BOOLEAN` | Whether event outcomes are mutually exclusive | > | `available_on_brokers` | `BOOLEAN` | Whether available via broker integrations | > | `product_metadata` | `VARCHAR` | JSON blob with additional product metadata | > | `category` | `VARCHAR` | Unified category shared across prediction market venues: `sports`, `crypto`, `politics`, `finance`, `technology`, `culture`, `weather`, `world`, `health`, `other`, or `mixed` for a parlay whose legs span several categories. A parlay takes its category from its legs rather than from its own series | > | `category_native` | `VARCHAR` | Kalshi's own coarse category, taken from the series and falling back to the event | > | `competition` | `VARCHAR` | Competition name from `product_metadata`, such as a sports league or a crypto asset | > | `strike_date` | `TIMESTAMP` | Strike/resolution date from event metadata | > | `strike_period` | `VARCHAR` | Strike period description from event metadata | > | `series_title` | `VARCHAR` | Human-readable series name | > | `series_tags` | `ARRAY(VARCHAR)` | Series topic tags. Finer-grained than `category_native` and the main input to `category` | > | `settlement_sources` | `VARCHAR` | JSON array of the series' settlement sources, each with a name and URL | > | `contract_terms_url` | `VARCHAR` | Link to the series' contract terms document | > | `frequency` | `VARCHAR` | Series recurrence cadence: `custom`, `one_off`, `annual`, `monthly`, `weekly`, `daily`, `hourly` or `fifteen_min` | > | `fee_type` | `VARCHAR` | Series fee model: `quadratic` (taker fees only), `quadratic_with_maker_fees` or `quadratic_with_combo_maker_fees` | > | `fee_multiplier` | `DOUBLE` | Series fee scalar applied on top of Kalshi's standard fee coefficients (`1.0` = standard rate). Used in `fee_usd` and `maker_fee_usd` on `kalshi.market_trades` | > | `source_updated_at` | `TIMESTAMP` | When the market's data last changed at Kalshi, across the market itself, its event, its series, its lifecycle events and its pricing snapshot | > | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline | # kalshi.market_report Source: https://docs.dune.com/data-catalog/curated/prediction-markets/kalshi/market_report Kalshi market metadata — event contract details, categories, settlement rules, and current status. > [!NOTE] > > Current version: **v1** > > . The `kalshi.market_report` table contains market-level metadata for Kalshi event contracts, including ticker, title, category, and lifecycle status. > [!NOTE] > > **Source:** Public Kalshi reports · **Granularity:** Daily · Coverage and granularity match what Kalshi includes in its own published reports, so only the subset of markets Kalshi reports on appears here, at daily aggregation. ## Table Schema | Column | Type | Description | | - | - | - | | `block_volume` | `DOUBLE` | Trading volume for the block period | | `category` | `VARCHAR` | Category of the event contract (e.g., Politics, Economics, Sports, etc.) | | `daily_volume` | `DOUBLE` | Total trading volume for the day | | `date` | `VARCHAR` | Date of the market report | | `high` | `DOUBLE` | Highest price reached during the reporting period | | `low` | `DOUBLE` | Lowest price reached during the reporting period | | `open_interest` | `DOUBLE` | Total number of outstanding contracts | | `payout_type` | `VARCHAR` | Type of payout for the event contract | | `report_ticker` | `VARCHAR` | Unique ticker identifier for the market report | | `status` | `VARCHAR` | Current status of the event contract market | | `ticker_name` | `VARCHAR` | Name or description of the event contract ticker | | `_updated_at` | `TIMESTAMP` | Last update timestamp | | `_ingested_at` | `TIMESTAMP` | Ingestion timestamp | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=market_report](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=market_report) # kalshi.market_trades Source: https://docs.dune.com/data-catalog/curated/prediction-markets/kalshi/market_trades Kalshi per-fill trade table — one row per fill with P(Yes), USD notional, and estimated taker and maker fees. > [!NOTE] > > Current version: **v1** > > . The `kalshi.market_trades` table contains per-fill trade activity on Kalshi. Grain: one row per Kalshi fill (`trade_id`). Rows are written once and never change. Each row carries the side the taker bought, prices for both sides, the probability of Yes, the USD value of the fill, and estimated taker and maker fees. Market metadata is not repeated here. Join [`kalshi.market_details`](/data-catalog/curated/prediction-markets/kalshi/market_details) on `market_id` for the current title, status, result, category and fee terms; every fill has a matching market row. Fills on tickers Kalshi never published a market record for are excluded. > [!NOTE] > > Kalshi nets positions, so every fill is reported as a buy of the side the taker ends up long: selling Yes appears as buying No (`taker_outcome_side = 'no'`). ## Table Schema | Column | Type | Description | | - | - | - | | `trade_id` | `VARCHAR` | Unique trade identifier | | `market_id` | `VARCHAR` | Market identifier (Kalshi ticker). Every value has a row in `kalshi.market_details` | | `created_time` | `TIMESTAMP` | When the trade occurred | | `block_month` | `DATE` | First day of the calendar month of `created_time` (partition key) | | `taker_outcome_side` | `VARCHAR` | Side the taker bought: `yes` or `no` | | `num_contracts` | `DOUBLE` | Number of contracts traded. May be fractional | | `yes_price_dollars` | `DOUBLE` | Price paid for the Yes side | | `no_price_dollars` | `DOUBLE` | Price paid for the No side | | `price` | `DOUBLE` | Probability of Yes implied by this fill, equal to `yes_price_dollars`. Matches the price convention of the `prediction_markets` tables | | `amount_usd` | `DOUBLE` | Cash value of the fill in USD: the taker's price (Yes or No price, per `taker_outcome_side`) times `num_contracts` | | `fee_usd` | `DOUBLE` | Estimated taker fee in USD. Kalshi publishes no per-fill fee, so this is derived from its fee schedule and rounded up to the centicent as Kalshi does: `ceil(0.07 × fee_multiplier × yes_price × (1 − yes_price) × num_contracts × 10000) / 10000`. Uses the series' current fee terms. NULL when the series has no fee terms | | `maker_fee_usd` | `DOUBLE` | Estimated maker fee in USD, charged on top of `fee_usd` to the resting order. Same formula as `fee_usd` with coefficient `0.0175` on `quadratic_with_maker_fees` series and `0.035` on `quadratic_with_combo_maker_fees`; `0` on `quadratic` series, which charge no maker fee. NULL when the series has no fee terms. Total exchange fee on the fill is `fee_usd + maker_fee_usd` | | `event_id` | `VARCHAR` | Parent event identifier | | `series_id` | `VARCHAR` | Recurring series the market's event belongs to | | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=market_trades](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=market_trades) ## Query performance `block_month` is the partition key. Always include a `block_month` or `created_time` filter for trade-history queries. ```sql theme={null} -- ✅ Good: bounded by partition SELECT * FROM kalshi.market_trades WHERE block_month >= DATE '2026-04-01' AND market_id = 'KXNHLGAME-26MAY03MINCOL-MIN' ``` ## Example query ```sql theme={null} -- Top markets by USD volume and fees in the last 7 days SELECT t.market_id, md.title, COUNT(*) AS num_trades, SUM(t.amount_usd) AS total_volume_usd, SUM(t.fee_usd + COALESCE(t.maker_fee_usd, 0)) AS estimated_fees_usd FROM kalshi.market_trades t JOIN kalshi.market_details md ON md.market_id = t.market_id WHERE t.block_month >= DATE_TRUNC('month', CURRENT_DATE) - INTERVAL '1' MONTH AND t.created_time >= NOW() - INTERVAL '7' DAY GROUP BY 1, 2 ORDER BY 4 DESC LIMIT 20 ``` # kalshi.ohlcv_hourly Source: https://docs.dune.com/data-catalog/curated/prediction-markets/kalshi/ohlcv_hourly Kalshi hourly OHLCV candles — per-market open/high/low/close/volume with VWAP and trade count. The `kalshi.ohlcv_hourly` table provides hourly OHLCV (Open-High-Low-Close-Volume) candles per Kalshi market. Grain: one row per `(hour, market_id, outcome)`. Candles are built on the Yes price (the No price is `1 - Yes`). Hours without trades are a **flat bar at the carried close** with volume and trade count set to zero, flagged via `is_forward_filled`. Only markets with at least one fill have candles. **Settlement.** Once a market settles, the bar at its settlement hour is pinned to the settled payout per contract: `close` becomes `1` for `yes`, `0` for `no`, or the scalar payout; `high`/`low` widen to include it; `open` keeps the last traded price. Forward-fill stops at that bar, while real trades after settlement keep their actual prices. Until a market settles, its candle series runs to its `expected_expiration_time` without resolving it, and later trades extend it. > [!NOTE] > > `market_outcome` is **point-in-time per bar**: `unresolved` until the market has settled and the bar is at or after the settlement hour, then the settled result from that bar onward. Historical bars are never relabeled, and the other metadata columns keep the values they were written with. [`kalshi.market_details`](/data-catalog/curated/prediction-markets/kalshi/market_details) is the authoritative source for a market's *current* state. ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | First day of the UTC month of `hour` (partition key) | | `hour` | `TIMESTAMP` | UTC hour bucket for the candle | | `market_id` | `VARCHAR` | Kalshi market ticker. Joins `kalshi.market_details` on `market_id` | | `market_name` | `VARCHAR` | Market question text | | `outcome` | `VARCHAR` | Always `Yes`. Candles are built on the Yes price; the No price is `1 - Yes` | | `yes_outcome_name` | `VARCHAR` | Human-readable label for the Yes side, such as a team, candidate or price range. Falls back to a label built from the market's strike, then to `Yes`. Use this as the outcome label; `outcome` is only the side flag | | `category` | `VARCHAR` | Unified category (`sports`, `crypto`, `politics`, `finance`, `technology`, `culture`, `weather`, `world`, `health`, `other`, `mixed`) as written with the bar. `kalshi.market_details` carries the current value | | `open` | `DOUBLE` | First trade price in the hour. Equal to the carried close on forward-filled hours. On the settlement bar it keeps the last traded price; settlement pins only the close | | `high` | `DOUBLE` | Highest trade price in the hour. Equal to the carried close on forward-filled hours. On the settlement bar, widened to include the settled payout | | `low` | `DOUBLE` | Lowest trade price in the hour. Equal to the carried close on forward-filled hours. On the settlement bar, widened to include the settled payout | | `close` | `DOUBLE` | Last trade price in the hour, carried forward through no-trade hours. On the settlement bar, pinned to the settled payout per contract (`1` for yes, `0` for no, the scalar payout otherwise); bars from real trades after settlement keep their actual close | | `vwap` | `DOUBLE` | Volume-weighted average price. NULL for forward-filled hours | | `volume_contracts` | `DOUBLE` | Contracts traded in the hour, counting each fill once. Zero for forward-filled hours | | `volume_usd` | `DOUBLE` | USD traded in the hour. Zero for forward-filled hours | | `trade_count` | `BIGINT` | Number of trades in the hour. Zero for forward-filled hours | | `market_end_time` | `TIMESTAMP` | End of the candle series: the market's settlement (or determination) time once known, otherwise its expected expiration time. Trades after an unsettled market's expected expiration extend the series past it | | `expected_expiration_time` | `TIMESTAMP` | When the outcome is expected to be known, from `kalshi.market_details`. Bounds the candle series until the market resolves | | `market_outcome` | `VARCHAR` | The market's state at this hour (point-in-time): `unresolved` until the market has settled and this bar is at or after the settlement hour, then the settled `result` from `kalshi.market_details` from that bar onward. Reaching the expected expiration does not resolve a market | | `event_market_name` | `VARCHAR` | Parent event title, falling back to the market title | | `is_forward_filled` | `BOOLEAN` | TRUE when the bar has no trades and was carried forward | | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=ohlcv_hourly](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=ohlcv_hourly) ## Query performance `block_month` is the partition key. Always include a `block_month` or `hour` filter for time-series queries. ## Example query ```sql theme={null} -- Hourly price path for a single market SELECT hour, open, high, low, close, volume_contracts, market_outcome FROM kalshi.ohlcv_hourly WHERE market_id = 'KXNHLGAME-26MAY03MINCOL-MIN' AND block_month >= DATE '2026-05-01' ORDER BY hour ``` # kalshi.open_interest_hourly Source: https://docs.dune.com/data-catalog/curated/prediction-markets/kalshi/open_interest_hourly Kalshi hourly open interest and traded volume per single market, from the first open contract to settlement. > [!NOTE] > > Current version: **v1** > > . The `kalshi.open_interest_hourly` table provides hourly open interest and traded volume per Kalshi single market. Grain: one row per `(hour, market_id)`, with a row for every hour from the market's first open contract to its settlement. An unsettled market runs to its expected expiration. Open interest is a level at the end of the hour; volume is the flow within it. The layout matches [`polymarket_polygon.open_interest_hourly`](/data-catalog/curated/prediction-markets/polymarket/open_interest_hourly) and [`hip4_hyperliquid.open_interest_hourly`](/data-catalog/curated/prediction-markets/hip4/open_interest_hourly). Open interest comes from the snapshots on Kalshi's live ticker stream. It is not rebuilt from trades. An hour with no update carries the last published value. Coverage starts on May 11, 2026, when the stream came online, so there is no earlier history. Every Kalshi contract has one Yes holder and one No holder, so the two sides are always equal. As a result, summing `market_oi_yes_contracts` across markets gives the same total as the example query. Every row is the state at the end of its hour. A settled market has no open interest, so the settlement hour reads zero and is the market's last row. The latest hours show up once Kalshi's settlements through those hours are recorded, so the table runs a little behind real time. > [!NOTE] > > Parlays are not included, so totals cover single markets only. A market nobody has ever held has no rows. > [!WARNING] > > `event_oi_contracts` is repeated on every member row of an event. Summing it across members overstates event open interest. Take it once per `event_id` and `hour`. Prices are in [`kalshi.ohlcv_hourly`](/data-catalog/curated/prediction-markets/kalshi/ohlcv_hourly). ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | First day of the UTC month of `hour`. Partition key | | `hour` | `TIMESTAMP` | UTC hour the figures describe. Open interest is the level at the end of it, volume the flow within it | | `market_id` | `VARCHAR` | Kalshi market ticker. Joins `kalshi.market_details` on `market_id` | | `event_id` | `VARCHAR` | Event this market is one outcome of, when the event's outcomes are mutually exclusive. NULL for a market whose event allows several outcomes to win. Such a market counts as its own event | | `market_oi_yes_contracts` | `DOUBLE` | Yes contracts outstanding at the end of the hour, each open contract counted once. Each contract pays \$1 | | `market_oi_no_contracts` | `DOUBLE` | No contracts outstanding at the end of the hour. Always equal to the Yes side | | `event_oi_contracts` | `DOUBLE` | Collateral locked behind the market's event at the end of the hour: the Yes contracts of one member plus the No contracts of every other member, which is the payout whichever outcome wins. Equal to the Yes side on a standalone market | | `volume_contracts` | `DOUBLE` | Contracts that changed hands in the hour, each fill counted once | | `volume_usd` | `DOUBLE` | Cash that changed hands in the hour in USD, each fill counted once from the taker's side | | `trade_count` | `BIGINT` | Fills in the hour | | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=open_interest_hourly](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=open_interest_hourly) ## Query performance `block_month` is the partition key. Always include a `block_month` or `hour` filter. ## Example query ```sql theme={null} -- Total open interest at the end of each UTC day, last 30 days. -- event_oi_contracts repeats on every market of an event, so take it once per event. -- A market without an event_id is its own event. WITH per_event AS ( SELECT CAST(hour AS DATE) AS day, COALESCE(event_id, market_id) AS event_key, MAX(event_oi_contracts) AS open_interest_contracts FROM kalshi.open_interest_hourly WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '30' DAY) AND hour >= CURRENT_DATE - INTERVAL '30' DAY AND HOUR(hour) = 23 -- the 23:00 row is the level at the end of the day GROUP BY 1, 2 ) SELECT day, SUM(open_interest_contracts) AS open_interest_contracts FROM per_event GROUP BY 1 ORDER BY 1 ``` # Kalshi Source: https://docs.dune.com/data-catalog/curated/prediction-markets/kalshi/overview Curated Kalshi prediction market datasets on Dune Kalshi is a regulated prediction market (CFTC-regulated exchange) offering event contracts on real-world outcomes. Dune provides Kalshi market reference data, per-fill trades and hourly candles, plus legacy aggregated reporting tables. > [!NOTE] > > **Maintained by:** Dune (partner data) · **Refresh:** \~1 hour · **Source:** Off-chain (Kalshi) ## Available Tables > [card] [kalshi.market_details](/data-catalog/curated/prediction-markets/kalshi/market_details) > > One row per market with lifecycle status, settlement, strike structure, rules, parlay legs, and event and series metadata > [card] [kalshi.market_trades](/data-catalog/curated/prediction-markets/kalshi/market_trades) > > Per-fill trade activity with P(Yes), USD notional, and estimated taker and maker fees > [card] [kalshi.ohlcv_hourly](/data-catalog/curated/prediction-markets/kalshi/ohlcv_hourly) > > Hourly OHLCV candles with VWAP, volume, and trade count > [card] [kalshi.open_interest_hourly](/data-catalog/curated/prediction-markets/kalshi/open_interest_hourly) > > Hourly open interest and traded volume per single market > [card] [kalshi.market_report](/data-catalog/curated/prediction-markets/kalshi/market_report) > > Legacy daily market-level reporting > [card] [kalshi.trade_report](/data-catalog/curated/prediction-markets/kalshi/trade_report) > > Legacy daily aggregated trade reporting (not individual fills) ## Notes * `market_details`, `market_trades`, `ohlcv_hourly`, and `open_interest_hourly` are the current Kalshi tables. `market_report` and `trade_report` are legacy daily-aggregated tables kept for historical continuity. * `market_id` is Kalshi's ticker and is the join key across the current tables. `event_id` and `series_id` are Kalshi's event and series tickers. * `market_details` covers every single market Kalshi has listed, traded or not, plus every parlay with at least one fill. `market_trades` and `ohlcv_hourly` only cover markets that have traded, so an untraded market has a details row but no trades or candles. * `market_trades` carries no market metadata; join `market_details` on `market_id` for the title, status, result and fee terms. * `trade_report` aggregates by date and price level, so a single `(date, ticker)` can produce multiple rows. # kalshi.trade_report Source: https://docs.dune.com/data-catalog/curated/prediction-markets/kalshi/trade_report Kalshi trade data — individual trades on event contracts with price, size, and execution details. > [!NOTE] > > Current version: **v1** > > . The `kalshi.trade_report` table contains daily aggregated trade data for Kalshi event contracts. Note that a single date and ticker can have multiple rows at different price points — this is not individual fill data. > [!NOTE] > > **Source:** Public Kalshi reports · **Granularity:** Daily · Coverage and granularity match what Kalshi includes in its own published reports, so only the subset of markets Kalshi reports on appears here, at daily aggregation. ## Table Schema | Column | Type | Description | | - | - | - | | `contracts_traded` | `DOUBLE` | Number of contracts traded in the transaction | | `date` | `VARCHAR` | Date of the trade report | | `price` | `DOUBLE` | Price at which the contracts were traded | | `report_ticker` | `VARCHAR` | Unique ticker identifier for the trade report | | `ticker_name` | `VARCHAR` | Name or description of the event contract ticker | | `_updated_at` | `TIMESTAMP` | Last update timestamp | | `_ingested_at` | `TIMESTAMP` | Ingestion timestamp | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=trade_report](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kalshi\&table_name_t6f0df=trade_report) # Migrating to v2 Source: https://docs.dune.com/data-catalog/curated/prediction-markets/migrating-to-v2 What changes in the v2 prediction market tables and how to move your queries over, table by table. ## What changes * **Polymarket markets carry Polymarket's own metadata.** Every listed market now has its Polymarket event and series, plus strikes, teams, scores, fees and oracle settings, as published on [polymarket.com](https://polymarket.com). * **One naming standard across venues.** Polymarket uses the same identifier columns as Kalshi and Hyperliquid HIP-4: `market_id`, `event_id` and `outcome_id`. * **New tables, side by side.** Each v2 table has the name of its v1 table plus `_v2`, for example `polymarket_polygon.market_trades_v2`. Both versions carry full history. The v1 tables stay available. * **Breaking for Polymarket queries.** Several Polymarket columns are renamed and `event_id` changes value, so v1 queries fail or return different results on v2. > [!NOTE] > > The table version is not the exchange version. Polymarket's exchange contracts also have versions, which the `contract_version` column (`v1`, `v2`, `v3`) reports in both table versions. ## Migrate in three steps **1. Point your queries at the \_v2 tables** Add `_v2` to every table name in the [table map](#table-map) below. Tables without a v2 keep their names, except `polymarket_polygon.market_prices_hourly`, which moves to `polymarket_polygon.ohlcv_hourly_v2`. **2. Rename the Polymarket identifier columns** Replace `condition_id` and `combo_condition_id` with `market_id`, and `token_id`, `asset_id` and `position_id` with `outcome_id`. The values do not change. [Identifiers](#identifiers) has the details and [common renames](#common-renames) covers the other columns. **3. Check event_id and removed columns** Polymarket `event_id` now holds Polymarket's event id instead of the neg-risk group id; use `neg_risk_market_id` where you relied on the old value. Then open each table you use under [table by table](#table-by-table) for removed columns and their replacements. ## Identifiers Some Polymarket questions are split into several markets of which exactly one resolves Yes, such as one market per candidate in an election. Polymarket calls these neg-risk markets. In v1, `event_id` held the id of that group of markets; in v2 it holds Polymarket's event id. | Column | v1 | v2 | | - | - | - | | `market_id` | The market's on-chain id, called the condition id (`0x…`). Called `condition_id` on `market_details`, `market_trades`, `market_actions` and `market_prices_hourly`, and `combo_condition_id` on the combo tables. | Called `market_id` on every Polymarket table, combos included. Values unchanged. | | `outcome_id` | Called `token_id` on `market_details`, `combo_details`, `positions`, `ohlcv_hourly` and `market_prices_hourly`, `asset_id` on `market_trades` and `combo_trades`, and `position_id` on `combo_actions`. | Called `outcome_id` on every Polymarket table. Values unchanged: the token id of one side of a market. | | `event_id` | The id of the neg-risk group (`0x…`), set only on neg-risk markets. | Polymarket's event id (a numeric string), set on every market Polymarket lists. The old value is in `neg_risk_market_id`. | | `series_id` | Always `NULL` on Polymarket. | Polymarket's id of the recurring series the event belongs to; `NULL` outside a series. | A small number of markets, almost all archived or closed and with a negligible share of volume, are not listed by Polymarket. They keep their `market_id` and stay in every table, but the columns that come from Polymarket's website, such as event and series, are `NULL`. Renamed columns keep their v1 types. `market_id` is therefore `VARBINARY` in `market_trades_v2`, `market_actions_v2` and the combo tables, and a `0x…` `VARCHAR` in `market_details_v2`, `ohlcv_hourly_v2`, `open_interest_hourly_v2`, `positions_v2` and the cross-venue tables. Join across the two with `CAST(market_id AS VARCHAR)` on the `VARBINARY` side, or join on `outcome_id`, which is `UINT256` everywhere. ## Common renames These renames apply in every Polymarket table that has the column. | v1 column | v2 column | Notes | | - | - | - | | `token_outcome` | `outcome_name` | The side's label, such as Yes, No, Up or a team name | | `event_market_id` | `neg_risk_market_id` | Values unchanged | | `neg_risk` | `is_mutually_exclusive_event` | Now a `BOOLEAN`; v1 stored the text `'True'` or `'False'` | | `event_market_name` | `event_title` | Now Polymarket's event title, set on every listed market | | `event_market_description` | `event_description` | | | `polymarket_link` | `link` | Now a plain URL to the event page; v1 stored an HTML link tag | | `game_start_time` | `scheduled_start_time` | | | `settlement_value` | `settlement_value_usd` | Values unchanged | | `resolved_on_timestamp`, `resolved_at` | `settlement_ts` | Values unchanged | | `token_outcome_name` | removed | It was `outcome_name`, a dash and the question in one string | | `unique_key`, `_unique_key` | removed | Use `market_id`, `outcome_id` or `trade_id` | ## Table map | v1 table | v2 table | Change | | - | - | - | | `polymarket_polygon.market_details` | [`polymarket_polygon.market_details_v2`](/data-catalog/curated/prediction-markets/polymarket/market_details) | Breaking | | `polymarket_polygon.market_trades` | [`polymarket_polygon.market_trades_v2`](/data-catalog/curated/prediction-markets/polymarket/market_trades) | Breaking | | `polymarket_polygon.market_actions` | [`polymarket_polygon.market_actions_v2`](/data-catalog/curated/prediction-markets/polymarket/market_actions) | Breaking | | `polymarket_polygon.market_prices_hourly` | [`polymarket_polygon.ohlcv_hourly_v2`](/data-catalog/curated/prediction-markets/polymarket/ohlcv_hourly) | Replaced | | `polymarket_polygon.ohlcv_hourly` | [`polymarket_polygon.ohlcv_hourly_v2`](/data-catalog/curated/prediction-markets/polymarket/ohlcv_hourly) | Breaking | | `polymarket_polygon.positions` | [`polymarket_polygon.positions_v2`](/data-catalog/curated/prediction-markets/polymarket/positions) | Breaking | | `polymarket_polygon.open_interest_hourly` | [`polymarket_polygon.open_interest_hourly_v2`](/data-catalog/curated/prediction-markets/polymarket/open_interest_hourly) | Values change | | `polymarket_polygon.combo_details` | [`polymarket_polygon.combo_details_v2`](/data-catalog/curated/prediction-markets/polymarket/combo_details) | Breaking | | `polymarket_polygon.combo_trades` | [`polymarket_polygon.combo_trades_v2`](/data-catalog/curated/prediction-markets/polymarket/combo_trades) | Breaking | | `polymarket_polygon.combo_actions` | [`polymarket_polygon.combo_actions_v2`](/data-catalog/curated/prediction-markets/polymarket/combo_actions) | Breaking | | `polymarket_polygon.users_address_lookup` | [`polymarket_polygon.users_address_lookup_v2`](/data-catalog/curated/prediction-markets/polymarket/users_address_lookup) | Values change | | `prediction_markets.markets` | [`prediction_markets.markets_v2`](/data-catalog/curated/prediction-markets/prediction_markets/markets) | Breaking | | `prediction_markets.trades` | [`prediction_markets.trades_v2`](/data-catalog/curated/prediction-markets/prediction_markets/trades) | Values change | | `prediction_markets.ohlcv_hourly` | [`prediction_markets.ohlcv_hourly_v2`](/data-catalog/curated/prediction-markets/prediction_markets/ohlcv_hourly) | Values change | | `prediction_markets.open_interest_hourly` | [`prediction_markets.open_interest_hourly_v2`](/data-catalog/curated/prediction-markets/prediction_markets/open_interest_hourly) | Values change | | `kalshi.market_details` | [`kalshi.market_details_v2`](/data-catalog/curated/prediction-markets/kalshi/market_details) | Breaking | | `kalshi.ohlcv_hourly` | [`kalshi.ohlcv_hourly_v2`](/data-catalog/curated/prediction-markets/kalshi/ohlcv_hourly) | Breaking | | `hip4_hyperliquid.market_details` | [`hip4_hyperliquid.market_details_v2`](/data-catalog/curated/prediction-markets/hip4/market_details) | Breaking | | `hip4_hyperliquid.market_trades` | [`hip4_hyperliquid.market_trades_v2`](/data-catalog/curated/prediction-markets/hip4/market_trades) | Same columns | | `hip4_hyperliquid.ohlcv_hourly` | [`hip4_hyperliquid.ohlcv_hourly_v2`](/data-catalog/curated/prediction-markets/hip4/ohlcv_hourly) | Breaking | **Breaking** means a column was renamed or removed, so v1 queries fail. **Values change** means the columns are the same but some values differ. **Replaced** means the table has no v2 and another v2 table carries its data. Tables without a v2, such as `kalshi.market_trades`, `kalshi.open_interest_hourly`, `hip4_hyperliquid.open_interest_hourly`, `hip4_hyperliquid.positions_daily` and `polymarket_polygon.combo_prices_hourly`, keep their names. ## Table by table Open a table to see every column that changes. Columns not listed are unchanged. > [accordion] polymarket_polygon.market_details_v2 (breaking) > > One row per outcome token, two per market, as in v1. Tokens, prices, outcomes and resolution still come from the order book and the chain. The new columns hold the latest values Polymarket publishes, not the values at trade time. > > | Column | Change | What it means for you | > | - | - | - | > | `market_id` | Renamed | Previously `condition_id`. Values unchanged; shared by the market's two tokens. | > | `outcome_id` | Renamed | Previously `token_id`. Values unchanged; one row per `outcome_id`. | > | `outcome_name` | Renamed | Previously `token_outcome`. | > | `status` | New | The market's lifecycle in one column: `active` while it trades, `closed` once trading has ended or the market was delisted, `settled` once its outcome is decided. The same values as `prediction_markets.markets_v2.status`. | > | `gamma_market_id` | New | Polymarket's own market id. `NULL` where Polymarket does not list the market, and then every column below that comes from Polymarket's website is `NULL` too. | > | `event_id` | New | The Polymarket event the market is listed under. | > | `event_title`, `event_slug`, `event_description` | New | The event's title, URL slug and description on polymarket.com. Replace `event_market_name` and `event_market_description`. | > | `parent_event_id` | New | The event this market's event is nested under, as sports side events (player props, exact score) are under their game. `NULL` for a top-level event. | > | `series_id`, `series_title`, `frequency` | New | The recurring series, its name, and how often it recurs: `five_min`, `fifteen_min`, `hourly`, `four_hour`, `daily`, `weekly`, `monthly` or `annual`. `NULL` outside a series. | > | `neg_risk_market_id` | Renamed | Previously `event_market_id`. Values unchanged; `NULL` when `is_mutually_exclusive_event` is false. | > | `is_mutually_exclusive_event` | Renamed | Previously `neg_risk`; the name Kalshi, HIP-4 and `prediction_markets.markets_v2` use. | > | `link` | Renamed | Previously `polymarket_link`, an HTML link tag whose target was often not a real page. Now a plain URL to the event page; `NULL` where Polymarket does not list the market. | > | `strike_type`, `floor_strike`, `cap_strike` | New | Strike of the Yes side (side 0), in the same notation as `kalshi.market_details_v2` and `prediction_markets.markets_v2`; see the examples below. `NULL` where a market has no numeric strike. | > | `sports_market_type` | New | Polymarket's sports market type, such as `moneyline`, `spreads`, `totals` or `soccer_exact_score`. `NULL` outside sports. | > | `yes_sub_title` | New | The market's label within its event: a team, a candidate or a price range. | > | `competition`, `home_team`, `away_team` | New | League of a sports event and its home and away team as Polymarket displays them. For esports `competition` is the game and for tennis the tour; the league is in `event_metadata`. The teams are `NULL` unless the event has exactly two. | > | `teams` | New | Every team or player of a sports event as JSON: id, name, display name (`alias`), abbreviation, league, and home or away. Also covers events with more than two sides. | > | `scheduled_start_time` | Renamed | Previously `game_start_time`. Same values where it was set, and now also filled from Polymarket's listing, such as the start of each Up/Down window. | > | `market_end_time` | Values change | Now the scheduled end time including the time of day; previously the date only, at midnight UTC. Still not the resolution time: use `settlement_ts`. | > | `game_end_time`, `score` | New | When the game finished, and its score: the latest score while a game is live, final once the event has closed. The format varies by sport. | > | `event_metadata`, `market_metadata` | New | Extra event and market details as JSON, such as the league, stage and format of a sports event, the start and final price of an Up/Down market, and the points line or player of a prop. | > | `settlement_source` | New | The source Polymarket names for resolving the market, usually a URL. | > | `fee_type`, `fee_rate`, `fee_exponent`, `maker_rebate_rate`, `is_fee_taker_only` | New | The market's fee schedule: name, rate, price exponent, the share of fees paid back to makers, and whether only takers pay. `NULL` where the market charges no fees. | > | `maker_base_fee_bps`, `taker_base_fee_bps` | New | Fee rates from Polymarket's older fee model, used on some 2023 and 2024 markets. On markets with a fee schedule, fees follow `fee_rate`. | > | `underlying`, `expiration_value` | New | On price markets, the ticker of the asset tracked (`BTC`, `NVDA`, `XAU`, `USD/JPY`, …), and on Up/Down markets the final price the market resolved against. | > | `election_type`, `election_country` | New | Type of an election event, and its country or region. | > | `uma_bond`, `uma_reward`, `liveness_seconds` | New | Settings of UMA, the oracle that resolves Polymarket markets: the bond posted to propose a result, the reward for an undisputed result (both in USD), and the dispute window in seconds (`0` means the default of two hours). | > | `is_other_outcome` | New | `TRUE` on the catch-all "Other" market of a multi-outcome event. | > | `settlement_value_usd`, `settlement_ts` | Renamed | Previously `settlement_value` and `resolved_on_timestamp`. Values unchanged. | > | `_updated_at` | New | When the row last changed; unchanged rows keep their stamp. Replaces `last_uploaded_at`, `content_hash` and `last_changed_at`. | > | `tags` | Values change | Now sorted alphabetically. | > | `token_outcome_name`, `unique_key` | Removed | See [common renames](#common-renames). | > | `active`, `enable_order_book` | Removed | `active` was true on nearly every market, closed ones included. Use `status` and `accepting_orders`. | > | `icon` | Removed | Identical to `image`. | > | `oracle`, `fee_bips` | Removed | Set only on neg-risk markets: `fee_bips` was always 0, and `oracle` was not the address that resolves the market. | > > How each kind of Polymarket market fills the strike columns for its Yes side: > > | Market type | Yes side | `strike_type` | Strikes | > | - | - | - | - | > | Totals (`O/U 1.5`) | Over | `greater` | The total line (1.5) | > | Spreads and handicaps (`Team A (-1.5)`) | Team A covers | `greater` | The margin Team A must win by (1.5); Polymarket lists the side giving the points first, so it is positive | > | Up/Down | Up | `greater_or_equal` | The reference price at the start of the window | > | Price bracket (`$1.70-1.80`) | The price ends in the bracket | `between` | `floor_strike` 1.70, `cap_strike` 1.80; a price exactly on the boundary belongs to the higher bracket | > | Whole-number bracket (`90-91°F`) | The value is in the bracket | `between` | `floor_strike` 90, `cap_strike` 91, both included | > | Exact value (`36°C`) | The value is exactly that | `between` | `floor_strike` and `cap_strike` both 36 | > | Above (`Bitcoin above 64,800`) | Above the strike | `greater` | `floor_strike` 64,800 | > | At least (`94°F or higher`) | At or above the strike | `greater_or_equal` | `floor_strike` 94 | > | Below (`<0.90`) | Below the strike | `less` | `cap_strike` 0.90 | > | At most (`19°C or below`) | At or below the strike | `less_or_equal` | `cap_strike` 19 | > | Reach (`↑ 83,000`) | The price touches the strike during the window | `greater_or_equal` | `floor_strike` 83,000 | > | Dip (`↓ 1.15`) | The price touches the strike during the window | `less_or_equal` | `cap_strike` 1.15 | > [accordion] polymarket_polygon.market_trades_v2 (breaking) > > One row per fill, as in v1. The market columns hold the values known when the fill was written; `market_details_v2` holds the current ones. > > | Column | Change | What it means for you | > | - | - | - | > | `market_id` | Renamed | Previously `condition_id`. Values unchanged. | > | `outcome_id` | Renamed | Previously `asset_id`. Values unchanged: the token traded. | > | `trade_id` | New | Fill identifier, unique per fill and the table's key. Same value as `prediction_markets.trades_v2.trade_id`. | > | `event_id` | Values change | Polymarket's event id instead of the neg-risk group id, set on far more fills. | > | `series_id` | New | The recurring series the market's event belongs to. | > | `event_title` | New | Replaces `event_market_name`. | > | `outcome_name`, `link`, `is_mutually_exclusive_event` | Renamed | Previously `token_outcome`, `polymarket_link` and `neg_risk`. `is_mutually_exclusive_event` is a `BOOLEAN`. | > | `event_market_name`, `token_outcome_name`, `unique_key` | Removed | Use `event_title`, `outcome_name` with `question`, and `trade_id`. | > [accordion] polymarket_polygon.market_actions_v2 (breaking) > > | Column | Change | What it means for you | > | - | - | - | > | `market_id` | Renamed | Previously `condition_id`. Values unchanged; `NULL` on convert rows. | > | `neg_risk_market_id` | Renamed | Previously `event_market_id`. Values unchanged; set on convert rows. Joins `market_details_v2.neg_risk_market_id`. | > | `event_title` | Renamed | Previously `event_market_name`; now the Polymarket event title. | > | `link`, `is_mutually_exclusive_event` | Renamed | Previously `polymarket_link` and `neg_risk`. | > [accordion] polymarket_polygon.market_prices_hourly → ohlcv_hourly_v2 (replaced) > > `market_prices_hourly` has no v2. Read prices from `polymarket_polygon.ohlcv_hourly_v2`, whose `close` is the same hourly price: carried forward through hours without trades and set to the settlement value in the resolution hour. > > | `market_prices_hourly` column | `ohlcv_hourly_v2` column | What it means for you | > | - | - | - | > | `condition_id` | `market_id` | Values unchanged, but a `0x…` `VARCHAR` instead of `VARBINARY`. | > | `token_id` | `outcome_id` | Values unchanged. | > | `price` | `close` | | > [accordion] polymarket_polygon.ohlcv_hourly_v2 (breaking) > > | Column | Change | What it means for you | > | - | - | - | > | `outcome_id` | Renamed | Previously `token_id`. Values unchanged. | > | `outcome_index` | New | Side of the token: 0 for the market's first outcome, 1 for the second. | > | `event_title` | Renamed | Previously `event_market_name`. Now the event title on every listed market; `NULL` for combos. | > | `market_end_time` | Removed | It was the market's on-chain resolution time. Use `settlement_ts` in `market_details_v2` or `combo_details_v2`. | > | `open`, `high`, `low`, `close`, `vwap` | Values change | Now also include trades where a buyer of Yes is matched with a buyer of No. In v1 these trades set the price of only one side. A bar can now have a price but zero volume. Combos are unchanged. | > | `volume_contracts`, `volume_usd`, `trade_count` | Unchanged | Still counted once per trade. | > | `_unique_key` | Removed | The table is unique on `(block_month, hour, market_id, outcome_index)`. | > [accordion] polymarket_polygon.positions_v2 (breaking) > > | Column | Change | What it means for you | > | - | - | - | > | `outcome_id` | Renamed | Previously `token_id`. Values unchanged. | > | `outcome_index` | New | Side of the token held: 0 for Yes or the first outcome, 1 for No or the second. With `market_id` it identifies the token without a join. | > | `price`, `balance_usd` | Values change | Priced from the `ohlcv_hourly_v2` close, so they differ on days where the v1 close was stale. | > [accordion] polymarket_polygon.open_interest_hourly_v2 (values change) > > | Column | Change | What it means for you | > | - | - | - | > | `event_id` | Values change | Polymarket's event id of the market's mutually exclusive set instead of the neg-risk group id. Still `NULL` for a standalone market. | > [accordion] polymarket_polygon.combo_details_v2 (breaking) > > | Column | Change | What it means for you | > | - | - | - | > | `market_id` | Renamed | Previously `combo_condition_id`. Values unchanged. | > | `outcome_id` | Renamed | Previously `token_id`. Values unchanged. | > | `outcome_name` | Renamed | Previously `token_outcome`: Yes or No. | > | `settlement_value_usd`, `settlement_ts` | Renamed | Previously `settlement_value` and `resolved_at`. Values unchanged. | > | `token_outcome_name` | Removed | It was the side label, a dash and `combo_name` in one string. | > | `combo_condition_id_uint` | Removed | It was `market_id` written as a number. | > [accordion] polymarket_polygon.combo_trades_v2 (breaking) > > | Column | Change | What it means for you | > | - | - | - | > | `market_id` | Renamed | Previously `combo_condition_id`. Values unchanged. | > | `outcome_id` | Renamed | Previously `asset_id`. Values unchanged: the token traded. | > | `settlement_value_usd` | Renamed | Previously `settlement_value`. Values unchanged. | > | `trade_id` | New | Fill identifier, the same value as `prediction_markets.trades_v2.trade_id`. | > | `token_outcome_name` | Removed | It was the side label, a dash and `combo_name` in one string. | > [accordion] polymarket_polygon.combo_actions_v2 (breaking) > > | Column | Change | What it means for you | > | - | - | - | > | `market_id` | Renamed | Previously `combo_condition_id`. Values unchanged. | > | `outcome_id` | Renamed | Previously `position_id`. Values unchanged. | > [accordion] polymarket_polygon.users_address_lookup_v2 (values change) > > | Column | Change | What it means for you | > | - | - | - | > | `wallet_type` | New value | `deposit wallet`, one row per deposit wallet (the account wallet Polymarket gives new users since May 2026), next to `safe` and `magic.link`. `owner` is `NULL` on these rows. | > | `first_funded_time`, `first_funded_by`, `first_funded_tx_hash`, `has_been_funded` | Values change | Payouts, rewards, wraps of collateral the wallet already held and self-transfers no longer count as funding, so a wallet whose first inflow was a payout now shows its first real deposit. | > [accordion] prediction_markets.markets_v2 (breaking) > > One row per market, as in v1. Kalshi rows change only by the removed column. > > | Column | Change | What it means for you | > | - | - | - | > | `event_id` | Values change (Polymarket) | Polymarket's event id for every listed market instead of the neg-risk group id. | > | `event_name` | Values change (Polymarket) | The event title for every listed market; previously `NULL` on standalone markets. | > | `series_id`, `frequency` | Values change (Polymarket) | Previously always `NULL` on Polymarket; now the values in `market_details_v2`. `frequency` gains `five_min` and `four_hour`. | > | `strike_type`, `floor_strike`, `cap_strike` | Values change (Polymarket) | Previously always `NULL` on Polymarket; now the values in `market_details_v2`. | > | `link` | Values change (Polymarket) | The event page on polymarket.com; `NULL` where Polymarket does not list the market. | > | `market_end_time` | Values change (Polymarket) | Now includes the time of day. | > | `source_updated_at` | Removed (every venue) | It meant something different on each venue. Use `_updated_at`, which changes only when a value changes. | > > **Comparing strikes across venues.** Both venues use the same `strike_type` values, and `floor_strike` and `cap_strike` mean the same on both, with three differences: > > * On price brackets, Kalshi sets `cap_strike` one tick below the next bracket (`75,299.99`); Polymarket uses the next bracket's floor (`1.80`) and gives a price exactly on it to the higher bracket. Whole-number brackets include both ends on both venues. > * For "X or above", Kalshi uses `greater` with `floor_strike` one tick below X; Polymarket uses `greater_or_equal` with X. Both mean the Yes side wins at X. > * Markets that resolve when the price touches a level (Polymarket's reach and dip ladders, Kalshi's max and min series) carry the same strike types as markets that settle at the close. The question says which kind it is. > [accordion] prediction_markets.trades_v2 (values change) > > | Column | Change | What it means for you | > | - | - | - | > | `event_id` | Values change (Polymarket) | Polymarket's event id instead of the neg-risk group id. | > [accordion] prediction_markets.ohlcv_hourly_v2 (values change) > > | Column | Change | What it means for you | > | - | - | - | > | `open`, `high`, `low`, `close`, `vwap` | Values change (Polymarket) | Follow the prices in `polymarket_polygon.ohlcv_hourly_v2`. | > [accordion] prediction_markets.open_interest_hourly_v2 (values change) > > | Column | Change | What it means for you | > | - | - | - | > | `event_id` | Values change (Polymarket) | Polymarket's event id of the market's mutually exclusive set. Still `NULL` for a standalone market. | > [accordion] kalshi.market_details_v2 (breaking) > > | Column | Change | What it means for you | > | - | - | - | > | `source_updated_at`, `updated_time` | Removed | Use `_updated_at`. | > | `_updated_at` | Behavior change | Changes only when a value changes; unchanged rows keep their stamp. | > | `created_date` | New | UTC date of `created_time`; the table's partition column. | > [accordion] kalshi.ohlcv_hourly_v2 (breaking) > > | Column | Change | What it means for you | > | - | - | - | > | `market_end_time` | Removed | It was the market's settlement time once known, otherwise its expected expiration. Use `settlement_ts` or `expected_expiration_time` in `kalshi.market_details_v2`. | > [accordion] hip4_hyperliquid.market_details_v2 (breaking) > > | Column | Change | What it means for you | > | - | - | - | > | `source_updated_at` | Removed | Use `_updated_at`. | > [accordion] hip4_hyperliquid.market_trades_v2 (same columns) > > No column changes. Each trade has two rows, one for each side, and both share a `trade_id`. Rows are unique on `(block_month, trade_id, is_taker)`. > [accordion] hip4_hyperliquid.ohlcv_hourly_v2 (breaking) > > | Column | Change | What it means for you | > | - | - | - | > | `market_end_time` | Removed | It was the market's settlement time once known, otherwise its expected expiration. Use `settlement_ts` or `expected_expiration_time` in `hip4_hyperliquid.market_details_v2`. | ## Rewriting a query Volume by question for the outcomes of mutually exclusive events, in v1: ```sql theme={null} SELECT t.event_market_name, t.question, d.token_outcome, SUM(t.amount) AS volume_usd FROM polymarket_polygon.market_trades t JOIN polymarket_polygon.market_details d ON d.token_id = t.asset_id WHERE t.block_time >= NOW() - INTERVAL '7' DAY AND t.is_taker_side AND t.neg_risk = 'True' GROUP BY 1, 2, 3 ORDER BY 4 DESC LIMIT 20 ``` The same query in v2: ```sql theme={null} SELECT t.event_title, t.question, d.outcome_name, SUM(t.amount) AS volume_usd FROM polymarket_polygon.market_trades_v2 t JOIN polymarket_polygon.market_details_v2 d ON d.outcome_id = t.outcome_id WHERE t.block_time >= NOW() - INTERVAL '7' DAY AND t.is_taker_side AND t.is_mutually_exclusive_event GROUP BY 1, 2, 3 ORDER BY 4 DESC LIMIT 20 ``` # Prediction Markets Source: https://docs.dune.com/data-catalog/curated/prediction-markets/overview Curated prediction market datasets for Polymarket, Kalshi, and Hyperliquid HIP-4 on Dune Prediction markets turn event outcomes into tradable instruments. Dune provides curated prediction market data combining onchain activity from **Polymarket** (the largest onchain prediction market) — including **Combos**, Polymarket's multi-leg parlays — with regulated event-contract reporting from **Kalshi** and onchain outcome markets from **Hyperliquid HIP-4**. > [!NOTE] > > **Maintained by:** Dune (Polymarket and Hyperliquid HIP-4 = onchain models, Kalshi = partner data) · **Refresh:** \~1 hour · **Chains:** Polygon (Polymarket), Hyperliquid (HIP-4), Off-chain (Kalshi) > [card] [Explore on Dune](https://dune.com/data/prediction-markets) > > Browse the curated Prediction Markets data page on dune.com: live dashboards, top markets, and example queries. > [card] [Get This Data](https://dune.com/enterprise?dataset=prediction-markets) > > Access prediction market data via API, Datashare, or the Dune App. ## Available Protocols > [card] [Cross-venue](/data-catalog/curated/prediction-markets/prediction_markets/overview) > > Unified markets, trades, hourly OHLCV, and hourly open interest across Polymarket and Kalshi on one schema > [card] [Polymarket (Polygon)](/data-catalog/curated/prediction-markets/polymarket/overview) > > Onchain markets, trades, combos (parlays), lifecycle actions, positions, and pricing > [card] [Kalshi](/data-catalog/curated/prediction-markets/kalshi/overview) > > Regulated event contracts: market details, per-fill trades, hourly OHLCV and open interest, and legacy reports > [card] [Hyperliquid HIP-4](/data-catalog/curated/prediction-markets/hip4/overview) > > Onchain outcome markets on Hyperliquid: market details, fill ledger, hourly OHLCV and open interest, daily positions > [card] [All Tables](/data-catalog/curated/prediction-markets/all-tables-overview) > > Complete inventory of all prediction market tables ## When to Use These Tables Use prediction market tables when you need to: * Track trading volumes, market activity, and implied probabilities on Polymarket * Analyze Polymarket Combos (multi-leg parlays): trades, legs, and settlement * Analyze event-contract pricing and settlement on Kalshi * Track outcome-market trading, open interest, and positions on Hyperliquid HIP-4 * Monitor user positions and portfolio composition across prediction markets * Research market resolution outcomes and pricing efficiency * Compare prediction market activity across venues ## Query Performance Polymarket trade and price tables are partitioned by `block_month`. Always filter on `block_time` ranges for `market_trades`, and use `market_id` or `question` for market-specific queries. ```sql theme={null} -- ✅ Good: time-bounded with market filter SELECT * FROM polymarket_polygon.market_trades_v2 WHERE block_time >= NOW() - INTERVAL '7' DAY AND question LIKE '%election%' ``` ## Methodology **Polymarket** tables are maintained by Dune. They combine decoded on-chain events from Polymarket's exchange contracts on Polygon — the v1 CTF Exchange and NegRisk contracts, the v2 exchange stack, and the v3 Combos suite — with market metadata stored in `dune.polymarket_markets`. Trading data includes three matching types: complementary (buyer matches seller), MINT (system mints new outcome tokens), and MERGE (system redeems YES+NO tokens for collateral); filter `is_taker_side` for single-counted volume. Combos (multi-leg parlays) live in the dedicated `combo_*` tables and also appear in `polymarket_polygon.ohlcv_hourly` and the cross-venue `prediction_markets` tables, flagged as parlays. **Kalshi** data is sourced from Kalshi's public reporting. `market_report` contains market-level metadata; `trade_report` contains daily aggregated trade data (not individual fills — a single date and ticker can have multiple rows at different price points). **Hyperliquid HIP-4** tables are maintained by Dune from Hyperliquid node fills and venue metadata. `hip4_hyperliquid.market_trades` is the full fill ledger (both legs of every match, plus split, merge, negate and settlement legs), from which open interest and daily positions are rebuilt. Each market is a binary Yes/No pair whose sides trade on separate books, so candles are kept per outcome token. HIP-4 is not yet part of the cross-venue `prediction_markets` tables. ## Example Queries **Top Polymarket markets by volume (last 7 days):** ```sql theme={null} SELECT event_title, question, SUM(amount) AS total_volume_usd, COUNT(*) AS num_trades FROM polymarket_polygon.market_trades_v2 WHERE block_time >= NOW() - INTERVAL '7' DAY AND is_taker_side GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 20 ``` **Price history for a specific Polymarket outcome:** ```sql theme={null} SELECT o.hour, m.outcome_name, o.close AS price FROM polymarket_polygon.ohlcv_hourly_v2 o JOIN polymarket_polygon.market_details_v2 m ON o.outcome_id = m.outcome_id WHERE m.question = 'Will Donald Trump win the 2024 US Presidential Election?' ORDER BY o.hour ``` ## Related Tables * `dex.trades` — DEX trading data (Polymarket uses Polygon DEX infrastructure) * `prices.day` / `prices.hour` — Token pricing feeds > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom prediction market datasets or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private prediction market analytics pipelines with the dbt Connector. # polymarket_polygon.combo_actions Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/combo_actions Polymarket Combo actions outside trading, such as splits, merges, redemptions and the operations that build and reshape combos. > [!NOTE] > > Current version: **v2** > · query it as `polymarket_polygon.combo_actions_v2` > . The `polymarket_polygon.combo_actions` table lists what happens to combos outside trading: * splits and merges, which turn collateral into a Yes and No pair and back, * redemptions, per user, * the operations that build and reshape combos (wrap, compress, extract, inject, …). Each row carries the combo's details from [`combo_details`](/data-catalog/curated/prediction-markets/polymarket/combo_details) as they were when the action was recorded. Splits and merges that happen inside a trade are not included. They are part of the fill and appear in [`combo_trades`](/data-catalog/curated/prediction-markets/polymarket/combo_trades). There is one row per action, unique on `(block_month, tx_hash, evt_index)`. `market_id` is the parent combo. On `extract`, `inject`, `split_on_condition` and `merge_on_condition`, the resulting or leftover combo is in `related_condition_id` and `related_condition_id_2`. To find every action involving combo X, filter `WHERE contains(all_condition_ids, X)`. ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | UTC month of the event block time | | `block_time` | `TIMESTAMP` | UTC event block time | | `block_number` | `BIGINT` | Block number in which the action was executed | | `action` | `VARCHAR` | Lifecycle action type (split, merge, redemption, wrap, unwrap, compress, convert_to_yes_basket, merge_from_yes_basket, split_on_condition, merge_on_condition, extract, inject) | | `market_id` | `VARBINARY` | Id of the combo the action operates on: its condition id (bytes31). For combo detail join combo_details on market_id and outcome_index = 0 | | `outcome_id` | `UINT256` | Token id of the combo side for position-scoped actions; null on condition-scoped actions. Joins combo_details.outcome_id | | `outcome_index` | `INTEGER` | Outcome byte of outcome_id (0 = YES, 1 = NO) | | `outcome` | `VARCHAR` | Outcome as label; Yes pays out only if every leg wins | | `related_position_id` | `UINT256` | Secondary position id (wrap/unwrap underlying, compress new position) | | `related_condition_id` | `VARBINARY` | Secondary condition id (child-YES / reduced condition) | | `related_condition_id_2` | `VARBINARY` | Tertiary condition id (child-NO / residual condition) | | `all_condition_ids` | `ARRAY(VARBINARY)` | market_id, related_condition_id and related_condition_id_2 combined into one array (nulls dropped) -- filter WHERE contains(all_condition_ids, X) to find every action touching combo X, since market_id alone is the parent combo (not the child/residual) on extract, inject, split_on_condition and merge_on_condition | | `initiator` | `VARBINARY` | Address performing the action | | `recipient` | `VARBINARY` | Recipient of the action's output where emitted; the redeemed user on auto-redemptions | | `recipient_2` | `VARBINARY` | NO-token recipient of a split | | `amount` | `DOUBLE` | Share/set quantity in whole shares, already divided by 1e6 (= pUSD moved 1:1 for splits/merges); null on auto-redemptions | | `payout` | `DOUBLE` | pUSD returned in USD (redemption payout, compress collateralOut) | | `is_auto_redeemed` | `BOOLEAN` | On redemptions: TRUE when executed by the AutoRedeemer on the user's behalf | | `combo_name` | `VARCHAR` | Generated combo name ('question: outcome AND ...'); null unless every leg is labeled | | `leg_count` | `BIGINT` | Number of legs in the combo | | `contract_address` | `VARBINARY` | Contract that emitted the event | | `evt_index` | `INTEGER` | Index of the event within the transaction | | `tx_hash` | `VARBINARY` | Transaction hash | | `tx_from` | `VARBINARY` | Transaction sender | | `_updated_at` | `TIMESTAMP` | When this row was last written. Unchanged rows keep their stamp. | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=combo_actions_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=combo_actions_v2) ## Query performance `combo_actions` is partitioned by `block_month`. Always filter on `block_time` or `block_month`. ## Example query ```sql theme={null} -- Combo redemption payouts by day, split by auto vs manual SELECT DATE_TRUNC('day', block_time) AS day, is_auto_redeemed, SUM(payout) AS payout_usd, COUNT(*) AS num_redemptions FROM polymarket_polygon.combo_actions_v2 WHERE action = 'redemption' AND block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 ORDER BY 1 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `block_month` | `DATE` | UTC month of the event block time (partition key) | > | `block_time` | `TIMESTAMP` | UTC event block time | > | `block_number` | `BIGINT` | Block number in which the action was executed | > | `action` | `VARCHAR` | Lifecycle action type (`split`, `merge`, `redemption`, `wrap`, `unwrap`, `compress`, `convert_to_yes_basket`, `merge_from_yes_basket`, `split_on_condition`, `merge_on_condition`, `extract`, `inject`) | > | `combo_condition_id` | `VARBINARY` | Combo condition ID (bytes31); for combo detail join `combo_details` on `combo_condition_id` and `outcome_index = 0` | > | `position_id` | `UINT256` | v3 PositionManager token ID for position-scoped actions; joins `combo_details.token_id` | > | `outcome_index` | `INTEGER` | Outcome byte of `position_id` (0 = YES, 1 = NO) | > | `outcome` | `VARCHAR` | Outcome as label; Yes pays out only if every leg wins | > | `related_position_id` | `UINT256` | Secondary position ID (wrap/unwrap underlying, compress new position) | > | `related_condition_id` | `VARBINARY` | Secondary condition ID (child-YES / reduced condition) | > | `related_condition_id_2` | `VARBINARY` | Tertiary condition ID (child-NO / residual condition) | > | `all_condition_ids` | `ARRAY(VARBINARY)` | All condition IDs of the row combined into one array (NULLs dropped). Filter `WHERE contains(all_condition_ids, X)` to find every action touching combo X — `combo_condition_id` alone is the parent combo (not the child/residual) on `extract`, `inject`, `split_on_condition` and `merge_on_condition` | > | `initiator` | `VARBINARY` | Address performing the action | > | `recipient` | `VARBINARY` | Recipient of the action's output where emitted; the redeemed user on auto-redemptions | > | `recipient_2` | `VARBINARY` | NO-token recipient of a split | > | `amount` | `DOUBLE` | Share/set quantity (= pUSD moved 1:1 for splits/merges); NULL on auto-redemptions | > | `payout` | `DOUBLE` | pUSD returned in USD (redemption payout, compress collateral out) | > | `is_auto_redeemed` | `BOOLEAN` | On redemptions: TRUE when executed by the AutoRedeemer on the user's behalf | > | `combo_name` | `VARCHAR` | Generated combo name (`question: outcome AND ...`); NULL unless every leg is labeled | > | `leg_count` | `BIGINT` | Number of legs in the combo | > | `contract_address` | `VARBINARY` | Contract that emitted the event | > | `evt_index` | `INTEGER` | Index of the event within the transaction | > | `tx_hash` | `VARBINARY` | Transaction hash | > | `tx_from` | `VARBINARY` | Transaction sender | > | `_updated_at` | `TIMESTAMP` | When this row was last inserted or updated by the dbt pipeline | # polymarket_polygon.combo_details Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/combo_details Polymarket Combo metadata, one row per combo side, with its legs, generated name and resolution. > [!NOTE] > > Current version: **v2** > · query it as `polymarket_polygon.combo_details_v2` > . The `polymarket_polygon.combo_details` table describes Polymarket **Combos** (multi-leg parlays). It has one row per combo side, so a Yes row and a No row per combo. Rows are unique on `(market_id, outcome_index)`, and `outcome_id` is unique too. [`market_details`](/data-catalog/curated/prediction-markets/polymarket/market_details) has the same layout, so an `outcome_id` joins either table the same way. Left join it to [`combo_trades`](/data-catalog/curated/prediction-markets/polymarket/combo_trades) or [`positions`](/data-catalog/curated/prediction-markets/polymarket/positions) on `outcome_id`. A combo's Yes side pays out only if every leg wins. Each row lists the combo's legs. `combo_name` and `leg_names` are built from the legs' questions and outcomes, and stay NULL until every leg has a label. Per share, Yes pays the product of the legs' payouts and No pays 1 minus that. So a combo is decided as soon as any leg loses, and No holders can redeem before the other legs resolve. `is_resolved`, `combo_outcome`, `settlement_value_usd` and `settlement_ts` show the moment the outcome became known. ## Table Schema | Column | Type | Description | | - | - | - | | `outcome_id` | `UINT256` | Token id of this side of the combo: the combo's condition id as a number times 256, plus outcome_index. Joins combo_trades and positions on outcome_id | | `outcome_index` | `INTEGER` | Side of this row: 0 = Yes, 1 = No | | `outcome_name` | `VARCHAR` | Side of this row as a label: 'Yes' (pays only if every leg wins) or 'No' | | `market_id` | `VARBINARY` | Id of the combo: its condition id (bytes), shared by the combo's Yes and No rows | | `combo_name` | `VARCHAR` | Generated name in leg order: 'question: outcome AND question: outcome ...'; null unless every leg is labeled | | `leg_names` | `ARRAY(VARCHAR)` | Per-leg labels ('question: outcome') in leg order; an entry is null for a leg whose market is not yet labeled | | `category` | `VARCHAR` | Unified category enum shared across venues: sports, crypto, politics, finance, technology, culture, weather, world, health, other, plus mixed when the legs span several categories. Derived from the legs; a combo whose legs are all unclassified is other. | | `legs` | `ARRAY(UINT256)` | Ordered array of the legs' position token ids as registered on-chain | | `leg_count` | `BIGINT` | Number of legs | | `labeled_leg_count` | `BIGINT` | Number of legs whose market question and outcome are known; combo_name is null unless this equals leg_count | | `legs_resolved_count` | `BIGINT` | Number of legs whose market has resolved on-chain | | `lost_leg_count` | `BIGINT` | Number of legs that resolved against the combo (payout 0). A single lost leg decides the combo as 'no' | | `is_resolved` | `BOOLEAN` | TRUE once the outcome is known: any leg lost, or every leg resolved. No becomes redeemable at the first lost leg, before the remaining legs resolve | | `combo_outcome` | `VARCHAR` | How the combo resolved (same on both rows): 'yes' when every leg won, 'no' when any leg lost, 'partial' when a 50/50-resolved leg leaves a fractional payout; null while undecided. Lowercase like market_details.outcome | | `settlement_value_usd` | `DOUBLE` | Per-share payout of THIS row's token: the Yes row pays the product of the legs' payout fractions (1, 0, or a fraction such as 0.5 with a 50/50 leg), the No row pays 1 minus that. Null while undecided | | `settlement_ts` | `TIMESTAMP` | Time the outcome became known: the first lost leg's resolution, or the last leg's resolution when all legs won; null while undecided | | `created_at` | `TIMESTAMP` | Block time the combo was registered on-chain | | `block_number` | `BIGINT` | Block number the combo was registered in | | `evt_index` | `INTEGER` | Event index of the registration event | | `tx_hash` | `VARBINARY` | Transaction that registered the combo | | `_updated_at` | `TIMESTAMP` | Time this row was last computed | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=combo_details_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=combo_details_v2) ## Example query ```sql theme={null} -- Most-traded labeled combos over the last 30 days, with legs SELECT d.combo_name, d.leg_count, SUM(t.amount) AS volume_usd FROM polymarket_polygon.combo_trades_v2 t JOIN polymarket_polygon.combo_details_v2 d ON t.outcome_id = d.outcome_id WHERE t.is_taker_side AND t.block_time >= NOW() - INTERVAL '30' DAY AND d.combo_name IS NOT NULL GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 20 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `token_id` | `UINT256` | v3 PositionManager token ID of this side of the combo (combo condition × 256 + outcome index); joins `combo_trades.asset_id` | > | `outcome_index` | `INTEGER` | Side of this row: 0 = YES, 1 = NO | > | `token_outcome` | `VARCHAR` | Side of this row as label: `Yes` (pays out only if every leg wins) or `No` | > | `combo_condition_id` | `VARBINARY` | Combo condition ID (bytes31); two rows share it (YES and NO) | > | `combo_condition_id_uint` | `UINT256` | Combo condition ID as uint256 (= `token_id / 256`) | > | `combo_name` | `VARCHAR` | Generated name: `question: outcome AND question: outcome ...` in leg order; NULL unless every leg has question and outcome labels | > | `token_outcome_name` | `VARCHAR` | `Yes-`/`No-` + `combo_name`, mirroring `market_details.token_outcome_name`; NULL until every leg is labeled | > | `leg_names` | `ARRAY(VARCHAR)` | Per-leg labels (`question: outcome`) in leg order; an entry is NULL for a leg whose market is not yet labeled | > | `category` | `VARCHAR` | Unified category shared across prediction market venues (`sports`, `crypto`, `politics`, `finance`, `technology`, `culture`, `weather`, `world`, `health`, `other`), plus `mixed` when the legs span several categories. Derived from the legs; a combo whose legs are all unclassified is `other` | > | `legs` | `ARRAY(UINT256)` | Ordered on-chain legs array (leg position IDs) | > | `leg_count` | `BIGINT` | Number of legs | > | `labeled_leg_count` | `BIGINT` | Number of legs with question and outcome labels; `combo_name` is NULL unless this equals `leg_count` | > | `legs_resolved_count` | `BIGINT` | Number of legs whose underlying condition has resolved on-chain | > | `lost_leg_count` | `BIGINT` | Number of legs that resolved against the combo; a single lost leg decides the combo as `no` | > | `is_resolved` | `BOOLEAN` | TRUE once the combo's outcome is known: any leg lost, or every leg resolved | > | `combo_outcome` | `VARCHAR` | How the combo resolved (same on both rows): `yes` when every leg won, `no` when any leg lost, `partial` when a 50/50-resolved leg leaves the payout fractional; NULL while undecided | > | `settlement_value` | `DOUBLE` | What THIS side settled at per share: the YES row pays the product of the legs' payout fractions, the NO row pays 1 minus that. NULL while undecided | > | `resolved_at` | `TIMESTAMP` | Time the outcome became known: the first lost leg's resolution, or the last leg's resolution when all legs resolved; NULL while undecided | > | `created_at` | `TIMESTAMP` | Block time the combo was registered on-chain | > | `block_number` | `BIGINT` | Block number the combo was registered in | > | `evt_index` | `INTEGER` | Event index of the registration event | > | `tx_hash` | `VARBINARY` | Transaction that registered the combo | > | `_updated_at` | `TIMESTAMP` | Time this row was last (re)computed | # polymarket_polygon.combo_prices_hourly Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/combo_prices_hourly Polymarket Combos hourly price snapshots — combo token joint probabilities aggregated by hour. > [!NOTE] > > Current version: **v1** > > . The `polymarket_polygon.combo_prices_hourly` table contains hourly combo token prices: the last trade price per token-hour, forward-filled across quiet hours — the combos twin of `market_prices_hourly`. The forward-fill stops at the hour the combo is decided (first lost leg, or last leg resolved); that final row carries the exact settlement value from `combo_details`. For hours after the decision, read `combo_details.settlement_value` — it can never change again. ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | Month partition derived from `hour` | | `hour` | `TIMESTAMP` | The hour for which the price is valid | | `combo_condition_id` | `VARBINARY` | Combo condition ID (bytes31), shared by the combo's YES and NO tokens | | `token_id` | `UINT256` | v3 PositionManager token ID of the combo side; joins `combo_details.token_id` | | `price` | `DOUBLE` | Price of the combo token at the end of the hour (its joint probability, 0–1); the decision-hour row is the exact settlement value | | `_updated_at` | `TIMESTAMP` | When this row was last inserted or updated by the dbt pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=combo_prices_hourly](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=combo_prices_hourly) ## Example query ```sql theme={null} -- Price history for a labeled combo SELECT p.hour, d.token_outcome, p.price FROM polymarket_polygon.combo_prices_hourly p JOIN polymarket_polygon.combo_details d ON p.token_id = d.token_id WHERE d.combo_name = 'Team A wins: Yes AND Team B wins: Yes' ORDER BY p.hour ``` # polymarket_polygon.combo_trades Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/combo_trades Polymarket Combo trades, the fills of multi-leg parlays on the v3 Exchange, with prices, fees and maker and taker addresses. > [!NOTE] > > Current version: **v2** > · query it as `polymarket_polygon.combo_trades_v2` > . The `polymarket_polygon.combo_trades` table lists trades of Polymarket **Combos** (multi-leg parlays) on the v3 Exchange. There is one row per fill, unique on `(block_month, trade_id)`. Each fill carries the combo's labels and settlement from [`combo_details`](/data-catalog/curated/prediction-markets/polymarket/combo_details) as they were when the fill was recorded. `combo_details` has the current values. A combo's Yes side pays out only if every leg wins, so its `price` is the probability that all legs win. The exchange records one fill per maker order plus one combined fill for the taker. Filter `WHERE is_taker_side` to count each trade once. `settlement_value_usd` is usually NULL here, because combos settle after the fill. For the current value, join `combo_details` on `outcome_id`. ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | UTC month of block_time | | `block_time` | `TIMESTAMP` | UTC block time of the fill | | `block_number` | `BIGINT` | Block number of the fill | | `action` | `VARCHAR` | Type of trade; always 'RFQ trade' (combos are quoted by market makers, not traded on the order book) | | `market_id` | `VARBINARY` | Id of the combo: its condition id (bytes), shared by the combo's Yes and No tokens. For combo detail join combo_details on outcome_id | | `outcome_id` | `UINT256` | Token id of the combo side traded; joins combo_details.outcome_id | | `outcome_index` | `INTEGER` | Combo side traded: 0 = Yes, 1 = No | | `outcome` | `VARCHAR` | Combo side traded as a label. Yes pays only if every leg wins | | `amount` | `DOUBLE` | USD value of the fill (pUSD collateral treated 1:1 as USD) | | `shares` | `DOUBLE` | Number of combo shares transferred | | `price` | `DOUBLE` | Price per share of the side traded, 0-1; equals the implied joint probability that the side wins | | `fee` | `DOUBLE` | Fee charged on this fill in USD | | `maker` | `VARBINARY` | Address whose order was filled. On the aggregate taker fill this is the trader who took liquidity | | `taker` | `VARBINARY` | Address filling the order. On the aggregate taker fill this is the V3 exchange itself | | `is_taker_side` | `BOOLEAN` | TRUE on the aggregate taker fill (one per settlement). Filter WHERE is_taker_side for single-counted volume | | `maker_side` | `VARCHAR` | Side of maker's order: 'BUY' if the maker acquired combo tokens, 'SELL' if the maker released them | | `taker_side` | `VARCHAR` | Side of taker's leg: always the inverse of maker_side. On the aggregate taker fill the taker is the exchange, so the trader's own side is maker_side | | `event_id` | `VARCHAR` | Always NULL: a combo has no parent event. Present so combo_trades and market_trades share the same columns | | `maker_amount_raw` | `UINT256` | Raw maker amount filled, 6 decimals | | `taker_amount_raw` | `UINT256` | Raw taker amount filled, 6 decimals | | `order_hash` | `VARBINARY` | EIP-712 hash of the filled order | | `builder` | `VARBINARY` | Builder attribution field (bytes32) from the signed order | | `metadata` | `VARBINARY` | Order metadata field (bytes32) from the signed order | | `combo_name` | `VARCHAR` | Generated combo name ('question: outcome AND ...'); null unless every leg is labeled | | `leg_count` | `BIGINT` | Number of legs in the combo | | `settlement_value_usd` | `DOUBLE` | Per-share payout of the side traded (0-1) as of when the fill was last written; usually null because combos settle after the incremental window. For the current value join combo_details on outcome_id | | `contract_address` | `VARBINARY` | V3 exchange contract that emitted the fill | | `evt_index` | `INTEGER` | Index of the event within the transaction | | `tx_hash` | `VARBINARY` | Transaction hash | | `trade_id` | `VARCHAR` | Fill identifier, '0x' + tx_hash + ':' + evt_index; unique per fill | | `_updated_at` | `TIMESTAMP` | When this row was last written. Unchanged rows keep their stamp. | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=combo_trades_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=combo_trades_v2) ## Query performance `combo_trades` is partitioned by `block_month`. Always filter on `block_time` or `block_month`. ## Example query ```sql theme={null} -- Combo volume and fees by day (single-counted) SELECT DATE_TRUNC('day', block_time) AS day, SUM(amount) AS volume_usd, SUM(fee) AS fees_usd, COUNT(*) AS num_fills FROM polymarket_polygon.combo_trades_v2 WHERE is_taker_side AND block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1 ORDER BY 1 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `block_month` | `DATE` | UTC month of the event block time (partition key) | > | `block_time` | `TIMESTAMP` | UTC event block time | > | `block_number` | `BIGINT` | Block number in which the trade was executed | > | `action` | `VARCHAR` | Type of trade (RFQ trade) | > | `combo_condition_id` | `VARBINARY` | Combo condition ID (bytes31), shared by the combo's YES and NO tokens; for combo detail join `combo_details` on `token_id = asset_id` | > | `asset_id` | `UINT256` | v3 PositionManager token ID of the combo side traded; joins `combo_details.token_id` | > | `outcome_index` | `INTEGER` | Combo side traded: 0 = YES, 1 = NO | > | `outcome` | `VARCHAR` | Combo side traded as label; Yes pays out only if every leg wins | > | `amount` | `DOUBLE` | Amount in USD (pUSD treated 1:1 as USD) | > | `shares` | `DOUBLE` | Amount of combo shares transferred | > | `price` | `DOUBLE` | Price of the combo side traded = its joint probability (0–1) | > | `fee` | `DOUBLE` | Per-fill fee in USD (reconciles exactly with the Exchange `FeeCharged` events) | > | `maker` | `VARBINARY` | Address whose order was filled. On the aggregate taker fill this is the trader who took liquidity | > | `taker` | `VARBINARY` | Address filling the order. On the aggregate taker fill this is the v3 Exchange itself | > | `is_taker_side` | `BOOLEAN` | TRUE on the aggregate taker fill (one per settlement). Filter `WHERE is_taker_side` for single-counted volume | > | `maker_side` | `VARCHAR` | `BUY` = maker acquiring combo tokens, `SELL` = releasing them | > | `taker_side` | `VARCHAR` | Side of the taker's leg: always the inverse of `maker_side`. On the aggregate taker fill the taker is the exchange, so the trader's own side is `maker_side` | > | `event_id` | `VARCHAR` | Always NULL: a combo has no parent event. Present so `combo_trades` and `market_trades` share the same columns | > | `maker_amount_raw` | `UINT256` | Raw `makerAmountFilled` (6 decimals) | > | `taker_amount_raw` | `UINT256` | Raw `takerAmountFilled` (6 decimals) | > | `order_hash` | `VARBINARY` | EIP-712 hash of the filled order | > | `builder` | `VARBINARY` | Builder attribution field (bytes32) from the signed order | > | `metadata` | `VARBINARY` | Order metadata field (bytes32) | > | `combo_name` | `VARCHAR` | Generated combo name (`question: outcome AND ...`); NULL unless every leg is labeled | > | `token_outcome_name` | `VARCHAR` | Combination of the side traded and the combo name (`Yes-...` / `No-...`); NULL when `combo_name` is NULL | > | `leg_count` | `BIGINT` | Number of legs in the combo | > | `settlement_value` | `DOUBLE` | What the side traded settled at per share (0–1). Realized PnL of a buy = `(settlement_value - price) * shares`. NULL while the combo is undecided | > | `contract_address` | `VARBINARY` | v3 Exchange proxy that emitted the fill | > | `evt_index` | `INTEGER` | Index of the event within the transaction | > | `tx_hash` | `VARBINARY` | Transaction hash | > | `_updated_at` | `TIMESTAMP` | When this row was last inserted or updated by the dbt pipeline | # polymarket_polygon.market_actions Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/market_actions Polymarket position lifecycle actions — splits, merges, redemptions, neg-risk converts, and Protocol V2 migrations with market context. The `polymarket_polygon.market_actions` table contains position lifecycle actions on single markets — splits, merges, redemptions, and neg-risk converts on the CTF stack, plus the same actions, migrations from the CTF, and neg-risk horizontal splits/merges on the contract suite Polymarket calls Protocol V2 — enriched with condition-level market context from `market_details`. One row per user-level action; trade fills live in `market_trades`. Settlement-internal splits/merges are excluded by construction — those are the mint/merge legs of CLOB fills and live in `market_trades`. > [!NOTE] > > `condition_id` and `event_market_id` are never both populated on the same row: split/merge/redemption/migration rows key on `condition_id`; convert and horizontal split/merge rows key on `event_market_id`. To get a market's full action history, filter on `condition_id` and separately on `event_market_id`. ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | UTC month of the event block time (partition key) | | `block_time` | `TIMESTAMP` | UTC event block time | | `block_number` | `BIGINT` | Block number in which the action was executed | | `action` | `VARCHAR` | Lifecycle action type (`split`, `merge`, `redemption`, `convert`, `migration`, `horizontal_split`, `horizontal_merge`) | | `condition_id` | `VARBINARY` | Condition ID (bytes32) the action operates on. A migrated position keeps the CTF condition ID it came from. NULL on convert and horizontal rows (keyed by `event_market_id` instead) | | `event_market_id` | `VARBINARY` | ID of the overarching multi-outcome event (convert and horizontal rows only); joins `market_details.event_market_id` (varchar there) — not a CTF condition ID | | `question` | `VARCHAR` | Concrete outcome being bet on (from `market_details`) | | `event_market_name` | `VARCHAR` | Overarching question for negRisk markets | | `polymarket_link` | `VARCHAR` | Link to the Polymarket site (may be broken for archived markets) | | `neg_risk` | `VARCHAR` | Whether the condition belongs to a neg-risk market | | `index_sets` | `ARRAY(UINT256)` | Outcome index sets of the action: the partition of CTF splits/merges, the redeemed index sets of CTF redemptions, the converted outcome bitmask of converts; NULL for adapter actions (full YES/NO set implied) | | `stakeholder` | `VARBINARY` | Address whose position is acted on; may be a Polymarket router/proxy contract — see `tx_from` for the sender | | `amount` | `DOUBLE` | Share/set quantity (= USDC collateral moved 1:1 for splits/merges). NULL for CTF and auto redemptions (not emitted) | | `payout` | `DOUBLE` | Collateral returned by redemptions in USD; NULL otherwise | | `is_auto_redeemed` | `BOOLEAN` | On redemptions: TRUE when executed by the AutoRedeemer on the user's behalf; NULL for non-redemption actions | | `collateral_token` | `VARBINARY` | Collateral token of CTF events; NULL for adapter/AutoRedeemer events | | `parent_collection_id` | `VARBINARY` | CTF parent collection ID (0x00 for Polymarket's flat binary positions); NULL for adapter/AutoRedeemer events | | `contract_address` | `VARBINARY` | Contract that emitted the event (CTF, NegRiskAdapter, AutoRedeemer proxy, or a Protocol V2 module) | | `evt_index` | `INTEGER` | Index of the event within the transaction | | `tx_hash` | `VARBINARY` | Transaction hash | | `tx_from` | `VARBINARY` | Transaction sender — useful when `stakeholder` is a router/operator contract | | `_updated_at` | `TIMESTAMP` | When this row was last inserted or updated by the dbt pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=market_actions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=market_actions) ## Example query ```sql theme={null} -- Redemption payouts by market over the last 30 days SELECT question, SUM(payout) AS payout_usd, COUNT(*) AS num_redemptions FROM polymarket_polygon.market_actions WHERE action = 'redemption' AND block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1 ORDER BY 2 DESC LIMIT 20 ``` # polymarket_polygon.market_details Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/market_details Every Polymarket market, one row per outcome token, with question, event and series, category, strikes, sports, fees, status and resolution. > [!NOTE] > > Current version: **v2** > · query it as `polymarket_polygon.market_details_v2` > . The `polymarket_polygon.market_details` table describes every Polymarket market. It combines Polymarket's own listing data (market, event and series details) with on-chain data on how each market was created and resolved. There is one row per outcome token (`outcome_id`), so each market has two rows, one per side. Each row is unique on `(market_id, outcome_index)`. Combos (multi-leg parlays) are in [`combo_details`](/data-catalog/curated/prediction-markets/polymarket/combo_details), with the same layout. Markets on Polymarket's newer Protocol V2 contracts are included (`contract_version = 'v3'` in `market_trades`). A market moved to Protocol V2 keeps its original token ids. Columns from Polymarket's listing data show the latest listed values: `gamma_market_id`, the event and series columns, strikes, sports, fees and resolution settings. They are null for markets Polymarket does not list. > [!NOTE] > > To find the winning side, use `outcome_index` and `settlement_value_usd`, not the `outcome_name` label. A filter like `outcome_name = 'Yes'` silently misses Up/Down, Over/Under and team-name markets. **Column groups:** * **Ids:** `market_id` (the condition id, the market's on-chain id, as a `0x...` string), `gamma_market_id` (Polymarket's own market id), `outcome_id` (the token), `outcome_index`, `question_id`, and `neg_risk_market_id` for markets that are one outcome of a mutually exclusive event. * **Event and series:** `event_id`, `event_title`, `event_slug`, `event_description`, `parent_event_id`, `series_id`, `series_title`, `frequency`, `yes_sub_title`, `tags`, `category`. * **Lifecycle:** `status`, `archived`, `closed`, `accepting_orders`, `market_start_time`, `market_end_time`, and on resolution `outcome`, `settlement_value_usd` and `settlement_ts`. * **Strikes:** `strike_type`, `floor_strike`, `cap_strike`, `underlying` and `expiration_value` for price, Up/Down, bracket, spread and Over/Under markets. * **Sports and elections:** `sports_market_type`, `competition`, `home_team`, `away_team`, `teams`, `score`, `scheduled_start_time`, `game_end_time`, `event_metadata`, `market_metadata`, `election_type`, `election_country`. * **Fees:** `fee_type`, `fee_rate`, `fee_exponent`, `maker_rebate_rate`, `is_fee_taker_only`, and the older `maker_base_fee_bps` and `taker_base_fee_bps`. * **Resolution oracle (UMA):** `settlement_source`, `uma_bond`, `uma_reward`, `liveness_seconds`. ## Table Schema | Column | Type | Description | | - | - | - | | `market_id` | `VARCHAR` | Condition id of the market as a '0x...' string, shared by its two outcome tokens | | `gamma_market_id` | `VARCHAR` | Polymarket's own market id, shared by the market's two outcome tokens. Null where Polymarket does not list the market | | `event_id` | `VARCHAR` | Polymarket's id of the event the market is listed under, shared by every market of that event. Null where Polymarket does not list the market | | `neg_risk_market_id` | `VARCHAR` | Id of the neg-risk (multi-outcome) market set the market belongs to, as a '0x...' string; null outside one. Not a condition id | | `parent_event_id` | `VARCHAR` | Polymarket's id of the event this market's event is nested under, as sports side events are under their game; null for a top-level event | | `series_id` | `VARCHAR` | Polymarket's id of the recurring series the market's event belongs to; null outside a series | | `series_title` | `VARCHAR` | Name of the recurring series the market's event belongs to; null outside a series | | `event_title` | `VARCHAR` | Title of the event the market is listed under | | `event_slug` | `VARCHAR` | URL slug of the event on polymarket.com | | `event_description` | `VARCHAR` | Description and resolution rules of the event | | `question_id` | `VARCHAR` | Oracle question id of the market as a '0x...' string | | `question` | `VARCHAR` | Concrete question the market resolves | | `market_description` | `VARCHAR` | Market description and resolution rules | | `outcome_id` | `UINT256` | Outcome token id; the table's grain, two rows per market. Joins market_trades and positions on outcome_id | | `outcome_name` | `VARCHAR` | Label of this token's side, e.g. 'Yes' or 'No' (some markets use other labels such as 'Up' or team names) | | `outcome_index` | `INTEGER` | Positional side of this token within its market: 0 for the first token, 1 for the second. Settlement resolves against this position, not the label: outcome 'yes' means index 0 won, 'no' means index 1 won | | `yes_sub_title` | `VARCHAR` | The market's label within its event, such as a team, a candidate or a price range | | `status` | `VARCHAR` | Lifecycle of the market: active while it trades, closed once trading has ended or the market was delisted, settled once its outcome is decided | | `archived` | `BOOLEAN` | Whether the market is archived | | `closed` | `BOOLEAN` | Whether the market is closed | | `accepting_orders` | `BOOLEAN` | Whether the market is accepting orders | | `is_mutually_exclusive_event` | `BOOLEAN` | TRUE where the market is one outcome of a mutually exclusive event (Polymarket's neg-risk markets): exactly one market of the event resolves Yes | | `link` | `VARCHAR` | Page of the market's event on polymarket.com; null where Polymarket does not list the market | | `market_start_time` | `TIMESTAMP` | Time the market started accepting orders | | `market_end_time` | `TIMESTAMP` | Scheduled end time of the market as published by Polymarket; midnight UTC where Polymarket publishes only a date. Not the resolution time; use settlement_ts for that | | `scheduled_start_time` | `TIMESTAMP` | When the underlying event is scheduled to begin, such as a game's kickoff or the start of an Up/Down window. Null where the market's subject has no start time | | `game_end_time` | `TIMESTAMP` | Time the underlying game finished, for sports events; null until the event has closed | | `seconds_delay` | `INTEGER` | Order-matching delay in seconds, used on live in-game markets | | `fpmm` | `VARCHAR` | Address of the market's legacy AMM pool, where one exists | | `image` | `VARCHAR` | Market image URL | | `tags` | `ARRAY(VARCHAR)` | Polymarket category tags as an array of strings; the input behind category | | `category` | `VARCHAR` | Unified category enum shared across venues: sports, crypto, politics, finance, technology, culture, weather, world, health, other. Derived from tags; untagged markets are other. | | `frequency` | `VARCHAR` | How often the market's series recurs: five_min, fifteen_min, hourly, four_hour, daily, weekly, monthly or annual; null outside a recurring series | | `sports_market_type` | `VARCHAR` | Polymarket's type for a sports market, such as moneyline, spreads or totals; null outside sports | | `competition` | `VARCHAR` | Competition Polymarket files a sports event under: usually the league, but the game for esports and the tour for tennis, where event_metadata carries the league | | `home_team` | `VARCHAR` | Home team of a two-team sports event, as Polymarket displays it; null otherwise | | `away_team` | `VARCHAR` | Away team of a two-team sports event, as Polymarket displays it; null otherwise | | `teams` | `VARCHAR` | JSON array of the teams or players of a sports event as Polymarket publishes them, with details such as their id, name, alias, abbreviation, league and, on two-sided events, ordering (home or away). alias, where present, is the name Polymarket displays. Null where the event lists none | | `score` | `VARCHAR` | Latest score Polymarket publishes for the game, final once the event has closed. The format varies by sport | | `event_metadata` | `VARCHAR` | JSON object of the event's details as Polymarket publishes them, such as the league, stage and match format of a sports event, the fixture's ids at sports data providers, and the start and final price of an Up/Down market. Keys vary by event type. Null where Polymarket publishes none | | `market_metadata` | `VARCHAR` | JSON object of the market's sports details as Polymarket publishes them, such as the odds feed's market name, the selection, the points line and the team or player id. A gammaTeamId key matches an id in teams. Null where Polymarket publishes none | | `strike_type` | `VARCHAR` | How the outcome index 0 side resolves against the strikes: greater (above floor_strike), greater_or_equal (at or above it), less (below cap_strike), less_or_equal (at or below it), or between (from floor_strike to cap_strike). On a price bracket a value exactly on the boundary belongs to the higher bracket, so its cap_strike is exclusive; whole-number brackets such as temperatures and post counts include both ends. On reach, dip and hit markets the price only needs to touch the strike during the market's window. Null where the market has no numeric strike. | | `floor_strike` | `DOUBLE` | Lower strike: the line of an Over/Under market, the margin the first-listed side must win by on a spread or handicap, the start price of an Up/Down market, or the lower bound of a bracket or threshold. Null on less and less_or_equal strikes. | | `cap_strike` | `DOUBLE` | Upper strike: the upper bound of a bracket or the threshold of a less or less_or_equal strike. Null on greater and greater_or_equal strikes | | `underlying` | `VARCHAR` | Upper-case ticker of the asset whose price the market tracks; null where the market tracks no asset price or the asset is unknown | | `expiration_value` | `DOUBLE` | Final price an Up/Down market resolved against, as Polymarket publishes it; null elsewhere | | `election_type` | `VARCHAR` | Type of election of an election event, as Polymarket publishes it | | `election_country` | `VARCHAR` | Country or region of an election event, as Polymarket publishes it | | `settlement_source` | `VARCHAR` | Source the market or its event names for resolution, usually a URL | | `fee_type` | `VARCHAR` | Name of the fee schedule the market trades under | | `fee_rate` | `DOUBLE` | Taker fee rate of the market's fee schedule; fee_exponent sets how the fee varies with price. Null where the market charges no fees | | `fee_exponent` | `DOUBLE` | Exponent of the price term in the market's taker fee formula | | `maker_rebate_rate` | `DOUBLE` | Share of the market's taker fees paid back to makers as rebates, between 0 and 1 | | `is_fee_taker_only` | `BOOLEAN` | TRUE where only takers pay the market's fee; null where the market charges no fees | | `maker_base_fee_bps` | `INTEGER` | Maker fee rate in basis points from Polymarket's older fee model. On markets with a fee schedule, fees follow fee_rate instead | | `taker_base_fee_bps` | `INTEGER` | Taker fee rate in basis points from Polymarket's older fee model. On markets with a fee schedule, fees follow fee_rate instead | | `uma_bond` | `DOUBLE` | Bond in USD a proposer posts to propose the market's resolution | | `uma_reward` | `DOUBLE` | Reward in USD paid to the proposer of an undisputed resolution | | `liveness_seconds` | `INTEGER` | Time in seconds a proposed resolution can be disputed. 0 means the oracle's default of two hours | | `is_other_outcome` | `BOOLEAN` | TRUE on the catch-all 'Other' market of a multi-outcome event | | `outcome` | `VARCHAR` | Market resolution: 'yes', 'no', '50/50', or 'unresolved'. Positional, not label-based: 'yes' means outcome index 0 won, 'no' means index 1 won. For non-Yes/No labels (Up/Down, team names) use settlement_value_usd rather than matching the label | | `settlement_value_usd` | `DOUBLE` | Per-share payout of THIS row's token at resolution: 1.0 (won), 0.0 (lost), 0.5 (50/50); null while unresolved. Correct for any label scheme. Same per-side semantics as combo_details.settlement_value_usd | | `settlement_ts` | `TIMESTAMP` | On-chain resolution time of the market, which is also when winning tokens become redeemable; null while unresolved | | `_updated_at` | `TIMESTAMP` | When this row was last written. Unchanged rows keep their stamp. | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=market_details_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=market_details_v2) ## Joins Join trades, positions and candles on `outcome_id`. `market_id` is a `VARCHAR` here but a `VARBINARY` in `market_trades` and `market_actions`. To join those on `market_id`, use `CAST(market_id AS VARCHAR)` on their side. ## Example queries Markets settled in the last 7 days, with the winning side: ```sql theme={null} SELECT event_title, question, outcome_name AS winning_outcome, settlement_ts FROM polymarket_polygon.market_details_v2 WHERE settlement_ts >= NOW() - INTERVAL '7' DAY AND settlement_value_usd = 1 ORDER BY settlement_ts DESC LIMIT 20 ``` Open crypto price markets by underlying asset and series frequency: ```sql theme={null} SELECT underlying, frequency, COUNT(DISTINCT market_id) AS markets FROM polymarket_polygon.market_details_v2 WHERE status = 'active' AND underlying IS NOT NULL GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 20 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `unique_key` | `VARCHAR` | API record key: the neg-risk `event_market_id` for neg-risk markets, the `condition_id` for single markets | > | `condition_id` | `VARCHAR` | Condition ID of the market as a `0x...` varchar, shared by its two outcome tokens: the CTF condition ID, or the Protocol V2 condition ID for markets created on Protocol V2 | > | `event_market_id` | `VARCHAR` | NegRiskAdapter market ID of the overarching multi-outcome event; NULL for single (non-neg-risk) markets | > | `event_market_name` | `VARCHAR` | Overarching event question for neg-risk markets (e.g. `Presidential Election 2024`); `single market` otherwise | > | `event_market_description` | `VARCHAR` | Overarching event description; NULL for single markets | > | `question_id` | `VARCHAR` | UMA/adapter question ID of the market as a `0x...` varchar | > | `question` | `VARCHAR` | Concrete outcome being bet on (e.g. `Will X happen by Y date?`) | > | `market_description` | `VARCHAR` | Market description text from the API | > | `token_id` | `UINT256` | ERC-1155 outcome token ID — the table's grain, two rows per market | > | `token_outcome` | `VARCHAR` | Label of this token's side, e.g. `Yes`/`No` (some markets use other labels like `Up` or team names) | > | `outcome_index` | `INTEGER` | Positional index of this token's side in the payout vector: `0` for the market's first token (API `token_1`), `1` for the second. This — not the `token_outcome` label — is what `outcome` resolves against: `yes` = index 0 won, `no` = index 1 won | > | `token_outcome_name` | `VARCHAR` | The token's side and question in one label, e.g. `Yes-Will X happen?` | > | `active` | `VARCHAR` | Whether the market is active | > | `archived` | `VARCHAR` | Whether the market is archived | > | `closed` | `VARCHAR` | Whether the market is closed | > | `accepting_orders` | `VARCHAR` | Whether the market is accepting orders | > | `enable_order_book` | `VARCHAR` | Whether the order book is enabled | > | `neg_risk` | `VARCHAR` | Whether it's a negative risk market | > | `polymarket_link` | `VARCHAR` | Link to the Polymarket event page (may be broken for archived markets) | > | `market_start_time` | `VARCHAR` | Start time of the market | > | `market_end_time` | `VARCHAR` | End time of the market | > | `game_start_time` | `VARCHAR` | Scheduled start of the underlying game/event for sports markets | > | `seconds_delay` | `VARCHAR` | Order-matching delay in seconds (used on live/in-game markets) | > | `fpmm` | `VARCHAR` | Address of the market's legacy FPMM (AMM) pool where one exists | > | `icon` | `VARCHAR` | Market icon URL | > | `image` | `VARCHAR` | Market image URL | > | `tags` | `ARRAY(VARCHAR)` | Polymarket category tags as an array of strings; the input behind `category` | > | `category` | `VARCHAR` | Unified category shared across prediction market venues: `sports`, `crypto`, `politics`, `finance`, `technology`, `culture`, `weather`, `world`, `health`, `other`. Derived from `tags`; untagged markets are `other` | > | `oracle` | `VARBINARY` | Oracle address from the on-chain MarketPrepared event; NULL for single markets | > | `fee_bips` | `UINT256` | Fee bips from the on-chain MarketPrepared event; NULL for single markets | > | `outcome` | `VARCHAR` | Market resolution: `yes`, `no`, `50/50`, or `unresolved`. Positional, not label-based: `yes` means outcome index 0 won, `no` means index 1 won — for non-Yes/No labels (Up/Down, team names) use `settlement_value`, not a label match | > | `settlement_value` | `DOUBLE` | Per-share dollar payout of **this row's** token at resolution: `1.0` (won), `0.0` (lost), `0.5` (50/50); NULL while unresolved or when the payout vector is non-binary. Derived from `outcome` × `outcome_index`, so it is correct for any label scheme. Same per-side semantics as `combo_details.settlement_value` | > | `resolved_on_timestamp` | `TIMESTAMP` | When the market was resolved; NULL while unresolved | > | `last_uploaded_at` | `TIMESTAMP` | API snapshot stamp for this record (single value across all rows per upload) | > | `content_hash` | `VARBINARY` | Hash over every content column, used to detect real per-token changes between snapshots | > | `last_changed_at` | `TIMESTAMP` | Per-token time the market record last actually changed; advances only when `content_hash` differs from the prior row | # polymarket_polygon.market_prices_hourly Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/market_prices_hourly Polymarket hourly closing price per outcome token. A v1 table with no v2; use ohlcv_hourly_v2 instead. > [!NOTE] > > Current version: **v1** > > . > [!WARNING] > > This table has no v2 and will be deprecated with the other v1 tables. Use [`polymarket_polygon.ohlcv_hourly_v2`](/data-catalog/curated/prediction-markets/polymarket/ohlcv_hourly) instead: its `close` is the same hourly price, carried forward through hours without trades and set to the settlement value in the resolution hour. The `polymarket_polygon.market_prices_hourly` table has the closing price of every Polymarket outcome token for every hour, on Polygon. There is one row per `(hour, token_id)`. While a market is open, hours without trades carry forward the last trade price, up to the latest complete hour. In the hour a market resolves, each token's price is its settlement value, and the carried-forward rows stop. Hours with real trades after resolution keep their actual closing price. Combo token prices are in [`combo_prices_hourly`](/data-catalog/curated/prediction-markets/polymarket/combo_prices_hourly). ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | Month partition derived from `hour` | | `hour` | `TIMESTAMP` | Hour for which the price is valid | | `condition_id` | `VARBINARY` | Unique market condition identifier | | `token_id` | `UINT256` | Token ID for the outcome | | `price` | `DOUBLE` | End-of-hour price of the outcome token | | `_updated_at` | `TIMESTAMP` | When this row was last inserted or updated by the dbt pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=market_prices_hourly](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=market_prices_hourly) ## Moving to ohlcv_hourly_v2 | `market_prices_hourly` | `ohlcv_hourly_v2` | | - | - | | `condition_id` (`VARBINARY`) | `market_id` (`VARCHAR`, `0x…`) | | `token_id` | `outcome_id` | | `price` | `close` | The hourly price of every outcome of one event over the last 7 days: ```sql theme={null} SELECT o.hour, d.question, d.outcome_name, o.close AS price FROM polymarket_polygon.ohlcv_hourly_v2 o JOIN polymarket_polygon.market_details_v2 d ON d.outcome_id = o.outcome_id WHERE o.hour >= NOW() - INTERVAL '7' DAY AND d.event_id = '...' ORDER BY 1, 2, 3 ``` # polymarket_polygon.market_trades Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/market_trades Every Polymarket order-book fill, with price, amount, side and trader addresses, plus Polymarket's market, event and series ids. > [!NOTE] > > Current version: **v2** > · query it as `polymarket_polygon.market_trades_v2` > . The `polymarket_polygon.market_trades` table has one row per order-book fill on Polymarket, on Polygon. It covers every exchange version, shown in `contract_version`: * `v1`: the original CTF exchanges, paid in USDC. * `v2`: CTF Exchange V2, paid in pUSD, from April 2026. * `v3`: ExchangeV3, paid in pUSD. It settles the markets Polymarket calls Protocol V2. Each fill keeps the market labels as they were when the fill was recorded. For the current labels, join [`market_details`](/data-catalog/curated/prediction-markets/polymarket/market_details). Combo trades (multi-leg parlays) are in [`combo_trades`](/data-catalog/curated/prediction-markets/polymarket/combo_trades). A fill can be a plain trade between a buyer and a seller. It can also be a mint or merge, where the exchange creates or redeems Yes/No pairs to fill an order. Every trade appears at least twice: once for each maker order and once for the taker. Filter `WHERE is_taker_side` to count each trade once. This matches the volume Polymarket publishes. Each row is unique on `(block_month, trade_id)`. ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | UTC month of block_time; use it to prune partitions | | `block_number` | `BIGINT` | Block number of the fill | | `block_time` | `TIMESTAMP` | UTC block time of the fill | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `INTEGER` | Index of the event within the transaction | | `trade_id` | `VARCHAR` | Fill identifier, '0x' + tx_hash + ':' + evt_index; unique per fill | | `action` | `VARCHAR` | Type of trade; always 'CLOB trade' (order-book fill) | | `contract_address` | `VARBINARY` | Exchange contract that emitted the fill: the V1 or V2 CTF exchange, or their NegRisk variants. See contract_version for the version | | `market_id` | `VARBINARY` | Condition id of the market, shared by its Yes and No tokens. Joins market_details.market_id | | `event_title` | `VARCHAR` | Title of the event the market is listed under | | `question` | `VARCHAR` | Concrete question the traded market resolves | | `link` | `VARCHAR` | Page of the market's event on polymarket.com; null where Polymarket does not list the market | | `outcome_name` | `VARCHAR` | Label of the token traded, e.g. 'Yes' or 'No' (some markets use other labels such as 'Up' or team names). Null when the token is unknown to market_details | | `is_mutually_exclusive_event` | `BOOLEAN` | TRUE where the market is one outcome of a mutually exclusive event (Polymarket's neg-risk markets) | | `outcome_id` | `UINT256` | Outcome token id traded; joins market_details.outcome_id | | `price` | `DOUBLE` | Price per share of the token traded, 0-1 | | `amount` | `DOUBLE` | USD value of the fill (USDC on V1, pUSD on V2, both treated 1:1 as USD) | | `shares` | `DOUBLE` | Number of outcome shares transferred | | `fee` | `DOUBLE` | Fee charged on this fill in USD, as reported by the exchange. Usually 0 on V1, where fees were not charged in practice; V2 charges a per-market fee that scales with price \* (1 - price) | | `maker` | `VARBINARY` | Address whose order was filled. On the taker leg (is_taker_side) this is the trader who took liquidity | | `taker` | `VARBINARY` | Address filling the order. On the taker leg (is_taker_side) this is the exchange contract itself | | `is_taker_side` | `BOOLEAN` | TRUE on the taker leg of a match: the exchange emits one event per maker order plus one for the taker, so unfiltered sums count each share twice. Filter WHERE is_taker_side for single-counted volume that matches Polymarket's published methodology | | `maker_side` | `VARCHAR` | Side of the maker's order for outcome_id: 'BUY' if the maker acquired outcome tokens (paid collateral), 'SELL' if the maker released them. Always the inverse of taker_side | | `taker_side` | `VARCHAR` | Side of the taker's leg for outcome_id: 'BUY' if the taker acquired outcome tokens, 'SELL' if the taker released them. Always the inverse of maker_side, so whichever of maker or taker is your wallet, read its side directly. On the taker leg the taker is the exchange, so the trader's side is maker_side | | `outcome_index` | `INTEGER` | Positional side of outcome_id within its market: 0 for the market's first token, 1 for the second. Settlement resolves against this position, not the outcome_name label, so use it for Up/Down or team-name markets. NULL when the token is unknown to market_details | | `event_id` | `VARCHAR` | Polymarket's id of the event the market is listed under. Joins market_details.event_id. Null where Polymarket does not list the market | | `series_id` | `VARCHAR` | Polymarket's id of the recurring series the market's event belongs to; null outside a series | | `contract_version` | `VARCHAR` | Version of the exchange contract that settled the fill: 'v1' (original CTF and NegRisk exchanges, USDC collateral), 'v2' (CTF Exchange V2, pUSD collateral) or 'v3' (ExchangeV3, pUSD collateral), which settles the markets Polymarket lists on the contract suite it calls Protocol V2 | | `order_hash` | `VARBINARY` | EIP-712 hash of the filled order. The same order_hash recurs across rows when one resting order is filled in several matches | | `builder` | `VARBINARY` | Builder attribution field (bytes32) from the signed order on v2 and v3 fills; NULL for v1 rows | | `metadata` | `VARBINARY` | Metadata field (bytes32) from the signed order on v2 and v3 fills; NULL for v1 rows | | `_updated_at` | `TIMESTAMP` | Time this row was last inserted or updated | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=market_trades_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=market_trades_v2) ## Query performance `market_trades` is partitioned by `block_month`. Always filter on `block_time` or `block_month`, and for a single market also on `market_id`. ```sql theme={null} SELECT * FROM polymarket_polygon.market_trades_v2 WHERE block_time >= NOW() - INTERVAL '7' DAY AND market_id = 0x... ``` ## Example queries Top markets by single-counted volume over the last 7 days: ```sql theme={null} SELECT event_title, question, SUM(amount) AS volume_usd, COUNT(*) AS trades FROM polymarket_polygon.market_trades_v2 WHERE block_time >= NOW() - INTERVAL '7' DAY AND is_taker_side GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 20 ``` Daily volume of every market in a recurring series, such as a daily crypto Up or Down series: ```sql theme={null} SELECT date_trunc('day', block_time) AS day, SUM(amount) AS volume_usd FROM polymarket_polygon.market_trades_v2 WHERE block_time >= NOW() - INTERVAL '30' DAY AND is_taker_side AND series_id = '...' GROUP BY 1 ORDER BY 1 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `block_month` | `DATE` | UTC month of the event block time (partition key) | > | `block_number` | `BIGINT` | Block number in which the transaction was executed | > | `block_time` | `TIMESTAMP` | UTC event block time | > | `tx_hash` | `VARBINARY` | Transaction hash | > | `evt_index` | `INTEGER` | Event index within the transaction | > | `action` | `VARCHAR` | Type of trade (CLOB or AMM) | > | `contract_address` | `VARBINARY` | Exchange contract that emitted the trade (v1: CTFExchange or NegRiskCTFExchange; v2: the unified CTFExchange V2 contracts; v3: ExchangeV3) | > | `condition_id` | `VARBINARY` | Unique identifier for the YES/NO pair | > | `event_market_name` | `VARCHAR` | Overarching question for negRisk markets | > | `question` | `VARCHAR` | Concrete outcome being bet on | > | `polymarket_link` | `VARCHAR` | Link to Polymarket page (may be broken for archived markets) | > | `token_outcome` | `VARCHAR` | YES or NO token outcome | > | `neg_risk` | `VARCHAR` | Whether this is a neg_risk market | > | `asset_id` | `UINT256` | ERC1155 token ID | > | `price` | `DOUBLE` | Price of the outcome token | > | `amount` | `DOUBLE` | Amount in USD (v2 and v3: pUSD treated 1:1 as USD) | > | `shares` | `DOUBLE` | Number of shares transferred | > | `fee` | `DOUBLE` | Per-trade fee in USD. v1: usually 0 (fees were not charged in practice); v2 and v3: from the OrderFilled fee field; v2 charges it per-market as `fee = C × r × p × (1 − p)` | > | `maker` | `VARBINARY` | Address whose order was filled. On the taker leg (`is_taker_side`) this is the trader who took liquidity | > | `taker` | `VARBINARY` | Address filling the order. On the taker leg (`is_taker_side`) this is the exchange contract itself | > | `is_taker_side` | `BOOLEAN` | TRUE on the taker leg of a CLOB match (one of the two OrderFilled events per match). Filter `WHERE is_taker_side` for single-counted volume that avoids 2x double-counting | > | `maker_side` | `VARCHAR` | Side of the maker's order w\.r.t. `asset_id`: `BUY` if the maker is acquiring outcome tokens, `SELL` if releasing them. Always the inverse of `taker_side` | > | `taker_side` | `VARCHAR` | Side of the taker's leg for `asset_id`: `BUY` if the taker acquired outcome tokens, `SELL` if the taker released them. Always the inverse of `maker_side`, so whichever of `maker` or `taker` is your wallet, read its side directly. On the taker leg (`is_taker_side`) the taker is the exchange, so the trader's side is `maker_side` | > | `outcome_index` | `INTEGER` | Positional side of `asset_id` within its market: `0` for the market's first token, `1` for the second. Settlement resolves against this position, not the `token_outcome` label, so use it for Up/Down or team-name markets. NULL when the token is unknown to `market_details` | > | `event_id` | `VARCHAR` | ID of the overarching neg-risk event as a `0x...` string; NULL for single markets. Same value as `market_details.event_market_id` | > | `contract_version` | `VARCHAR` | Exchange contract version: `v1` (original CTFExchange/NegRiskCTFExchange), `v2` (unified CTFExchange V2, pUSD collateral; rows from April 2026 onward) or `v3` (ExchangeV3, pUSD collateral), which settles the markets Polymarket calls Protocol V2. The V2 pilot markets (`polyv2*` slugs, from September 15, 2026) are Polymarket test trading and appear as `v3` | > | `order_hash` | `VARBINARY` | EIP-712 hash of the filled order, from `OrderFilled.orderHash`. Present on all contract versions; the same `order_hash` recurs across rows when one resting order is filled in multiple matches — group on it to reassemble the partial fills of a single signed order | > | `builder` | `VARBINARY` | Builder attribution field (bytes32) embedded in signed orders on v2 and v3 fills. NULL for v1 rows | > | `metadata` | `VARBINARY` | Arbitrary metadata field (bytes32) in signed orders on v2 and v3 fills. NULL for v1 rows | > | `unique_key` | `VARCHAR` | Unique event/market key | > | `token_outcome_name` | `VARCHAR` | Combined token outcome and question | > | `_updated_at` | `TIMESTAMP` | When this row was last inserted or updated by the dbt pipeline | # polymarket_polygon.ohlcv_hourly Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/ohlcv_hourly Polymarket hourly price candles (open, high, low, close) per outcome token, for markets and Combos, with VWAP and volume. > [!NOTE] > > Current version: **v2** > · query it as `polymarket_polygon.ohlcv_hourly_v2` > . The `polymarket_polygon.ohlcv_hourly` table has hourly price candles (open, high, low, close and volume) for every Polymarket outcome token, with the volume-weighted average price (`vwap`). Each market or combo has two rows per hour, one per side. It covers regular markets **and Combos** (multi-leg parlays) over the full trading history on Polygon. Each row is unique on `(block_month, hour, market_id, outcome_index)`. For market details, join [`market_details`](/data-catalog/curated/prediction-markets/polymarket/market_details) or [`combo_details`](/data-catalog/curated/prediction-markets/polymarket/combo_details) on `outcome_id`. Hours without trades get a **flat bar at the last close**, with zero volume. Open markets get bars up to the current hour. **A market's candles end in the hour it resolves.** In that last bar: * `close` is the settlement value: 1 for the winning side and 0 for the losing side (from `market_details.settlement_value_usd`), 0.5 for 50/50 markets, and the payout share for `partial` combos. * `open` is the last traded price. * `high` and `low` stretch to include the settlement value, so `low <= open, close <= high` always holds. Bars with real trades after resolution are kept with their actual prices. Carried-forward bars after resolution are dropped. > [!NOTE] > > `market_outcome` shows what was known at each bar: `unresolved` before the resolution hour, and the result from that hour on. Past bars are never relabeled. For a market's *current* state, use `market_details` or `combo_details`. v2 removes `market_end_time` from the candles. To see when a market resolved, join `market_details` on `outcome_id` and use `settlement_ts`. ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | UTC month of hour; use it to prune partitions | | `hour` | `TIMESTAMP` | UTC hour bucket of the candle | | `market_id` | `VARCHAR` | Id of the market or combo as a '0x...' string, shared by its two sides: its condition id. Joins market_details and combo_details on market_id. Same keyspace as positions.market_id | | `market_name` | `VARCHAR` | Market question; for combos the generated combo name, null until every leg is labeled | | `outcome` | `VARCHAR` | Current label of the token's side (e.g. Yes/No, Up/Down, Over/Under, or a team name). Metadata that can change; a combo 'Yes' pays only if every leg wins | | `outcome_index` | `INTEGER` | Side of the token: 0 = Yes or the market's first listed outcome, 1 = No or the second | | `category` | `VARCHAR` | Unified category enum (sports, crypto, politics, finance, technology, culture, weather, world, health, other, mixed); for a combo derived from its legs | | `open` | `DOUBLE` | First trade price in the hour, 0-1. Equals the carried close on forward-filled hours. On the resolution-hour bar it keeps the last traded price; only close pins to settlement | | `high` | `DOUBLE` | Highest trade price in the hour. Equals the carried close on forward-filled hours; widened to include the settlement value on the resolution-hour bar | | `low` | `DOUBLE` | Lowest trade price in the hour. Equals the carried close on forward-filled hours; widened to include the settlement value on the resolution-hour bar | | `close` | `DOUBLE` | Last trade price in the hour, 0-1, carried forward through no-trade hours. On the resolution-hour bar it is the settlement value of this side | | `vwap` | `DOUBLE` | Volume-weighted average price of the hour's trades; NULL on forward-filled hours | | `volume_contracts` | `DOUBLE` | Shares traded in the hour, counted on the taker's side only; zero on forward-filled hours | | `volume_usd` | `DOUBLE` | USD notional traded in the hour, counted on the taker's side only; zero on forward-filled hours | | `trade_count` | `BIGINT` | Number of trades in the hour, counted on the taker's side only; zero on forward-filled hours | | `market_outcome` | `VARCHAR` | State of the market AT this hour: 'unresolved' on every bar before the resolution hour, then the final outcome ('yes', 'no', '50/50' for markets, 'partial' for combos with a fractional payout) from the resolution-hour bar onward. Fixed per row, so historical bars never relabel; market_details and combo_details hold the current state. Null only for tokens unknown to both | | `event_title` | `VARCHAR` | Title of the event the market is listed under; null for combos | | `is_forward_filled` | `BOOLEAN` | TRUE if no trades occurred in this hour and the bar was carried from the previous close | | `outcome_id` | `UINT256` | Id of this outcome token. Joins market_details, combo_details, positions, market_trades and combo_trades on outcome_id | | `_updated_at` | `TIMESTAMP` | Time this row was last inserted or updated | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=ohlcv_hourly_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=ohlcv_hourly_v2) ## Query performance `ohlcv_hourly` is partitioned by `block_month`. Always filter on `block_month` or `hour`, and on `market_id` or `outcome_id` for a single market. ## Example query ```sql theme={null} -- Hourly candles for the first side (Yes, Up, or the first team) of the busiest market, last 7 days WITH busiest AS ( SELECT market_id FROM polymarket_polygon.ohlcv_hourly_v2 WHERE hour >= NOW() - INTERVAL '7' DAY GROUP BY 1 ORDER BY SUM(volume_usd) DESC LIMIT 1 ) SELECT hour, market_name, outcome, open, high, low, close, vwap, volume_usd FROM polymarket_polygon.ohlcv_hourly_v2 WHERE market_id = (SELECT market_id FROM busiest) AND outcome_index = 0 AND hour >= NOW() - INTERVAL '7' DAY ORDER BY hour ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `block_month` | `DATE` | UTC month partition derived from `hour` | > | `hour` | `TIMESTAMP` | UTC hour bucket for the candle | > | `market_id` | `VARCHAR` | ID of the market or combo as a `0x...` string, shared by its two sides: `condition_id` for markets, `combo_condition_id` for combos | > | `market_name` | `VARCHAR` | Market question text; for combos the generated `combo_name`, NULL unless every leg is labeled | > | `outcome` | `VARCHAR` | YES or NO token outcome (a combo Yes pays out only if every leg wins) | > | `category` | `VARCHAR` | Unified category (`sports`, `crypto`, `politics`, `finance`, `technology`, `culture`, `weather`, `world`, `health`, `other`, `mixed`); for a combo derived from its legs | > | `open` | `DOUBLE` | First trade price in the hour (0–1 scale). No-trade hours are a flat bar at the carried close. On the resolution-hour bar it keeps the last traded price — settlement pins only the close | > | `high` | `DOUBLE` | Highest trade price in the hour. No-trade hours are a flat bar at the carried close. On the resolution-hour bar, widened to include the settlement value | > | `low` | `DOUBLE` | Lowest trade price in the hour. No-trade hours are a flat bar at the carried close. On the resolution-hour bar, widened to include the settlement value | > | `close` | `DOUBLE` | Last trade price in the hour (0–1 scale). Carried forward through no-trade hours. On the resolution-hour bar, pinned to the settlement value — the decided price for any label scheme | > | `vwap` | `DOUBLE` | Volume-weighted average price. NULL for forward-filled (no-trade) hours | > | `volume_contracts` | `DOUBLE` | Total shares traded in the hour. Zero for forward-filled hours | > | `volume_usd` | `DOUBLE` | Total USD notional volume in the hour. Zero for forward-filled hours | > | `trade_count` | `BIGINT` | Number of trades in the hour. Zero for forward-filled hours | > | `market_end_time` | `TIMESTAMP` | On-chain resolution time; bounds the fill and drives the settlement pin. `ConditionResolution` block time for markets, the decision time for combos (first lost leg, or last leg resolved); NULL while unresolved. Stamped per row at write — unlike `market_outcome` it is not point-in-time, so rows older than the merge window keep NULL after a later resolution until a full refresh | > | `market_outcome` | `VARCHAR` | The market's state **at this hour** (point-in-time): `unresolved` on every bar strictly before the resolution hour, then the actual outcome — `yes`, `no`, `50/50` (markets), `partial` (combos with a 50/50 leg) — from the resolution-hour bar onward, including bars with real post-resolution trades. Immutable per row. NULL only for tokens unknown to both dimensions | > | `event_market_name` | `VARCHAR` | Overarching event name for negRisk markets; NULL for combos | > | `is_forward_filled` | `BOOLEAN` | TRUE if this row was generated by forward-fill (no trades in this hour) | > | `token_id` | `UINT256` | ID of this outcome token: the CTF token ID for markets, the v3 position ID for combos. Joins `market_details`, `combo_details` and positions on `token_id`, and `market_trades` / `combo_trades` on `asset_id` | > | `_updated_at` | `TIMESTAMP` | When this row was last inserted or updated by the dbt pipeline | # polymarket_polygon.open_interest_hourly Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/open_interest_hourly Polymarket hourly open interest and traded volume per market, from when its tokens are first created until it resolves. > [!NOTE] > > Current version: **v2** > · query it as `polymarket_polygon.open_interest_hourly_v2` > . The `polymarket_polygon.open_interest_hourly` table has hourly open interest and traded volume for every Polymarket market. There is one row per `(hour, market_id)`, unique on `(block_month, hour, market_id)`. Rows run from the hour the market's tokens were first created to the hour it resolves. Open interest is the amount outstanding at the end of the hour. Volume is what traded during the hour. Open interest is the number of outcome tokens in circulation. It is rebuilt from every token created and burned on Polymarket's contracts on Polygon. A position moved to Polymarket's Protocol V2 contracts still counts under its original token. History starts in April 2021. Open interest is counted **per side**. On a standalone market, the Yes and No sides are equal. On a market that is one outcome of a mutually exclusive event (Polymarket calls these neg-risk markets), the sides can differ. Converting No tokens of one outcome creates Yes tokens of every other outcome in the event, without adding collateral (USDC or pUSD). So the No side drops and the other outcomes' Yes sides grow. `event_oi_contracts` gives the collateral locked behind the whole event. `event_id` is Polymarket's event id for markets in a mutually exclusive event, and null for standalone markets. In v1 this column held the `0x...` neg-risk id, which is now `neg_risk_market_id` in [`market_details`](/data-catalog/curated/prediction-markets/polymarket/market_details). Each row shows the state at the end of its hour. A decided market has no open interest. So the resolution hour shows zero and the rows stop there, even though people still hold tokens: losing tokens are never redeemed, and winners redeem over weeks. Redemptions are in [`polymarket_polygon.market_actions`](/data-catalog/curated/prediction-markets/polymarket/market_actions). A market that opens and resolves within one hour shows volume but no open interest. > [!NOTE] > > Combos are not included. The collateral behind a combo sits in its legs, so it doesn't add to single-market open interest. > [!WARNING] > > Don't sum `market_oi_yes_contracts` across the members of an event. Because conversions create Yes tokens of other outcomes without adding collateral (USDC or pUSD), the sum can overstate the collateral at stake several times over. Don't sum `event_oi_contracts` across members either, because it is repeated on every member row. For total open interest, take `event_oi_contracts` once per event and hour, grouping by `COALESCE(event_id, market_id)` so that each standalone market counts as its own event. The example below does this. Volume is in this table, not on the candles, because adding up the Yes and No candles counts every Yes-versus-No trade twice. Per-token prices are in [`polymarket_polygon.ohlcv_hourly`](/data-catalog/curated/prediction-markets/polymarket/ohlcv_hourly). ## Table Schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | First day of the UTC month of hour. Partition key; filter on it to limit the data scanned. | | `hour` | `TIMESTAMP` | UTC hour the figures describe. Open interest is the level at the end of it, volume the flow within it. | | `market_id` | `VARCHAR` | Condition id of the market these figures describe, as a '0x...' string. Joins polymarket_polygon.market_details and polymarket_polygon.ohlcv_hourly on market_id. | | `event_id` | `VARCHAR` | Polymarket's id of the event this market is one outcome of, where the event's markets are mutually exclusive. Null for a standalone market. | | `market_oi_yes_contracts` | `DOUBLE` | Yes tokens outstanding at the end of the hour. Zero in the hour the market resolves. | | `market_oi_no_contracts` | `DOUBLE` | No tokens outstanding at the end of the hour. Equal to the Yes side on a standalone market, and lower on an event member whose No tokens have been converted into the Yes tokens of sibling outcomes. Zero in the hour the market resolves. | | `event_oi_contracts` | `DOUBLE` | Open contracts across the undecided members of this market's event at the end of the hour: the Yes tokens of one member plus the No tokens of every other member, the payout whichever outcome wins. A member that resolves early leaves the sum from its resolution hour, since its payout is settled. Repeated on every member row, so summing it across members overstates it. Equal to the Yes side on a standalone market. One contract pays one unit of the quote stablecoin. | | `volume_contracts` | `DOUBLE` | Outcome tokens that changed hands in the hour, both sides of the market together, each match counted once. | | `volume_usd` | `DOUBLE` | Cash that changed hands in the hour, in the market's quote stablecoin, each match counted once from the aggressor's side. | | `trade_count` | `BIGINT` | Matches in the hour, both sides of the market together. | | `_updated_at` | `TIMESTAMP` | When the row was last written by the pipeline | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=open_interest_hourly_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=open_interest_hourly_v2) ## Query performance `block_month` is the partition column. Always filter on `block_month` or `hour`. ## Example query ```sql theme={null} -- Total open interest at the end of each UTC day, last 30 days. -- event_oi_contracts repeats on every market of an event, so take it once per event. -- A market without an event_id is its own event. WITH per_event AS ( SELECT CAST(hour AS DATE) AS day, COALESCE(event_id, market_id) AS event_key, MAX(event_oi_contracts) AS open_interest_contracts FROM polymarket_polygon.open_interest_hourly_v2 WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '30' DAY) AND hour >= CURRENT_DATE - INTERVAL '30' DAY AND HOUR(hour) = 23 -- the 23:00 row is the level at the end of the day GROUP BY 1, 2 ) SELECT day, SUM(open_interest_contracts) AS open_interest_contracts FROM per_event GROUP BY 1 ORDER BY 1 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `block_month` | `DATE` | First day of the UTC month of `hour`. Partition key | > | `hour` | `TIMESTAMP` | UTC hour the figures describe. Open interest is the level at the end of it, volume the flow within it | > | `market_id` | `VARCHAR` | Market condition ID. Joins `polymarket_polygon.market_details` on `condition_id` and `polymarket_polygon.ohlcv_hourly` on `market_id` | > | `event_id` | `VARCHAR` | Event this market is one outcome of, when the venue groups markets into a mutually exclusive set. NULL for a standalone market | > | `market_oi_yes_contracts` | `DOUBLE` | Yes tokens outstanding at the end of the hour. Zero in the hour the market resolves | > | `market_oi_no_contracts` | `DOUBLE` | No tokens outstanding at the end of the hour. Equal to the Yes side on a standalone market. Lower on an event member whose No tokens have been converted into Yes tokens of sibling outcomes. Zero in the hour the market resolves | > | `event_oi_contracts` | `DOUBLE` | Open contracts across the undecided members of the market's event at the end of the hour: the Yes tokens of one member plus the No tokens of every other member, which is the payout whichever outcome wins. A member that resolves early drops out of the sum from its resolution hour. Equal to the Yes side on a standalone market. One contract pays 1 unit of the quote stablecoin | > | `volume_contracts` | `DOUBLE` | Outcome tokens traded in the hour, both sides together, each match counted once | > | `volume_usd` | `DOUBLE` | Cash traded in the hour in the quote stablecoin, each match counted once from the aggressor's side | > | `trade_count` | `BIGINT` | Matches in the hour, both sides together | > | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline | # Polymarket Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/overview Curated Polymarket prediction market datasets on Dune Polymarket is the leading onchain prediction market, operating on Polygon. Dune's curated Polymarket tables provide market metadata, trade-level activity, position lifecycle actions, user positions, and pricing at multiple time granularities — covering the v1, v2 and v3 exchanges and **Combos** (multi-leg parlays). > [!NOTE] > > **Version naming.** What Polymarket calls "Protocol V2" is `contract_version = 'v3'` in these tables. Our `'v2'` is CTF Exchange V2, the exchange upgrade from April 2026 that still settles CTF tokens. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~1 hour · **Chain:** Polygon ## Markets > [card] [polymarket_polygon.market_trades](/data-catalog/curated/prediction-markets/polymarket/market_trades) > > Trade-level activity across all market outcomes (v1, v2 and v3 exchanges) > [card] [polymarket_polygon.market_details](/data-catalog/curated/prediction-markets/polymarket/market_details) > > Enriched market metadata, lifecycle status, and resolution fields > [card] [polymarket_polygon.market_actions](/data-catalog/curated/prediction-markets/polymarket/market_actions) > > Position lifecycle actions: splits, merges, redemptions, neg-risk converts > [card] [polymarket_polygon.ohlcv_hourly](/data-catalog/curated/prediction-markets/polymarket/ohlcv_hourly) > > Hourly OHLCV candles per outcome token, markets and combos > [card] [polymarket_polygon.open_interest_hourly](/data-catalog/curated/prediction-markets/polymarket/open_interest_hourly) > > Hourly open interest and traded volume per market, from first mint to resolution > [card] [polymarket_polygon.market_prices_hourly](/data-catalog/curated/prediction-markets/polymarket/market_prices_hourly) > > Hourly outcome token prices (v1 only; in v2, use ohlcv_hourly) > [card] [polymarket_polygon.positions](/data-catalog/curated/prediction-markets/polymarket/positions) > > Daily wallet holdings and their USD value, markets and combos ## Combos (multi-leg parlays) Polymarket **Combos** are multi-leg positions (e.g. "Team A wins AND Team B wins") that settle through the v3 contract suite. A combo's YES token pays out only if every leg wins; its price is the joint probability. The tables cover the complete combo trading history (from May 29, 2026, when combos went live). > [card] [polymarket_polygon.combo_trades](/data-catalog/curated/prediction-markets/polymarket/combo_trades) > > Combo trade fills on the v3 Exchange with joint-probability prices and fees > [card] [polymarket_polygon.combo_details](/data-catalog/curated/prediction-markets/polymarket/combo_details) > > Combo dimension: expanded legs, generated names, and resolution status > [card] [polymarket_polygon.combo_actions](/data-catalog/curated/prediction-markets/polymarket/combo_actions) > > Combo lifecycle: splits, merges, redemptions, and structuring primitives > [card] [polymarket_polygon.combo_prices_hourly](/data-catalog/curated/prediction-markets/polymarket/combo_prices_hourly) > > Hourly combo token prices (joint probabilities) ## Users > [card] [polymarket_polygon.users_address_lookup](/data-catalog/curated/prediction-markets/polymarket/users_address_lookup) > > Proxy wallet ↔ owner address mapping with first-funding metadata ## Notes * `market_trades` includes three matching types: complementary trades (buyer ↔ seller), MINT (new outcome tokens created), and MERGE (YES+NO redeemed for collateral). Filter `WHERE is_taker_side` for single-counted volume that matches Polymarket's published methodology. * Price tables are forward-filled from observed trade activity. `ohlcv_hourly` is the richest pricing table (full candles, VWAP, volume) and covers both markets and combos. A decided series ends on its resolution-hour bar, whose close is the exact settlement value; `market_outcome` is point-in-time per bar, so historical candles never relabel. * A position migrated from the CTF to Protocol V2 keeps its original token ID (`outcome_id`) in `market_details`, `positions` and `open_interest_hourly`. * The V2 pilot markets (`polyv2*` slugs, live from September 15, 2026 until the Protocol V2 cutover) were Polymarket's test trading on the new contracts and appear as `'v3'` rows. * In the v2 tables, `market_id` is the market's condition id and `outcome_id` its outcome token id, on markets and combos alike; markets and combos live in different keyspaces — join `market_details` or `combo_details` for human-readable names. `event_id` and `series_id` are Polymarket's own event and series ids. The v1 tables name these `condition_id`, `token_id`/`asset_id` and `combo_condition_id`. * `positions` carries balances and prices only; join `market_details` / `combo_details` on `outcome_id` for everything descriptive. Read a market's winning side from `outcome_index` and `settlement_value_usd` rather than matching `outcome_name` labels, which breaks on Up/Down, Over/Under, and team-name markets. * Trade and price tables are partitioned by `block_month` — always filter on time. # polymarket_polygon.positions Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/positions Daily Polymarket holdings per wallet and outcome token, with their USD value. > [!NOTE] > > Current version: **v2** > · query it as `polymarket_polygon.positions_v2` > . The `polymarket_polygon.positions` table shows what every wallet holds each day and what it is worth. It covers regular markets and **Combos** (multi-leg parlays, `is_combo = TRUE`). Positions are valued at the day's closing price from [`ohlcv_hourly`](/data-catalog/curated/prediction-markets/polymarket/ohlcv_hourly). Once a market is decided, they are valued at its exact payout. There is one row per day, wallet and outcome token, unique on `(day, address, market_id, outcome_index)`. The table holds balances and prices only. For market names, outcomes, resolution and links, join on `outcome_id` to [`market_details`](/data-catalog/curated/prediction-markets/polymarket/market_details) for markets or [`combo_details`](/data-catalog/curated/prediction-markets/polymarket/combo_details) for combos. Tokens missing from those tables are left out. It covers both generations of Polymarket contracts: the original Conditional Tokens contracts (CTF) and Protocol V2. A position moved from the CTF to Protocol V2 keeps its `outcome_id`, so the wallet's history continues on the same id. > [!NOTE] > > **Rows left out:** > > * Zero balances. Once a wallet exits a position, it has no more rows for it. > * The address where No tokens are burned (`kNoTokenBurnAddress` of the NegRiskAdapter contract). It is not a real holder. > * From the day after a market is decided, positions worth less than one cent: losing positions and tiny winning leftovers that cannot be redeemed. The decision day still shows every position, and earlier days are complete. ## Table Schema | Column | Type | Description | | - | - | - | | `day` | `DATE` | Date of the balance snapshot | | `address` | `VARBINARY` | Wallet holding the position | | `market_id` | `VARCHAR` | Id of the market or combo this token belongs to: its condition id as a '0x...' string. Joins market_details, combo_details and ohlcv_hourly on market_id, and groups the two sides of one market or combo. Not the neg_risk_market_id | | `outcome_id` | `UINT256` | Id of the exact token held (the market side or combo side). Join it to market_details.outcome_id (markets) or combo_details.outcome_id (combos) for names, legs, settlement values, and more | | `outcome_index` | `INTEGER` | Side of the token held: 0 = Yes or the market's first listed outcome, 1 = No or the second | | `is_combo` | `BOOLEAN` | TRUE if this is a Combo (a multi-leg parlay), FALSE for a regular market | | `balance` | `DOUBLE` | Number of shares held. Which side the token is (Yes/No/Up/team name) and how the market resolved live in market_details / combo_details, joined on outcome_id | | `price` | `DOUBLE` | USD price of one share on that day: the day-close trade price (carried through quiet days; latest available for the current day) until decided, then the settlement value -- 1/0 per side, 0.5 for 50/50 markets, the payout fraction for combos. Null only while undecided and never traded | | `balance_usd` | `DOUBLE` | USD value of the position (balance \* price; a winning share pays \$1). Null when price is null | | `_position_updated_at` | `TIMESTAMP` | When this balance last changed onchain | | `_updated_at` | `TIMESTAMP` | Row change watermark for incremental sync: the build time of the row's last actual change (unchanged rows are not restamped). Settlement repricing inside the merge window bumps it; rows older than the window are frozen until a full refresh | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=positions_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=positions_v2) ## Query performance `positions` is partitioned by `day`. Always filter on `day`. `market_id` is a `0x...` string here, so it joins `market_details` directly. `combo_details` stores `market_id` as `VARBINARY`, so join combos on `outcome_id`. ## Example queries ```sql theme={null} -- Portfolio value of one wallet over the last 30 days SELECT day, SUM(balance_usd) AS portfolio_usd FROM polymarket_polygon.positions_v2 WHERE address = 0x... AND day >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY 1 ORDER BY 1 ``` ```sql theme={null} -- Largest holders of one market's first side (Yes) on the latest snapshot day, -- with market metadata joined in on outcome_id SELECT p.address, p.balance, p.balance_usd, m.question, m.outcome_name FROM polymarket_polygon.positions_v2 AS p JOIN polymarket_polygon.market_details_v2 AS m ON m.outcome_id = p.outcome_id WHERE p.day = CURRENT_DATE - INTERVAL '1' DAY AND m.question = 'Will X happen by Y date?' AND p.outcome_index = 0 ORDER BY p.balance DESC LIMIT 20 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `day` | `DATE` | Date of the balance snapshot | > | `address` | `VARBINARY` | Wallet holding the position | > | `market_id` | `VARCHAR` | ID of the market or combo this token belongs to, as a `0x...` string: `condition_id` for markets, `combo_condition_id` for combos. Joins `ohlcv_hourly` and `prediction_markets.trades` directly on `market_id`, and groups the two sides of one market or combo. Not the neg-risk `event_market_id` | > | `token_id` | `UINT256` | ID of the exact token held (the market side or combo side). Join it to `market_details.token_id` (markets) or `combo_details.token_id` (combos) for names, legs, and settlement values | > | `is_combo` | `BOOLEAN` | TRUE if this is a Combo (a multi-leg parlay), FALSE for a regular market | > | `balance` | `DOUBLE` | Number of shares held. Which side the token is (Yes/No/Up/team name) and how the market resolved live in `market_details` / `combo_details`, joined on `token_id` | > | `price` | `DOUBLE` | USD price of one share on that day: the day-close trade price (carried through quiet days; latest available for the current day) until decided, then the settlement value — 1/0 per side, 0.5 for 50/50 markets, the payout fraction for combos. NULL only while undecided and never traded | > | `balance_usd` | `DOUBLE` | USD value of the position (`balance * price`; a winning share pays \$1). NULL when `price` is NULL | > | `_position_updated_at` | `TIMESTAMP` | When this balance last changed onchain | > | `_updated_at` | `TIMESTAMP` | Row change watermark for incremental sync: the build time of the row's last actual change (unchanged rows are not restamped) | # polymarket_polygon.users_address_lookup Source: https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/users_address_lookup Maps each Polymarket wallet to its owner, with wallet type, creation and first funding. > [!NOTE] > > Current version: **v2** > · query it as `polymarket_polygon.users_address_lookup_v2` > . The `polymarket_polygon.users_address_lookup` table maps each Polymarket wallet to its owner. Polymarket users trade from a wallet Polymarket creates for them: a Safe, a Magic wallet or a deposit wallet. The table also records when each wallet was created and first funded. There is one row per wallet, unique on `polymarket_wallet`. Deposit wallets record no owner, so `owner` is NULL on those rows. Use it to find who owns the `maker` and `taker` addresses in [`market_trades`](/data-catalog/curated/prediction-markets/polymarket/market_trades) or the `address` in [`positions`](/data-catalog/curated/prediction-markets/polymarket/positions). ## Table Schema | Column | Type | Description | | - | - | - | | `created_time` | `TIMESTAMP` | Timestamp when the Polymarket wallet was created | | `block_number` | `BIGINT` | Block number when the Polymarket wallet was created | | `wallet_type` | `VARCHAR` | Type of wallet: safe, magic.link or deposit wallet | | `owner` | `VARBINARY` | Owner address of the Polymarket wallet | | `polymarket_wallet` | `VARBINARY` | Polymarket wallet address | | `created_tx_hash` | `VARBINARY` | Transaction hash of the wallet creation | | `first_funded_time` | `TIMESTAMP` | Timestamp of first funding received by the Polymarket wallet | | `first_funded_by` | `VARBINARY` | Address that first funded the Polymarket wallet | | `first_funded_tx_hash` | `VARBINARY` | Transaction hash of first funding | | `has_been_funded` | `BOOLEAN` | Boolean indicating if the wallet has ever received funds | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=users_address_lookup_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polymarket_polygon\&table_name_t6f0df=users_address_lookup_v2) ## Example query ```sql theme={null} -- New Polymarket wallets per week by wallet type, last 12 weeks SELECT DATE_TRUNC('week', created_time) AS week, wallet_type, COUNT(*) AS wallets, COUNT_IF(has_been_funded) AS funded_wallets FROM polymarket_polygon.users_address_lookup_v2 WHERE created_time >= NOW() - INTERVAL '84' DAY GROUP BY 1, 2 ORDER BY 1, 2 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `created_time` | `TIMESTAMP` | Timestamp when the Polymarket wallet was created | > | `block_number` | `BIGINT` | Block number when the Polymarket wallet was created | > | `wallet_type` | `VARCHAR` | Type of wallet (safe or magic) | > | `owner` | `VARBINARY` | Owner address of the Polymarket wallet | > | `polymarket_wallet` | `VARBINARY` | Polymarket proxy wallet address | > | `created_tx_hash` | `VARBINARY` | Transaction hash of the wallet creation | > | `first_funded_time` | `TIMESTAMP` | Timestamp of first funding received by the wallet | > | `first_funded_by` | `VARBINARY` | Address that first funded the wallet | > | `first_funded_tx_hash` | `VARBINARY` | Transaction hash of first funding | > | `has_been_funded` | `BOOLEAN` | Whether the wallet has ever received funds | # prediction_markets.markets Source: https://docs.dune.com/data-catalog/curated/prediction-markets/prediction_markets/markets Polymarket and Kalshi markets in one table, one row per binary market, with status, category, series and settlement. > [!NOTE] > > Current version: **v2** > · query it as `prediction_markets.markets_v2` > . The `prediction_markets.markets` table lists Polymarket and Kalshi markets in one table, with the same column names for both venues, so one query covers both. It has one row per binary market, unique on `(venue, market_id)`. On Polymarket, `market_id` is the market's condition id. For Polymarket Combos (multi-leg parlays, `is_parlay = TRUE`) it is the combo's condition id. On Kalshi, it is the market ticker. This table holds market names and attributes. [`prediction_markets.trades`](/data-catalog/curated/prediction-markets/prediction_markets/trades) and [`prediction_markets.ohlcv_hourly`](/data-catalog/curated/prediction-markets/prediction_markets/ohlcv_hourly) hold trades and prices only. Join them to this table on `(venue, market_id)`. Every market is shown from its **Yes side**. On Polymarket, Yes is the market's first token (`outcome_index = 0`), the side settlement is decided against. So `yes_outcome_id`, `resolved_outcome` and `settlement_value_usd` always agree. On Kalshi, the table covers every single market Kalshi has listed, traded or not, plus every parlay that has traded at least once. Polymarket rows take their event, series and strike details from Polymarket's own listing data. So `event_id`, `event_name`, `series_id`, `frequency`, `strike_type`, `floor_strike` and `cap_strike` are filled for Polymarket as well as Kalshi. `event_id` is Polymarket's event id. It is set on every market Polymarket lists, not only on multi-outcome events. > [!NOTE] > > For markets without a natural Yes (team vs team, candidate vs candidate), Yes is simply whichever side the venue listed first. Check `yes_outcome_name` before reading the Yes side as an affirmative answer. ## Table Schema | Column | Type | Description | | - | - | - | | `venue` | `VARCHAR` | Venue the market trades on. | | `market_id` | `VARCHAR` | Market identifier, unique within a venue. The condition id for Polymarket markets and Combos, the ticker for Kalshi. Joins prediction_markets.trades and prediction_markets.ohlcv_hourly on (venue, market_id). | | `event_id` | `VARCHAR` | Parent event grouping related markets. NULL for Polymarket Combos and for Polymarket markets the venue does not list. | | `series_id` | `VARCHAR` | Recurring series the market belongs to. NULL outside a series, for Polymarket Combos and for Polymarket markets the venue does not list. | | `yes_outcome_id` | `VARCHAR` | Identifier of the Yes side. The Yes token on Polymarket; the market itself on Kalshi, where both sides trade on one instrument. | | `no_outcome_id` | `VARCHAR` | Identifier of the No side. The No token on Polymarket; NULL on Kalshi. | | `yes_outcome_name` | `VARCHAR` | Label of the Yes side as the venue shows it. Usually Yes, Up or Over. For markets without a natural Yes (team vs team, candidate vs candidate) it is whichever side the venue listed first, so check it before reading the Yes side as an affirmative answer. | | `no_outcome_name` | `VARCHAR` | Label of the No side as the venue shows it. | | `question` | `VARCHAR` | The market question. | | `event_name` | `VARCHAR` | Title of the parent event. NULL for Polymarket Combos and for Polymarket markets the venue does not list. | | `category` | `VARCHAR` | Unified topic category. Parlays take the category of their legs, or `mixed` when the legs span several categories. | | `category_native` | `VARCHAR` | The venue's own classification: Polymarket's comma-separated tags, Kalshi's single coarse category. NULL for Polymarket Combos. | | `link` | `VARCHAR` | URL of the market on the venue's website. NULL for parlays on both venues, which have no public page. | | `status` | `VARCHAR` | Lifecycle state. `active` while the market is open for trading (including Kalshi markets not yet opened), `closed` when trading has stopped or the venue delisted the market without a result, `settled` once resolved. | | `is_resolved` | `BOOLEAN` | TRUE once the market has a final result. A resolved market is always `settled`; on Kalshi a market can be `settled` without a published result, in which case this is FALSE. | | `is_parlay` | `BOOLEAN` | TRUE for multi-leg parlays: Kalshi parlays and Polymarket Combos. Filter these out for like-for-like comparisons of single markets. | | `leg_count` | `INTEGER` | Number of legs in a parlay. NULL for single markets. | | `legs` | `VARCHAR` | The parlay's legs as a JSON array. On Kalshi each leg names its event, market and required side; on Polymarket each leg is a 'question: outcome' label. NULL for single markets. | | `is_mutually_exclusive_event` | `BOOLEAN` | TRUE when at most one market in the parent event can resolve Yes, such as a multi-candidate election. FALSE when unknown. | | `frequency` | `VARCHAR` | How often the market's series recurs: five_min, fifteen_min, hourly, four_hour, daily, weekly, monthly, quarterly, annual, one_off or custom. NULL outside a series. Useful for excluding high-frequency series from cross-venue aggregates. | | `market_start_time` | `TIMESTAMP` | When trading opened. | | `market_end_time` | `TIMESTAMP` | Scheduled close of trading. On Kalshi this reflects later changes to the close date. On Polymarket it is the venue's published end date, which is often inaccurate; use settlement_ts and status for the actual lifecycle. | | `settlement_ts` | `TIMESTAMP` | When the outcome became final; the payout time where the venue publishes one, otherwise the time the outcome was decided. NULL until resolved. | | `resolved_outcome` | `VARCHAR` | How the market resolved: `yes` or `no`, `void` for a refund, or `scalar` for a fractional payout (Kalshi scalar markets, Polymarket Combos with a voided leg). NULL while unresolved. | | `settlement_value_usd` | `DOUBLE` | Payout per Yes contract at settlement: 1.0 when Yes won, 0.0 when No won, 0.5 for a void, a fraction for scalar settlements. NULL while unresolved. | | `strike_type` | `VARCHAR` | How the Yes side resolves against the strikes of a threshold or range market: greater, greater_or_equal, less, less_or_equal, between, and so on. On reach, dip and hit markets the price only needs to touch the strike during the market's window. NULL where the market has no numeric strike. | | `floor_strike` | `DOUBLE` | Lower strike of a threshold or range market. | | `cap_strike` | `DOUBLE` | Upper strike of a range market, or the threshold of a less or less_or_equal strike. | | `rules` | `VARCHAR` | Resolution rules as published by the venue. NULL for Polymarket Combos, whose outcome follows from their legs. | | `_updated_at` | `TIMESTAMP` | When this row was last written. Unchanged rows keep their stamp. | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prediction_markets\&table_name_t6f0df=markets_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prediction_markets\&table_name_t6f0df=markets_v2) ## Example queries ```sql theme={null} -- Active single markets by category across both venues SELECT venue, category, COUNT(*) AS active_markets FROM prediction_markets.markets_v2 WHERE status = 'active' AND is_parlay = FALSE GROUP BY 1, 2 ORDER BY 3 DESC ``` ```sql theme={null} -- Markets settled in the last 7 days with their Yes-side payout SELECT venue, market_id, question, yes_outcome_name, resolved_outcome, settlement_value_usd, settlement_ts FROM prediction_markets.markets_v2 WHERE is_resolved AND settlement_ts >= NOW() - INTERVAL '7' DAY ORDER BY settlement_ts DESC LIMIT 50 ``` ```sql theme={null} -- Active single markets per series frequency, to exclude high-frequency series from aggregates SELECT venue, frequency, COUNT(*) AS active_markets FROM prediction_markets.markets_v2 WHERE status = 'active' AND is_parlay = FALSE GROUP BY 1, 2 ORDER BY 1, 3 DESC ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `venue` | `VARCHAR` | Venue identifier (`polymarket` or `kalshi`) | > | `market_id` | `VARCHAR` | Market identifier, unique within a venue: Polymarket `condition_id` in 0x-hex, the combo condition ID for Polymarket Combos, Kalshi ticker. Joins `prediction_markets.trades` and `prediction_markets.ohlcv_hourly` on `(venue, market_id)` | > | `event_id` | `VARCHAR` | Parent event grouping related markets. Always populated on Kalshi; on Polymarket only for markets that belong to a multi-outcome (neg-risk) event. NULL for Combos | > | `series_id` | `VARCHAR` | Recurring series the market was created from. Kalshi only; NULL on Polymarket, which has no series concept | > | `yes_outcome_id` | `VARCHAR` | Identifier of the Yes side: the token at `outcome_index = 0` on Polymarket, the market itself on Kalshi, where both sides trade on one instrument | > | `no_outcome_id` | `VARCHAR` | Identifier of the No side: the token at `outcome_index = 1` on Polymarket. NULL on Kalshi | > | `yes_outcome_name` | `VARCHAR` | Label of the Yes side as the venue shows it, usually `Yes`, `Up` or `Over`. For markets without a natural Yes it is whichever side the venue listed first | > | `no_outcome_name` | `VARCHAR` | Label of the No side as the venue shows it | > | `question` | `VARCHAR` | The market question. For Combos the generated combo name, NULL until every leg is labeled | > | `event_name` | `VARCHAR` | Title of the parent event. NULL for standalone Polymarket markets and Combos | > | `category` | `VARCHAR` | Unified topic category: `sports`, `crypto`, `politics`, `finance`, `technology`, `culture`, `weather`, `world`, `health`, `other`. Parlays take the category of their legs, or `mixed` when the legs span several categories | > | `category_native` | `VARCHAR` | The venue's own classification: Polymarket's comma-separated tags, Kalshi's single coarse category. NULL for Polymarket Combos | > | `link` | `VARCHAR` | URL of the market on the venue's website. NULL for parlays on both venues, which have no public page | > | `status` | `VARCHAR` | Lifecycle state: `active` while open for trading (including Kalshi markets not yet opened), `closed` when trading has stopped or the venue delisted the market without a result, `settled` once resolved | > | `is_resolved` | `BOOLEAN` | TRUE once the market has a final result. A resolved market is always `settled`; a Kalshi market can be `settled` without a published result, in which case this is FALSE | > | `is_parlay` | `BOOLEAN` | TRUE for multi-leg parlays: Kalshi parlays and Polymarket Combos. Filter `is_parlay = FALSE` for like-for-like single-market comparisons | > | `leg_count` | `INTEGER` | Number of legs in a parlay. NULL for single markets | > | `legs` | `VARCHAR` | The parlay's legs as a JSON array. On Kalshi each leg names its event, market and required side; on Polymarket each leg is a `question: outcome` label. NULL for single markets | > | `is_mutually_exclusive_event` | `BOOLEAN` | TRUE when at most one market in the parent event can resolve Yes, such as a multi-candidate election (Kalshi mutually exclusive events, Polymarket neg-risk events). FALSE when unknown | > | `frequency` | `VARCHAR` | How often the market's series recurs: `fifteen_min`, `hourly`, `daily`, `weekly`, `monthly`, `quarterly`, `annual`, `one_off` or `custom`. Kalshi only; NULL on Polymarket. Useful for excluding high-frequency series from cross-venue aggregates | > | `market_start_time` | `TIMESTAMP` | When trading opened. For Combos, when the combo was registered on-chain | > | `market_end_time` | `TIMESTAMP` | Scheduled close of trading. On Kalshi this reflects later changes to the close date. On Polymarket it is the venue's published end date, which is often inaccurate; use `settlement_ts` and `status` for the actual lifecycle. NULL for Combos | > | `settlement_ts` | `TIMESTAMP` | When the market settled. NULL until resolved | > | `resolved_outcome` | `VARCHAR` | How the market resolved: `yes`, `no`, `void` for a refund, or `scalar` for a fractional payout (Kalshi scalar markets, Polymarket Combos with a voided leg). NULL while unresolved | > | `settlement_value_usd` | `DOUBLE` | Payout per Yes contract at settlement: `1.0` when Yes won, `0.0` when No won, `0.5` for a void, a fraction for scalar settlements. NULL while unresolved | > | `strike_type` | `VARCHAR` | Structure of a Kalshi threshold or range market (`greater`, `less`, `between`, and so on). NULL on Polymarket | > | `floor_strike` | `DOUBLE` | Lower strike of a Kalshi threshold or range market. NULL on Polymarket | > | `cap_strike` | `DOUBLE` | Upper strike of a Kalshi range market. NULL on Polymarket | > | `rules` | `VARCHAR` | Resolution rules as published by the venue. NULL for Polymarket Combos, whose outcome follows from their legs | > | `source_updated_at` | `TIMESTAMP` | When the market record last changed at the venue; for Polymarket Combos, when Dune last recomputed the combo from its legs. Safe to use as a sync watermark | > | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline. Unchanged rows keep their stamp | # prediction_markets.ohlcv_hourly Source: https://docs.dune.com/data-catalog/curated/prediction-markets/prediction_markets/ohlcv_hourly Hourly price candles for Polymarket and Kalshi markets in one table, priced as the probability of Yes. > [!NOTE] > > Current version: **v2** > · query it as `prediction_markets.ohlcv_hourly_v2` > . The `prediction_markets.ohlcv_hourly` table holds hourly price candles (open, high, low, close and volume) for Polymarket and Kalshi markets. Polymarket Combos (multi-leg parlays) are included under the combo's condition id. The table has one row per `(venue, hour, market_id)`, unique on `(venue, block_month, hour, market_id)`. Prices are the **probability of Yes**, between 0 and 1. The probability of No is `1 - close`. Volume covers the whole market, with each trade counted once. An hour without trades gets a flat bar at the last price, with zero volume and `is_forward_filled = TRUE`. For market names and attributes, join [`prediction_markets.markets`](/data-catalog/curated/prediction-markets/prediction_markets/markets) on `(venue, market_id)`. Only `category` is repeated here, because most queries filter on it. **Settlement.** A settled market's last candle closes at the Yes payout: `1` or `0`, `0.5` for a void, or the exact fraction for a scalar market. `high` and `low` stretch to include it, and `open` keeps the last traded price. No flat bars are added after that candle. Candles with real trades after settlement keep their actual prices. > [!NOTE] > > Polymarket has one Yes row per market and hour. When only the No side traded in an hour, the Yes bar is computed as `1 - P(No)`, with high and low swapped. Combo volume comes from the Yes bar only, because every combo trade is recorded on the Yes token. ## Table Schema | Column | Type | Description | | - | - | - | | `venue` | `VARCHAR` | `polymarket` or `kalshi` | | `block_month` | `DATE` | Month of the candle. Partition key; filter on it for faster queries. | | `hour` | `TIMESTAMP` | Start of the hour the candle covers, UTC. | | `market_id` | `VARCHAR` | Market the candle belongs to. Joins prediction_markets.markets on (venue, market_id). | | `category` | `VARCHAR` | Unified topic category of the market, same values as prediction_markets.markets. | | `open` | `DOUBLE` | Probability of Yes at the first trade of the hour. | | `high` | `DOUBLE` | Highest probability of Yes traded in the hour. | | `low` | `DOUBLE` | Lowest probability of Yes traded in the hour. | | `close` | `DOUBLE` | Probability of Yes at the last trade of the hour. On a settled market's final candle this is the settlement value. | | `vwap` | `DOUBLE` | Volume-weighted average probability of Yes over the hour. NULL when nothing traded. | | `volume_contracts` | `DOUBLE` | Contracts traded in the hour across both sides of the market. | | `volume_usd` | `DOUBLE` | Cash traded in the hour across both sides of the market, in USD. Use volume_contracts for a side-independent measure. | | `trade_count` | `BIGINT` | Trades in the hour across both sides of the market. | | `market_outcome` | `VARCHAR` | The market's state as of this candle: `unresolved` until the settlement candle, then `yes`, `no`, `void` (refund) or `scalar` (fractional payout) from that candle onward, the same vocabulary as prediction_markets.markets.resolved_outcome. Historical candles never change. For the current state use prediction_markets.markets. | | `is_forward_filled` | `BOOLEAN` | TRUE when nothing traded in the hour and the candle repeats the previous close with zero volume. | | `_updated_at` | `TIMESTAMP` | When this row was last written. Unchanged rows keep their stamp. | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prediction_markets\&table_name_t6f0df=ohlcv_hourly_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prediction_markets\&table_name_t6f0df=ohlcv_hourly_v2) ## Query performance The table is partitioned by `block_month`. Always filter on `block_month` or `hour`. ## Example queries ```sql theme={null} -- Daily VWAP across both venues for a single category, last 30 days SELECT venue, DATE_TRUNC('day', hour) AS day, AVG(vwap) AS avg_daily_vwap, SUM(volume_usd) AS volume_usd FROM prediction_markets.ohlcv_hourly_v2 WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE) - INTERVAL '1' MONTH AND hour >= NOW() - INTERVAL '30' DAY AND category = 'politics' AND vwap IS NOT NULL GROUP BY 1, 2 ORDER BY 1, 2 ``` ```sql theme={null} -- Hourly price path of one market, with its name from the dimension SELECT o.hour, m.question, o.open, o.high, o.low, o.close, o.volume_usd, o.market_outcome FROM prediction_markets.ohlcv_hourly_v2 o JOIN prediction_markets.markets_v2 m ON m.venue = o.venue AND m.market_id = o.market_id WHERE o.venue = 'kalshi' AND o.market_id = 'KXNHLGAME-26MAY03MINCOL-MIN' AND o.block_month >= DATE '2026-05-01' ORDER BY o.hour ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `venue` | `VARCHAR` | `polymarket` or `kalshi` | > | `block_month` | `DATE` | First day of the calendar month of `hour` (partition key) | > | `hour` | `TIMESTAMP` | Start of the hour the candle covers, UTC | > | `market_id` | `VARCHAR` | Market the candle belongs to: Polymarket `condition_id` (combo condition ID for Combos), Kalshi ticker. Joins `prediction_markets.markets` on `(venue, market_id)` | > | `category` | `VARCHAR` | Unified topic category of the market, same values as `prediction_markets.markets`: `sports`, `crypto`, `politics`, `finance`, `technology`, `culture`, `weather`, `world`, `health`, `other`, `mixed` | > | `open` | `DOUBLE` | Probability of Yes at the first trade of the hour | > | `high` | `DOUBLE` | Highest probability of Yes traded in the hour | > | `low` | `DOUBLE` | Lowest probability of Yes traded in the hour | > | `close` | `DOUBLE` | Probability of Yes at the last trade of the hour. On a settled market's final candle this is the settlement value | > | `vwap` | `DOUBLE` | Volume-weighted average probability of Yes over the hour. NULL when nothing traded | > | `volume_contracts` | `DOUBLE` | Contracts traded in the hour across both sides of the market | > | `volume_usd` | `DOUBLE` | Cash traded in the hour across both sides of the market, in USD. Use `volume_contracts` for a side-independent measure | > | `trade_count` | `BIGINT` | Trades in the hour across both sides of the market | > | `market_outcome` | `VARCHAR` | The market's state as of this candle: `unresolved` until the settlement candle, then `yes`, `no`, `void` (refund) or `scalar` (fractional payout) from that candle onward, the same vocabulary as `prediction_markets.markets.resolved_outcome`. Historical candles never change; for the current state use `prediction_markets.markets` | > | `is_forward_filled` | `BOOLEAN` | TRUE when nothing traded in the hour and the candle repeats the previous close with zero volume | > | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline. Unchanged rows keep their stamp | # prediction_markets.open_interest_hourly Source: https://docs.dune.com/data-catalog/curated/prediction-markets/prediction_markets/open_interest_hourly Hourly open interest and traded volume for Polymarket and Kalshi markets in one table. > [!NOTE] > > Current version: **v2** > · query it as `prediction_markets.open_interest_hourly_v2` > . The `prediction_markets.open_interest_hourly` table holds hourly open interest and traded volume for Polymarket and Kalshi markets. It has one row per `(venue, hour, market_id)`, for every hour from the market's first open contract to the hour it settles. Open interest is the amount outstanding at the end of the hour. Volume is what traded during the hour. Open interest is zero in the settlement hour. The table combines [`polymarket_polygon.open_interest_hourly`](/data-catalog/curated/prediction-markets/polymarket/open_interest_hourly) and [`kalshi.open_interest_hourly`](/data-catalog/curated/prediction-markets/kalshi/open_interest_hourly), which have the same columns. Kalshi open interest has no v2 table. Those pages explain how each venue's figures are calculated. Hyperliquid HIP-4 is not included yet; use [`hip4_hyperliquid.open_interest_hourly`](/data-catalog/curated/prediction-markets/hip4/open_interest_hourly). On Polymarket rows, `event_id` is Polymarket's event id for markets in a mutually exclusive event (where exactly one outcome can win). It is NULL on standalone markets. > [!NOTE] > > Polymarket Combos and Kalshi parlays are not included, so totals cover single markets only. > [!WARNING] > > For total open interest, take `event_oi_contracts` once per `(venue, COALESCE(event_id, market_id), hour)`, as in the example below. Don't sum it across the members of an event, because it is repeated on every member row. Don't sum `market_oi_yes_contracts` across Polymarket event members either. Converting No tokens mints Yes tokens of every sibling outcome without adding collateral, so that sum can overstate the money at stake several times over. On Kalshi the two methods agree. For market names, join [`prediction_markets.markets`](/data-catalog/curated/prediction-markets/prediction_markets/markets). For prices, join [`prediction_markets.ohlcv_hourly`](/data-catalog/curated/prediction-markets/prediction_markets/ohlcv_hourly). Both join on `(venue, market_id)`. ## Table Schema | Column | Type | Description | | - | - | - | | `venue` | `VARCHAR` | Venue the market trades on. | | `block_month` | `DATE` | First day of the UTC month of hour. Partition key; filter on it to limit the data scanned. | | `hour` | `TIMESTAMP(3) WITH TIME ZONE` | UTC hour the figures describe. Open interest is the level at the end of it, volume the flow within it. | | `market_id` | `VARCHAR` | Market these figures describe. Joins prediction_markets.markets on (venue, market_id). | | `event_id` | `VARCHAR` | Event this market is one outcome of, where the event's outcomes are mutually exclusive. Null for a standalone market, which is its own event here. | | `market_oi_yes_contracts` | `DOUBLE` | Yes contracts outstanding at the end of the hour. Each contract pays \$1. | | `market_oi_no_contracts` | `DOUBLE` | No contracts outstanding at the end of the hour. Equal to the Yes side except on a Polymarket event member whose No contracts have been converted into the Yes contracts of sibling outcomes, where it is lower. | | `event_oi_contracts` | `DOUBLE` | Collateral locked behind this market's event at the end of the hour, the Yes contracts of one member plus the No contracts of every other member, the payout whichever outcome wins. Repeated on every member row, so summing it across members overstates it. Equal to the Yes side on a standalone market. | | `volume_contracts` | `DOUBLE` | Contracts that changed hands in the hour across both sides of the market, each trade counted once. | | `volume_usd` | `DOUBLE` | Cash that changed hands in the hour in USD, each trade counted once from the taker's side. | | `trade_count` | `BIGINT` | Trades in the hour across both sides of the market. | | `_updated_at` | `TIMESTAMP(3) WITH TIME ZONE` | When the row was last written by the pipeline. | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prediction_markets\&table_name_t6f0df=open_interest_hourly_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prediction_markets\&table_name_t6f0df=open_interest_hourly_v2) ## Query performance The table is partitioned by `block_month`. Always filter on `block_month` or `hour`, and on `venue` when you only need one venue. ## Example query ```sql theme={null} -- Total open interest at the end of each UTC day, last 30 days. -- event_oi_contracts repeats on every market of an event, so take it once per event. -- A market without an event_id is its own event. WITH per_event AS ( SELECT venue, CAST(hour AS DATE) AS day, COALESCE(event_id, market_id) AS event_key, MAX(event_oi_contracts) AS open_interest_contracts FROM prediction_markets.open_interest_hourly_v2 WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '30' DAY) AND hour >= CURRENT_DATE - INTERVAL '30' DAY AND HOUR(hour) = 23 -- the 23:00 row is the level at the end of the day GROUP BY 1, 2, 3 ) SELECT venue, day, SUM(open_interest_contracts) AS open_interest_contracts FROM per_event GROUP BY 1, 2 ORDER BY 2, 1 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `venue` | `VARCHAR` | `polymarket` or `kalshi` | > | `block_month` | `DATE` | First day of the UTC month of `hour`. Partition key | > | `hour` | `TIMESTAMP` | UTC hour the figures describe. Open interest is the level at the end of it, volume the flow within it | > | `market_id` | `VARCHAR` | Polymarket `condition_id` or Kalshi ticker. Joins `prediction_markets.markets` on `(venue, market_id)` | > | `event_id` | `VARCHAR` | Event this market is one outcome of, when the event's outcomes are mutually exclusive. NULL for a standalone market, which counts as its own event | > | `market_oi_yes_contracts` | `DOUBLE` | Yes contracts outstanding at the end of the hour. Each contract pays \$1 | > | `market_oi_no_contracts` | `DOUBLE` | No contracts outstanding at the end of the hour. Equal to the Yes side, except on a Polymarket event member whose No contracts have been converted into Yes contracts of sibling outcomes, where it is lower | > | `event_oi_contracts` | `DOUBLE` | Collateral locked behind the market's event at the end of the hour: the Yes contracts of one member plus the No contracts of every other member, which is the payout whichever outcome wins. Equal to the Yes side on a standalone market | > | `volume_contracts` | `DOUBLE` | Contracts traded in the hour across both sides of the market, each trade counted once | > | `volume_usd` | `DOUBLE` | Cash traded in the hour in USD, each trade counted once from the taker's side | > | `trade_count` | `BIGINT` | Trades in the hour across both sides of the market | > | `_updated_at` | `TIMESTAMP` | When this row was last written by the pipeline | # Cross-venue Source: https://docs.dune.com/data-catalog/curated/prediction-markets/prediction_markets/overview Curated cross-venue prediction market dataset that unifies Polymarket and Kalshi onto a single schema. The `prediction_markets` schema is a cross-venue unified dataset that merges Polymarket and Kalshi onto one schema. Use it when you want to write a single query that returns results across both venues without per-venue UNIONs. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~1 hour · **Venues:** Polymarket (Polygon) + Kalshi ## Available Tables > [card] [prediction_markets.markets](/data-catalog/curated/prediction-markets/prediction_markets/markets) > > Unified market dimension across Polymarket and Kalshi: names, category, status, resolution and parlay legs > [card] [prediction_markets.trades](/data-catalog/curated/prediction-markets/prediction_markets/trades) > > One row per taker fill across both venues with normalized P(Yes) pricing, side traded and taker action > [card] [prediction_markets.ohlcv_hourly](/data-catalog/curated/prediction-markets/prediction_markets/ohlcv_hourly) > > One Yes-side candle per market-hour across both venues, prices in \[0, 1] probability space > [card] [prediction_markets.open_interest_hourly](/data-catalog/curated/prediction-markets/prediction_markets/open_interest_hourly) > > Hourly open interest and traded volume per single market across both venues ## Identifier conventions Every row carries a `venue` column (`'polymarket'` or `'kalshi'`). Identifiers are venue-scoped: `market_id` is a Polymarket `condition_id` (or combo condition ID for Polymarket Combos) when `venue = 'polymarket'` and a Kalshi ticker when `venue = 'kalshi'`. Always join on `(venue, market_id)`. `event_id` and `series_id` follow the same rule: Kalshi's event and series tickers, or, in the v2 tables, Polymarket's own event and series ids. They are NULL where the venue has no such level (Polymarket Combos, markets Polymarket does not list, markets outside a series) rather than a synthesized ID. ## Notes * `markets` is the dimension; `trades`, `ohlcv_hourly` and `open_interest_hourly` are facts. `trades` and `ohlcv_hourly` carry no market names or attributes beyond `category`, and `open_interest_hourly` carries none at all. Join `markets` on `(venue, market_id)` for labels, category, status and resolution. * Every market is presented from its Yes side. Yes is the venue's positional side 0 (`outcome_index = 0` on Polymarket), never a label heuristic. For team-vs-team markets check `yes_outcome_name` to see which side is Yes. * `price` in `trades` and OHLCV is always P(Yes) in `[0, 1]`. In `trades`, `outcome_side` says which side was traded, `taker_side` whether the taker bought or sold it, and `taker_fill_price` is the price of that contract, so `taker_fill_price × num_contracts = amount_usd`. * `category` is a unified enum (`sports`, `crypto`, `politics`, `finance`, `technology`, `culture`, `weather`, `world`, `health`, `other`), plus `mixed` for parlays whose legs span several categories. The raw upstream classification is preserved in `markets.category_native`. * Resolution uses one vocabulary everywhere: `yes`, `no`, `void` (refund) and `scalar` (fractional payout) in `markets.resolved_outcome` and `ohlcv_hourly.market_outcome`, which also reads `unresolved` before settlement. * Parlays are included from both venues: Kalshi parlays and Polymarket Combos (multi-leg parlays), flagged with `is_parlay = TRUE`. For like-for-like single-market comparisons, filter `is_parlay = FALSE`. # prediction_markets.trades Source: https://docs.dune.com/data-catalog/curated/prediction-markets/prediction_markets/trades Polymarket and Kalshi trades in one table. Prices are the probability of Yes, and each trade is counted once. > [!NOTE] > > Current version: **v2** > · query it as `prediction_markets.trades_v2` > . The `prediction_markets.trades` table holds Polymarket and Kalshi trades in one table. It has one row per taker fill, unique on `(venue, block_month, trade_id)`. The taker is the side whose order filled against a resting order. Polymarket Combos (multi-leg parlays) are included; they have `is_parlay = TRUE` in `markets`. Each trade appears once, so `SUM(amount_usd)` gives venue volume without extra filters. Polymarket's maker rows are only in the venue table, [`polymarket_polygon.market_trades`](/data-catalog/curated/prediction-markets/polymarket/market_trades), where `is_taker_side = FALSE`. Three columns describe each trade: * `price` is always the **probability of Yes** in `[0, 1]`, comparable across venues and sides. * `outcome_side` is the side of the market the traded contract belongs to (`yes` or `no`). * `taker_side` is whether the taker bought or sold that contract (`BUY` or `SELL`). `taker_fill_price` is the price of the contract actually traded (`price` for a Yes contract, `1 - price` for a No contract), so `taker_fill_price × num_contracts = amount_usd` on every row. On Polymarket rows, `event_id` is Polymarket's own event id, the same value as `prediction_markets.markets.event_id`. > [!NOTE] > > Kalshi reports every trade as a purchase of the side the taker ends up holding. So `taker_side` is always `BUY` on Kalshi, and closing a Yes position shows as a `BUY` with `outcome_side = 'no'`. Kalshi also reports one row per taker-maker pair. Compare sums across venues, not row counts. ## Table Schema | Column | Type | Description | | - | - | - | | `venue` | `VARCHAR` | `polymarket` or `kalshi` | | `executed_at` | `TIMESTAMP` | When the trade executed. | | `block_month` | `DATE` | Month of executed_at. Partition key; filter on it for faster queries. | | `trade_id` | `VARCHAR` | Trade identifier, unique within a venue. | | `market_id` | `VARCHAR` | Market traded. Joins prediction_markets.markets on (venue, market_id). | | `event_id` | `VARCHAR` | Parent event of the market. NULL for Polymarket Combos and for Polymarket markets the venue does not list. | | `outcome_id` | `VARCHAR` | Identifier of the side traded: the token on Polymarket, the market itself on Kalshi. Keep it as text; Polymarket token ids do not fit a numeric type. To label the side, join prediction_markets.markets and pick yes_outcome_name or no_outcome_name using outcome_side. | | `outcome_side` | `VARCHAR` | Side of the market the contract in outcome_id belongs to. `yes` is the side `price` refers to, `no` the other. Same meaning on both venues. | | `taker_side` | `VARCHAR` | Whether the taker bought or sold the contract in outcome_id: `BUY` or `SELL`. Always `BUY` on Kalshi, which nets positions and reports every fill as a buy of the side the taker ends up long, so closing a Yes position appears as a `BUY` with outcome_side `no`. | | `price` | `DOUBLE` | Probability of Yes at which the trade executed, between 0 and 1. | | `taker_fill_price` | `DOUBLE` | Price per contract of the contract traded: `price` when outcome_side is `yes`, `1 - price` when `no`. Times num_contracts it equals amount_usd. | | `num_contracts` | `DOUBLE` | Contracts traded. One contract pays \$1 if its side wins. | | `amount_usd` | `DOUBLE` | Cash that changed hands, in USD: the buyer's cost and the seller's proceeds. Use it for volume. | | `fee_usd` | `DOUBLE` | Taker fee in USD. Reported on-chain for Polymarket. Derived from Kalshi's published fee formula for Kalshi, so treat it as an estimate; NULL where the series has no fee terms. | | `trader_address` | `VARCHAR` | The taker's wallet. Polymarket only; NULL on Kalshi. | | `tx_hash` | `VARCHAR` | Transaction hash. Polymarket only; NULL on Kalshi. | | `_updated_at` | `TIMESTAMP` | When the trade was last written. | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prediction_markets\&table_name_t6f0df=trades_v2](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prediction_markets\&table_name_t6f0df=trades_v2) ## Query performance The table is partitioned by `block_month`. Always filter on `block_month` or `executed_at`. ```sql theme={null} -- ✅ Good: time-bounded SELECT * FROM prediction_markets.trades_v2 WHERE block_month >= DATE '2026-11-01' AND venue = 'kalshi' ``` ## Example queries ```sql theme={null} -- Top markets by USD volume across both venues (last 7 days) SELECT t.venue, t.market_id, m.question, COUNT(*) AS num_trades, SUM(t.amount_usd) AS total_volume_usd FROM prediction_markets.trades_v2 t JOIN prediction_markets.markets_v2 m ON m.venue = t.venue AND m.market_id = t.market_id WHERE t.block_month >= DATE_TRUNC('month', CURRENT_DATE) - INTERVAL '1' MONTH AND t.executed_at >= NOW() - INTERVAL '7' DAY GROUP BY 1, 2, 3 ORDER BY 5 DESC LIMIT 20 ``` ```sql theme={null} -- Taker flow by side over the last 24 hours SELECT venue, outcome_side, taker_side, SUM(amount_usd) AS volume_usd, SUM(num_contracts) AS contracts FROM prediction_markets.trades_v2 WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE) - INTERVAL '1' MONTH AND executed_at >= NOW() - INTERVAL '1' DAY GROUP BY 1, 2, 3 ORDER BY 1, 2, 3 ``` ## Previous version > [accordion] Previous version (v1) > > Columns of the previous version, for queries that still use it. The [migration guide](/data-catalog/curated/prediction-markets/migrating-to-v2) maps each old column to its new name. > > | Column | Type | Description | > | - | - | - | > | `venue` | `VARCHAR` | `polymarket` or `kalshi` | > | `executed_at` | `TIMESTAMP` | When the trade executed | > | `block_month` | `DATE` | First day of the calendar month of `executed_at` (partition key) | > | `trade_id` | `VARCHAR` | Trade identifier, unique within a venue. On Polymarket `tx_hash:evt_index` | > | `market_id` | `VARCHAR` | Market traded: Polymarket `condition_id` (combo condition ID for Combos), Kalshi ticker. Joins `prediction_markets.markets` on `(venue, market_id)` | > | `event_id` | `VARCHAR` | Parent event of the market. Always populated on Kalshi; on Polymarket only for markets in a multi-outcome (neg-risk) event, NULL for Combos | > | `outcome_id` | `VARCHAR` | Identifier of the side traded: the token on Polymarket, the market itself on Kalshi. Keep it as text; Polymarket token IDs do not fit a numeric type. To label the side, join `prediction_markets.markets` and pick `yes_outcome_name` or `no_outcome_name` using `outcome_side` | > | `outcome_side` | `VARCHAR` | Side of the market the contract in `outcome_id` belongs to: `yes` (the side `price` refers to) or `no`. Same meaning on both venues | > | `taker_side` | `VARCHAR` | Whether the taker bought or sold the contract in `outcome_id`: `BUY` or `SELL`. Always `BUY` on Kalshi | > | `price` | `DOUBLE` | Probability of Yes at which the trade executed, in `[0, 1]` | > | `taker_fill_price` | `DOUBLE` | Price per contract of the contract traded: `price` when `outcome_side = 'yes'`, `1 - price` when `'no'`. Times `num_contracts` it equals `amount_usd` | > | `num_contracts` | `DOUBLE` | Contracts traded. One contract pays \$1 if its side wins | > | `amount_usd` | `DOUBLE` | Cash that changed hands, in USD: the buyer's cost and the seller's proceeds. Use it for volume | > | `fee_usd` | `DOUBLE` | Taker fee in USD. Reported on-chain for Polymarket; estimated from Kalshi's published fee formula for Kalshi, NULL where the series has no fee terms | > | `trader_address` | `VARCHAR` | The taker's wallet (0x-hex). Polymarket only; NULL on Kalshi | > | `tx_hash` | `VARCHAR` | Transaction hash (0x-hex). Polymarket only; NULL on Kalshi | > | `_updated_at` | `TIMESTAMP` | When the trade was last written by the pipeline | # Prices overview Source: https://docs.dune.com/data-catalog/curated/prices/overview Token price data across multiple blockchains Dune provides comprehensive, reliable token price data for use in your queries across 70+ blockchains. Our price system combines external market data with on-chain trading activity to deliver accurate pricing for both major tokens and the long tail of emerging assets. Whether you're building dashboards, conducting research, or powering applications, you can access consistent price data at multiple time granularities with transparent sourcing and quality controls. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~30 min · **Chains:** 70+ blockchains > [card] [Get This Data](https://dune.com/enterprise?dataset=prices) > > Access price data via API, Datashare, or the Dune App. ## Key Features * **Multi-blockchain support**: Prices for tokens across 70+ blockchains * **Multiple time granularities**: minute, hourly, daily, and latest price data * **Source transparency**: Each price point includes its data source * **Data quality**: Comprehensive filtering to ensure price reliability * **Standardized native token addresses**: Native tokens (like ETH, BNB) have fixed contract addresses for consistency * **Volume-weighted pricing**: Prices are calculated using volume-weighted averages for more accurate representation * **Enhanced outlier detection**: Multi-layered filtering system to reduce impact of anomalous trades ## Available Tables The `prices` schema exposes these main tables: | Table | Description | | - | - | | `prices.latest` | The most recent price for each token | | `prices.day` | Daily token prices using hybrid approach | | `prices.hour` | Hourly token prices using hybrid approach | | `prices.minute` | Minute-by-minute token prices using hybrid approach | ## Methodology ### Hybrid Pricing Approach All tables use the same methodology combining two data sources: 1. **Coinpaprika** (\~2,000 major tokens) * External market data from aggregated exchanges * Available at 5-minute intervals * Aggregated to hourly/daily, interpolated for minute-level 2. **DEX-derived** (long tail tokens) * On-chain trading activity from `dex.trades` * Quality filtering to reduce anomalous trades: * **VWMP Outlier Detection**: Prices deviating >3x from 7-day rolling median * **MAD Outlier Detection**: Prices deviating >2x median absolute deviation * **Transfer Outlier Detection**: Token amounts exceeding max transfer amounts * **Volume Outlier Detection**: Trades \<$0.01 or >$1M * Aggregated into 1 hour intervals using volume-weighted averages * Minimum \$10k volume thresholds 3. **Forward-filling** when no activity exists: * Daily: 30 days max | Hourly: 7 days max | Minute: 2 days max Token lists are defined in the [open-source repository](https://github.com/duneanalytics/spellbook/tree/main/dbt_subprojects/tokens/models/prices). > [!WARNING] > > Our dex-derived pricing represents our best-effort approach using comprehensive filtering and volume-weighted calculations to deliver accurate prices. While the methodology is designed to be as robust as possible, outliers and edge cases can occur in decentralized trading data. The methodology above provides full transparency into how prices are calculated. ## Coverage * 900,000 unique tokens * 70+ blockchains * tokens are automatically added when they exceed a \$10k volume threshold [https://dune.com/embeds/4239607/7131816](https://dune.com/embeds/4239607/7131816) > [card] [Check Price Coverage](https://dune.com/dune/does-dune-have-price-for-token) > > You can test the coverage of the prices tables on this dashboard. ## Schema All price tables share the following schema: | Column | Type | Description | | - | - | - | | `blockchain` | *varchar* | Blockchain identifier (e.g., 'ethereum', 'arbitrum') | | `contract_address` | *varbinary* | Token contract address (fixed address for native tokens) | | `symbol` | *varchar* | Token symbol (e.g., 'ETH', 'USDC') | | `price` | *double* | USD price | | `timestamp` | *timestamp* | Timestamp (start of minute, hour, or day) | | `decimals` | *int* | Token decimals | | `volume` | *double* | Trading volume in USD (from price source) | | `source` | *varchar* | Data source ('coinpaprika' or 'dex.trades') | ## Technical Notes * **Token identification**: Requires both `contract_address` AND `blockchain` (symbols are not unique) * **Native tokens**: Use standardized addresses from `dune.blockchains` table. We mostly set native tokens to `0x000...` * **Pricing independence**: Calculated separately per blockchain * **Volume-weighted**: Uses volume-weighted averages for accuracy ### Solana Token Addresses Solana tokens use base58-encoded mint addresses, but in Dune's price tables they are stored as `varbinary` in the `contract_address` column. To query Solana token prices, convert the base58 mint address to varbinary using `from_base58()`: ```sql theme={null} SELECT symbol, price, timestamp FROM prices.day WHERE blockchain = 'solana' AND contract_address = from_base58('So11111111111111111111111111111111111111112') -- Wrapped SOL AND timestamp >= NOW() - INTERVAL '7' DAY ``` To discover available Solana tokens and their addresses: ```sql theme={null} SELECT DISTINCT symbol, contract_address, to_base58(contract_address) as mint_address FROM prices.usd WHERE blockchain = 'solana' LIMIT 100 ``` ### Source-Specific Variants For specialized analysis, each granularity offers source-specific tables: **Coinpaprika-only tables:** * `prices_external.day`, `prices_external.hour`, `prices_external.minute`, `prices_external.latest` **DEX-derived tables:** * `prices_dex.day`, `prices_dex.hour`, `prices_dex.minute`, `prices_dex.latest` *See individual granularity pages for detailed documentation on these variants.* **Performance tip:** Use the coarsest granularity that meets your needs. Minute-level queries over long periods are resource-intensive. ## Usage Examples Here are some examples of how to use the prices tables. ### Basic query to get the latest ETH price: ```sql theme={null} SELECT price FROM prices.latest WHERE blockchain = 'ethereum' AND contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 -- WETH ``` ### Getting historical price data: ```sql theme={null} SELECT timestamp, price FROM prices.day WHERE blockchain = 'ethereum' AND contract_address = 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 -- UNI AND timestamp >= NOW() - INTERVAL '30' DAY ``` ### Finding the right native token address: ```sql theme={null} -- Query to get the native token address for a specific blockchain SELECT name, token_address, token_symbol FROM dune.blockchains WHERE name = 'arbitrum' ``` ## Legacy Tables The following tables are maintained for historical compatibility: * `prices.usd` - **View of `prices_external.minute`** (maintains legacy schema) Note: `prices.usd` is a view of `prices_external.minute` while preserving the legacy schema for backward compatibility. ## When to Use These Tables * Calculate USD values for token transfers, balances, and DeFi positions * Build portfolio valuation tools and wallet trackers * Power price feeds for dashboards, alerts, and automated reports * Analyze token price movements and correlations across chains * Benchmark token performance against market indices ## Query Performance **Partition keys for `prices.day`, `prices.hour`, `prices.minute`:** `blockchain`, `contract_address` Always filter on `blockchain` and a time range. For specific tokens, also filter on `contract_address` or `symbol`. ```sql theme={null} -- ✅ Good: chain + time + token filter SELECT * FROM prices.hour WHERE blockchain = 'ethereum' AND contract_address = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 -- USDC AND minute >= NOW() - INTERVAL '7' DAY -- ✅ Good: using prices.latest for current values SELECT * FROM prices.latest WHERE blockchain = 'ethereum' AND symbol = 'WETH' ``` ## Related Tables * `tokens.erc20` — Token metadata (symbols, decimals) for joining with price data * `dex.trades` — DEX trading data (prices are partially derived from on-chain trades) * `tokens.transfers` — Token transfers that can be valued using price tables > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom pricing feeds or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private pricing pipelines with the dbt Connector. # Daily Prices Source: https://docs.dune.com/data-catalog/curated/prices/prices_day Daily token price data across 70+ blockchains - hybrid approach combining centralized exchange and decentralized exchange data for comprehensive coverage The `prices.day` table provides daily token prices using a **hybrid approach** that combines multiple data sources for maximum coverage: 1. **Coinpaprika prices** for tokens where we have reliable external data (\~2,000 major tokens, defined in [token lists](https://github.com/duneanalytics/spellbook/tree/main/dbt_subprojects/tokens/models/prices)) 2. **DEX-derived prices** for the long tail of tokens not covered by coinpaprika This hybrid methodology ensures comprehensive token coverage while maintaining price quality through different data sources optimized for different token categories. ## Table Schema | Column | Type | Description | | - | - | - | | blockchain | varchar | Blockchain identifier (e.g., 'ethereum', 'arbitrum') | | contract_address | varbinary | Token contract address (fixed address for native tokens) | | symbol | varchar | Token symbol (e.g., 'ETH', 'USDC') | | timestamp | timestamp | Date timestamp (00:00 UTC of each day) | | price | double | Token price in USD (volume-weighted average) | | decimals | int | Token decimals | | volume | double | Trading volume in USD (from price source) | | source | varchar | Data source ('coinpaprika' or 'dex.trades') | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prices\&table_name_t6f0df=day](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prices\&table_name_t6f0df=day) ## Implementation Details The daily prices are built through these steps: 1. **Source prioritization**: Coinpaprika prices take precedence where available, DEX-derived prices fill gaps 2. **Token list management**: Lists defining which tokens use coinpaprika vs DEX are managed in the [open-source repository](https://github.com/duneanalytics/spellbook/tree/main/dbt_subprojects/tokens/models/prices) 3. **Data aggregation**: Group by day, calculating volume-weighted average price per day 4. **Forward filling**: Fill missing days with the previous day's price (forward filling) 5. **Expiration**: Set a 30-day expiration for forward filling to avoid stale data ### Alternative Tables If you need prices from specific sources only: #### `prices_external.day` For purely coinpaprika-based daily prices: * **Coverage**: Only tokens with Coinpaprika listings (\~2,000 tokens) * **Source**: External exchange-aggregated pricing * **Use case**: When you need stable, externally-validated daily pricing * **Special note**: Used by `tokens.transfers` for stable pricing * **Schema**: Same as `prices.day` but `source` is always 'coinpaprika' #### `prices_dex.day` For purely DEX algorithm-based daily prices: * **Coverage**: All tokens with sufficient DEX trading volume * **Source**: On-chain DEX trading activity only (from `dex.trades` table) * **Use case**: When you need pricing that reflects actual on-chain liquidity and trading activity * **Methodology**: Comprehensive outlier detection and quality filtering applied to DEX trades * **Key difference**: Even tokens with coinpaprika coverage use DEX-derived prices for consistency * **Schema**: Same as `prices.day` but `source` is always 'dex.trades' **Example - Compare DEX vs combined pricing:** ```sql theme={null} SELECT d.timestamp, d.symbol, d.price as dex_price, c.price as combined_price, (d.price - c.price) / c.price * 100 as price_diff_pct FROM prices_dex.day d JOIN prices.day c ON d.blockchain = c.blockchain AND d.contract_address = c.contract_address AND d.timestamp = c.timestamp WHERE d.blockchain = 'ethereum' AND d.contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 -- WETH AND d.timestamp >= NOW() - INTERVAL '30' DAY ORDER BY d.timestamp ``` ## Usage This table provides comprehensive daily price coverage by combining coinpaprika and DEX-derived sources. It's ideal for: * Daily price trend analysis * Portfolio valuations * Day-over-day price comparisons * General token price lookups **Note**: The underlying data sources are aligned to 5-minute intervals for consistency and improved data quality. **For specific use cases**: If you need purely coinpaprika or purely DEX-derived prices, use the dedicated source-specific tables instead. ## Latency and Update Frequency The `prices.day` table is updated daily at 00:00 UTC, providing the closing price for the previous day. Data is typically available within 30 minutes of the daily close. ## Usage Examples ### Get ETH price history for the last month: ```sql theme={null} SELECT timestamp, price FROM prices.day WHERE blockchain = 'ethereum' AND contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 -- WETH AND timestamp >= NOW() - INTERVAL '30' DAY ORDER BY timestamp ``` ### Calculate monthly average price for multiple tokens: ```sql theme={null} SELECT blockchain, symbol, -- Symbol included for readable output only date_trunc('month', timestamp) as month, avg(price) as avg_price FROM prices.day WHERE blockchain = 'ethereum' AND contract_address IN ( 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, -- WETH 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, -- USDC 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599 -- WBTC ) AND timestamp >= NOW() - INTERVAL '90' DAY GROUP BY 1,2,3 ORDER BY 1,2,3 ``` ### Get native token price using dune.blockchains: ```sql theme={null} -- First get the native token address WITH native_token AS ( SELECT token_address FROM dune.blockchains WHERE name = 'ethereum' ) -- Then use it to query the price SELECT timestamp, price FROM prices.day, native_token WHERE blockchain = 'ethereum' AND contract_address = token_address AND timestamp >= NOW() - INTERVAL '30' DAY ORDER BY timestamp ``` ## Data Quality Notes * Prices older than 30 days will not be forward-filled to avoid using stale data * Native tokens (like ETH, BNB) are assigned fixed addresses for consistency * For native tokens, use `dune.blockchains` table to get the standardized address for each blockchain * The same token may have different prices on different blockchains due to bridging inefficiencies * Always use `contract_address` and `blockchain` for precise token identification, never use `symbol` for joins or filters * Prices are calculated using volume-weighted averages for more accurate representation * **Quality Filtering**: The system includes filtering mechanisms to reduce the impact of anomalous trades * **DEX-derived limitations**: DEX-derived prices can contain errors due to low liquidity, market manipulation, or anomalous trades * **Fallback option**: For critical applications, consider using `prices_external.day` for more reliable pricing where available * **Data validation**: Always validate prices for critical applications, especially for lesser-known tokens # Hourly Prices Source: https://docs.dune.com/data-catalog/curated/prices/prices_hour Hourly token price data across 70+ blockchains - hybrid approach combining centralized exchange and decentralized exchange data for comprehensive coverage The `prices.hour` table provides hourly token prices using the same **hybrid approach** as all other price tables: 1. **Coinpaprika prices** for tokens where we have reliable external data (\~2,000 major tokens) 2. **DEX-derived prices** for the long tail of tokens not covered by coinpaprika This provides volume-weighted average prices for each hour, ensuring a continuous time series for more granular price analysis than daily data. ## Table Schema | Column | Type | Description | | - | - | - | | blockchain | varchar | Blockchain identifier (e.g., 'ethereum', 'arbitrum') | | contract_address | varbinary | Token contract address (fixed address for native tokens) | | symbol | varchar | Token symbol (e.g., 'ETH', 'USDC') | | timestamp | timestamp | Hour timestamp (00:00, 01:00, etc. UTC of each hour) | | price | double | Token price in USD (volume-weighted average) | | decimals | int | Token decimals | | volume | double | Trading volume in USD (from price source) | | source | varchar | Data source ('coinpaprika' or 'dex.trades') | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prices\&table_name_t6f0df=hour](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prices\&table_name_t6f0df=hour) ## Implementation Details The hourly prices are built through these steps: 1. **Source prioritization**: Coinpaprika prices for \~2,000 major tokens, DEX-derived prices for long tail tokens 2. **Data aggregation**: Group by hour, calculating volume-weighted average price per hour 3. **Forward filling**: Fill missing hours with the previous hour's price (forward filling) 4. **Expiration**: Set a 7-day (168 hour) expiration for forward filling to avoid stale data ### Source-Specific Variants #### `prices_external.hour` For purely coinpaprika-based hourly prices: * **Coverage**: Only tokens with Coinpaprika listings (\~2,000 tokens) * **Source**: External exchange-aggregated hourly pricing * **Use case**: When you need stable, externally-validated hourly pricing * **Schema**: Same as `prices.hour` but `source` is always 'coinpaprika' #### `prices_dex.hour` For purely DEX-derived hourly prices: * **Coverage**: All tokens with sufficient DEX trading volume * **Source**: On-chain DEX trading activity only * **Use case**: When you need pricing that reflects actual on-chain liquidity * **Schema**: Same as `prices.hour` but `source` is always 'dex.trades' ## Usage This table is useful for intraday analysis and tracking price movements with higher granularity than daily data. It's suitable for examining price patterns within a day or across multiple days. **Note**: The underlying data sources are aligned to 5-minute intervals for consistency and improved data quality. ## Latency and Update Frequency The `prices.hour` table is updated hourly based on the upstream data pipeline. As a result, prices typically have a latency of approximately 1 hour from real-time. ## Usage Examples Here are some examples of how to use the prices tables. ### Get hourly ETH prices for the last day: ```sql theme={null} SELECT timestamp, price FROM prices.hour WHERE blockchain = 'ethereum' AND contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 -- WETH AND timestamp >= NOW() - INTERVAL '1' DAY ORDER BY timestamp ``` ### Calculate volatility by hour of day: ```sql theme={null} SELECT extract(hour from timestamp) as hour_of_day, avg(abs(price - lag(price) OVER (PARTITION BY blockchain, contract_address ORDER BY timestamp)) / lag(price) OVER (PARTITION BY blockchain, contract_address ORDER BY timestamp)) as avg_hourly_change FROM prices.hour WHERE blockchain = 'ethereum' AND contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 -- WETH AND timestamp >= NOW() - INTERVAL '30' DAY GROUP BY 1 ORDER BY 1 ``` ## Data Quality Notes * Prices older than 7 days (168 hours) will not be forward-filled to avoid using stale data * Native tokens (like ETH, BNB) are assigned fixed addresses for consistency * Hourly data is useful for analyzing intraday patterns and short-term price movements * Always use `contract_address` and `blockchain` for precise token identification, never use `symbol` for joins or filters * Prices are calculated using volume-weighted averages for more accurate representation * **Quality Filtering**: The system includes filtering mechanisms to reduce the impact of anomalous trades * **DEX-derived limitations**: DEX-derived prices can contain errors due to low liquidity, market manipulation, or anomalous trades * **Fallback option**: For critical applications, consider using `prices_external.hour` for more reliable pricing where available * **Data validation**: Always validate prices for critical applications, especially for lesser-known tokens # Latest Prices Source: https://docs.dune.com/data-catalog/curated/prices/prices_latest Most recent price data for tokens across all supported blockchains The `prices.latest` table provides the most recently available price for each token across all supported blockchains. This table is ideal for calculating current token values or displaying up-to-date prices. ## Table Schema | Column | Type | Description | | - | - | - | | blockchain | varchar | Blockchain identifier (e.g., 'ethereum', 'arbitrum') | | contract_address | varbinary | Token contract address (fixed address for native tokens) | | symbol | varchar | Token symbol (e.g., 'ETH', 'USDC') | | price | double | Most recent token price in USD | | decimals | int | Token decimals | | timestamp | timestamp | Timestamp when this price was recorded | | volume | double | Trading volume in USD (from price source) | | source | varchar | Data source ('coinpaprika' or 'dex.trades') | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prices\&table_name_t6f0df=latest](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prices\&table_name_t6f0df=latest) ## Implementation Details The latest prices are built by: 1. Taking the most recent price observation from each data source 2. Selecting the latest observation per token across all sources 3. Refreshed hourly to ensure prices stay current ## Usage This table is perfect for querying the current price of tokens without needing to filter by timestamp or perform additional aggregations. It's designed for efficiency when you just need the most recent price. ## Usage Examples Here are some examples of how to use the prices tables. ### Get current prices for major tokens: ```sql theme={null} SELECT blockchain, symbol, -- Symbol included for readable output only price, timestamp FROM prices.latest WHERE (blockchain, contract_address) IN ( ('ethereum', 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), -- WETH ('ethereum', 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48), -- USDC ('ethereum', 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599), -- WBTC ('arbitrum', 0x82af49447d8a07e3bd95bd0d56f35241523fbab1), -- WETH on Arbitrum ('optimism', 0x4200000000000000000000000000000000000006) -- WETH on Optimism ) ``` ### Calculate total USD value of token holdings: ```sql theme={null} WITH token_balances AS ( SELECT token_address, sum(amount) as total_tokens FROM my_token_balance_table GROUP BY 1 ) SELECT b.token_address, p.symbol, -- Symbol included for readable output only b.total_tokens, b.total_tokens * p.price as usd_value FROM token_balances b JOIN prices.latest p ON p.blockchain = 'ethereum' AND p.contract_address = b.token_address ``` ### Get prices for native tokens across multiple blockchains: ```sql theme={null} -- Join with dune.blockchains to get native token prices SELECT b.name as blockchain, b.token_symbol as native_token_symbol, p.price as native_token_price, p.timestamp FROM dune.blockchains b JOIN prices.latest p ON p.blockchain = b.name AND p.contract_address = b.token_address WHERE b.name IN ('ethereum', 'arbitrum', 'optimism', 'polygon', 'gnosis', 'solana') ``` ## Data Quality Notes * Native tokens (like ETH, BNB) are assigned fixed addresses for consistency * For native tokens, use `dune.blockchains` table to get the standardized address for each blockchain * The timestamp column shows when the price was last updated, useful for determining freshness * For historical analysis, use `prices.day`, `prices.hour`, or `prices.minute` instead * Always use `contract_address` and `blockchain` for precise token identification, never use `symbol` for joins or filters * **Quality Filtering**: The system includes filtering mechanisms to reduce the impact of anomalous trades * **Data Limitations**: While filtering helps improve data quality, users should always validate prices for critical applications # Minute Prices Source: https://docs.dune.com/data-catalog/curated/prices/prices_minute Minute-by-minute token price data across 70+ blockchains - hybrid approach combining centralized exchange and decentralized exchange data for comprehensive coverage > [!WARNING] > > `prices.minute` can produce unexpected results and high query costs for broad historical analysis. This table is interpolated from hourly anchor points (not direct minute-level trades), and DEX-derived rows can still contain outliers for low-liquidity tokens. > > For safer pricing in production or valuation-critical workflows, use `prices_external.minute` where coverage exists. For most historical analysis, prefer `prices.hour` (or `prices.day`) for better performance and stability. The `prices.minute` table provides minute-level price data for tokens across multiple blockchains using the same **hybrid approach** as all other price tables: 1. **Coinpaprika prices** for tokens where we have reliable external data (\~2,000 major tokens) 2. **DEX-derived prices** for the long tail of tokens not covered by coinpaprika Minute-level data uses interpolation from hourly anchor points to provide smooth, continuous pricing. > [!NOTE] > > Minute-level data uses interpolation between hourly anchor points for smooth pricing. Forward-filling is applied for up to 48 hours when no trading activity exists. ## Table Schema | Column | Type | Description | | - | - | - | | blockchain | varchar | Blockchain identifier (e.g., 'ethereum', 'arbitrum') | | contract_address | varbinary | Token contract address (fixed address for native tokens) | | symbol | varchar | Token symbol (e.g., 'ETH', 'USDC') | | timestamp | timestamp | Minute timestamp | | price | double | Token price in USD (volume-weighted average) | | decimals | int | Token decimals | | volume | double | Trading volume in USD (from price source) | | source | varchar | Data source ('coinpaprika' or 'dex.trades') | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prices\&table_name_t6f0df=minute](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=prices\&table_name_t6f0df=minute) ## Implementation Details The minute prices are built using the hybrid approach with interpolation: 1. **Source prioritization**: Coinpaprika prices for \~2,000 major tokens, DEX-derived prices for long tail tokens 2. **Hourly interpolation**: Uses hourly data as anchor points for linear interpolation 3. **Linear interpolation**: Implements interpolation between hourly anchor points to create smooth minute-level data 4. **Noise reduction**: Reduces noise and outliers by using stable hourly data points as anchors 5. **Forward-filling**: The system forward-fills with the last available price for a maximum of 48 hours (2880 minutes) to avoid stale data 6. **Continuous time series**: Provides minute-by-minute data points for every minute between hourly anchors ### Source-Specific Variants #### `prices_external.minute` For purely coinpaprika-based minute prices: * **Coverage**: Only tokens with Coinpaprika listings (\~2,000 tokens) * **Source**: External exchange-aggregated minute pricing with interpolation * **Use case**: When you need minute-level external price validation * **Key role**: Serves as the underlying source for the `prices.usd` legacy view * **Schema**: Same as `prices.minute` but `source` is always 'coinpaprika' #### `prices_dex.minute` For purely DEX-derived minute prices: * **Coverage**: All tokens with sufficient DEX trading volume * **Source**: On-chain DEX trading activity with interpolation * **Use case**: When you need minute-level pricing that reflects on-chain activity * **Schema**: Same as `prices.minute` but `source` is always 'dex.trades' ## Usage This table is ideal for high-frequency analysis and examining short-term price movements. It's particularly useful for studying price impacts of specific events or transactions with high temporal precision. **Important Notes**: * The minute-level data is interpolated from hourly anchor points using the hybrid approach * Provides comprehensive token coverage through coinpaprika and DEX-derived sources * Provides smooth and consistent pricing while reducing the impact of noise and outliers ## Latency and Update Frequency The `prices.minute` table is updated hourly based on the upstream data pipeline. As a result, prices typically have a latency of approximately 1 hour from real-time. ## Usage Examples Here are some examples of how to use the prices tables. ### Get minute-by-minute ETH prices during a specific event: ```sql theme={null} SELECT timestamp, price FROM prices.minute WHERE blockchain = 'ethereum' AND contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 -- WETH AND timestamp >= NOW() - INTERVAL '2' HOUR AND timestamp <= NOW() - INTERVAL '1' HOUR ORDER BY timestamp ``` ### Analyze price volatility within short time frames: ```sql theme={null} SELECT date_trunc('hour', timestamp) as hour, max(price) - min(price) as price_range, (max(price) - min(price)) / min(price) * 100 as volatility_pct FROM prices.minute WHERE blockchain = 'ethereum' AND contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 -- WETH AND timestamp >= NOW() - INTERVAL '1' DAY GROUP BY 1 ORDER BY 1 ``` ## Data Quality Notes * Due to its high granularity, queries on this table may be more resource-intensive * Consider using `prices.hour` or `prices.day` for longer time ranges if minute-level precision is not required * **Comprehensive coverage**: Includes both coinpaprika and DEX-derived tokens through hybrid approach * Native tokens (like ETH, BNB) are assigned fixed addresses for consistency * Always use `contract_address` and `blockchain` for precise token identification, never use `symbol` for joins or filters * **Interpolated Pricing**: Minute-level data is interpolated from hourly anchor points using hybrid methodology * **Reduced Noise**: The interpolation approach reduces the impact of noise and outliers * **48-Hour Forward-Fill**: The system forward-fills with the last available price for a maximum of 48 hours (2880 minutes) to avoid stale data * **External source reliability**: Coinpaprika data provides stable, exchange-aggregated pricing * **DEX-derived limitations**: DEX-derived prices can contain errors due to low liquidity, market manipulation, or anomalous trades * **Safe pricing recommendation**: For valuation-critical or safety-sensitive use cases, prefer `prices_external.minute` where coverage exists * **Minute interpolation caveat**: Values are derived via interpolation between hourly anchor points, not direct minute-level market observations * **Volume caveat**: The `volume` column may be sparse (including null values) in parts of the dataset, especially on less liquid DEX-derived coverage * **Data validation**: Always validate prices for critical applications, especially for lesser-known tokens # USD Prices (Legacy) Source: https://docs.dune.com/data-catalog/curated/prices/prices_usd Legacy price tables with limited token coverage These tables continue to work and update regularly, so you can keep using them if they meet your needs. However, for broader token coverage and improved functionality, consider the modern price tables. > [!NOTE] > > **`prices.usd`** is based on coinpaprika data and covers \~2,800 tokens. For comprehensive coverage including newer tokens, use `prices.minute`, `prices.hour`, or `prices.day` which include both coinpaprika and DEX-derived pricing. ## Why Consider Modern Tables? * **More tokens**: 900,000+ vs \~2,800 in legacy tables * **Hybrid approach**: Combines coinpaprika and DEX-derived pricing for maximum coverage * **Same reliability**: Coinpaprika data quality maintained in modern tables * **Additional features**: Source transparency, quality filtering, and standardized native token addresses ## Available Legacy Tables | Table | Coverage | Description | | - | - | - | | `prices.usd` | \~2,800 tokens | Historical prices with timestamps (coinpaprika data) | | `prices.usd_daily` | \~2,800 tokens | Daily historical prices | | `prices.usd_latest` | \~2,800 tokens | Latest available price per token | ## Modern Alternatives (Recommended) For broader coverage and additional features: | Modern Table | Coverage | Best For | | - | - | - | | `prices.day` | 900,000+ tokens | Daily analysis with hybrid pricing | | `prices.hour` | 900,000+ tokens | Intraday analysis | | `prices.minute` | 900,000+ tokens | High-frequency analysis | | `prices.latest` | 900,000+ tokens | latest prices | **Migration examples:** ### Simple price lookup ```sql theme={null} -- Legacy: SELECT price, minute FROM prices.usd WHERE contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 AND blockchain = 'ethereum' -- Modern equivalent: SELECT price, timestamp FROM prices.minute WHERE contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 AND blockchain = 'ethereum' ``` ### Daily aggregation (much faster with modern tables) ```sql theme={null} -- Legacy - manually aggregate minute data: SELECT DATE(timestamp) as date, AVG(price) as avg_daily_price FROM prices.usd WHERE contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 AND blockchain = 'ethereum' AND timestamp >= NOW() - INTERVAL '30' DAY GROUP BY DATE(timestamp) -- Modern - use pre-aggregated daily table: SELECT timestamp as date, price as avg_daily_price FROM prices.day WHERE contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 AND blockchain = 'ethereum' AND timestamp >= NOW() - INTERVAL '30' DAY ``` ### Token coverage comparison ```sql theme={null} -- See the difference in token coverage: SELECT COUNT(*) FROM prices.usd_latest; -- ~2,800 tokens SELECT COUNT(*) FROM prices.latest; -- 900,000+ tokens ``` ## Legacy Table Schema All legacy tables share a similar schema: | Column | Type | Description | | - | - | - | | `contract_address` | varbinary | Token contract address | | `symbol` | varchar | Token symbol | | `price` | double | USD price | | `minute` | timestamp | Price timestamp (`prices.usd_latest` excludes this) | | `blockchain` | varchar | Blockchain identifier | ## Key Differences from Modern Tables * **Token coverage**: Limited to \~2,800 tokens vs 900,000+ in modern tables * **Data sources**: Coinpaprika only vs hybrid approach in modern tables * **Schema**: Legacy format vs standardized modern schema with `source` column * **Native tokens**: May use different address conventions vs standardized addresses ## Still Need Legacy Tables? **No problem!** These tables continue to update and work reliably. You can: * Keep using them if they cover your token needs * Mix legacy and modern tables in your queries * Gradually migrate to modern tables when convenient For comprehensive documentation on the modern pricing system, see [Prices Overview](/data-catalog/curated/prices/overview). # rollup_economics_ethereum.l1_fees Source: https://docs.dune.com/data-catalog/curated/rollup-economics/l1_fees L2 rollup posting costs — data availability and verification fees paid to Ethereum L1 by each rollup. The `rollup_economics_ethereum.l1_fees` table contains daily fees paid by each Ethereum L2 rollup to post data and proofs on L1, broken down by calldata, blob, and verification costs. ## Table Schema | Column | Type | Description | | - | - | - | | `day` | `TIMESTAMP` | Day when transactions occurred | | `name` | `VARCHAR` | Rollup name | | `data_fee_native` | `DOUBLE` | Calldata gas fee in ETH | | `data_fee_usd` | `DOUBLE` | Calldata gas fee in USD | | `calldata_gas_used` | `BIGINT` | Calldata gas consumed | | `verification_fee_native` | `DOUBLE` | Proof verification fee in ETH | | `verification_fee_usd` | `DOUBLE` | Proof verification fee in USD | | `blob_fee_native` | `DOUBLE` | Blob gas fee in ETH | | `blob_fee_usd` | `DOUBLE` | Blob gas fee in USD | | `l1_fee_native` | `DOUBLE` | Total L1 fees paid in ETH | | `l1_fee_usd` | `DOUBLE` | Total L1 fees paid in USD | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rollup_economics_ethereum\&table_name_t6f0df=l1_fees](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rollup_economics_ethereum\&table_name_t6f0df=l1_fees) # rollup_economics_ethereum.l2_revenue Source: https://docs.dune.com/data-catalog/curated/rollup-economics/l2_revenue L2 rollup revenue — transaction fees collected from users on each rollup. The `rollup_economics_ethereum.l2_revenue` table contains daily gas fee revenue earned by each Ethereum L2 rollup. ## Table Schema | Column | Type | Description | | - | - | - | | `day` | `TIMESTAMP` | Day when transactions occurred | | `name` | `VARCHAR` | Rollup name | | `l2_rev` | `DOUBLE` | L2 gas fee revenue in ETH | | `l2_rev_usd` | `DOUBLE` | L2 gas fee revenue in USD | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rollup_economics_ethereum\&table_name_t6f0df=l2_revenue](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rollup_economics_ethereum\&table_name_t6f0df=l2_revenue) # Rollup Economics Source: https://docs.dune.com/data-catalog/curated/rollup-economics/overview Curated rollup profitability datasets for Ethereum L2s on Dune Dune's rollup economics tables track the financial performance of Ethereum L2 rollups by comparing their revenue (gas fees earned from users on L2) against their costs (fees paid to post data and proofs on Ethereum L1). > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~1 hour · **Coverage:** 10 rollups (revenue), 25 rollups (L1 costs) > [card] [Get This Data](https://dune.com/enterprise?dataset=rollup-economics) > > Access rollup economics data via API, Datashare, or the Dune App. ## Available Tables > [card] [rollup_economics_ethereum.l2_revenue](/data-catalog/curated/rollup-economics/l2_revenue) > > Daily gas fee revenue earned by each rollup on L2 > [card] [rollup_economics_ethereum.l1_fees](/data-catalog/curated/rollup-economics/l1_fees) > > Daily fees paid by each rollup to post data/proofs on Ethereum L1 ## When to Use These Tables * Analyze rollup profitability (L2 revenue minus L1 costs) * Compare L1 posting costs across rollups * Track the impact of EIP-4844 blobs on rollup costs * Benchmark rollup revenue and growth over time ## Coverage **L2 Revenue (10 rollups):** Scroll, Mantle, Zora, Linea, Arbitrum, zkSync Era, OP Mainnet, Base, Polygon zkEVM, Blast **L1 Fees (25 rollups):** Orderly Network, Starknet, Mode, Starkware, Base, Boba, Polygon zkEVM, Blast, Hypr Network, Scroll, Lyra, Public Goods Network, Zora, Mantle, Linea, IMX, zkSync Lite, Loopring, Metis, Aevo, Arbitrum, Manta Pacific, zkSync Era, OP Mainnet, Fraxtal > [!TIP] > > L1 fees covers more rollups because tracking posting costs only requires monitoring known addresses on Ethereum, while L2 revenue requires Dune to have indexed each L2 chain directly. > [!NOTE] > > **Need a rollup that's not listed?** We can add new rollup coverage. [Contact our enterprise team →](https://dune.com/enterprise) ## Query Performance Both tables are incremental with daily granularity. Filter on `day` and optionally `name`. ```sql theme={null} -- ✅ Good: time-bounded SELECT * FROM rollup_economics_ethereum.l2_revenue WHERE day >= DATE '2025-01-01' AND name = 'base' ``` ## Methodology These tables are maintained by Dune ([source code](https://github.com/duneanalytics/spellbook)). **L2 Revenue** aggregates total gas fees from `gas.fees` for each rollup's chain, grouped by day. **L1 Fees** monitors known rollup batch-posting and proof-verification addresses on Ethereum, decomposing costs into: calldata gas costs, proof verification costs (ZK rollups), and EIP-4844 blob gas costs (post-Dencun). ## Example Queries **Rollup profitability (revenue minus costs):** ```sql theme={null} SELECT r.name, r.day, r.l2_rev_usd, f.l1_fee_usd, r.l2_rev_usd - f.l1_fee_usd AS profit_usd FROM rollup_economics_ethereum.l2_revenue r JOIN rollup_economics_ethereum.l1_fees f ON r.name = f.name AND r.day = f.day WHERE r.day >= DATE '2025-01-01' ORDER BY r.day DESC, profit_usd DESC ``` **L1 cost breakdown: calldata vs blobs vs verification:** ```sql theme={null} SELECT name, SUM(data_fee_usd) AS calldata_costs, SUM(blob_fee_usd) AS blob_costs, SUM(verification_fee_usd) AS verification_costs, SUM(l1_fee_usd) AS total_l1_costs FROM rollup_economics_ethereum.l1_fees WHERE day >= DATE '2025-01-01' GROUP BY 1 ORDER BY 5 DESC ``` ## Related Tables * `gas.fees` — Transaction-level gas data used to compute L2 revenue > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom rollup analytics or additional L2 coverage? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private rollup profitability dashboards with the dbt Connector. # rwa_hyperliquid.perp_metrics_daily Source: https://docs.dune.com/data-catalog/curated/rwa/activity/perp-metrics-daily Daily volume, open interest, funding rate, and taker activity per RWA perpetual market on Hyperliquid HIP-3. `rwa_hyperliquid.perp_metrics_daily` is the daily rollup of [`perp_metrics_hourly`](/data-catalog/curated/rwa/activity/perp-metrics-hourly). Grain: one row per market per day, keyed on `(block_month, block_date, perp_dex, market_symbol)`. It refreshes hourly, and rows update until their UTC day closes. This is the right table for trend charts, day-over-day comparisons, and market league tables. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Table schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | Partition column | | `block_date` | `DATE` | Day bucket, UTC | | `perp_dex` | `VARCHAR` | Builder DEX short code | | `market_symbol` | `VARCHAR` | Market ticker within the builder DEX | | `coin` | `VARCHAR` | Full market id in `dex:SYMBOL` form | | `asset_id` | `INTEGER` | HIP-3 asset id | | `asset_class` | `VARCHAR` | Shared RWA product taxonomy | | `asset_type` | `VARCHAR` | Finer classification within `asset_class` | | `underlying_ticker` | `VARCHAR` | Ticker of the referenced real-world instrument | | `builder_name` | `VARCHAR` | Builder DEX full name | | `trades_count` | `BIGINT` | Taker fills in the day | | `volume_usd` | `DOUBLE` | Taker-leg notional volume in USD. Matches Hyperliquid's reported `dayNtlVlm` | | `volume_units` | `DOUBLE` | Volume in contract units | | `buy_volume_usd` | `DOUBLE` | Taker buy volume | | `sell_volume_usd` | `DOUBLE` | Taker sell volume | | `unique_takers` | `BIGINT` | Distinct taker addresses in the day | | `vwap` | `DOUBLE` | Volume-weighted average fill price | | `open_interest_units` | `DOUBLE` | End-of-day open interest in contract units, **both sides summed** | | `open_interest_usd` | `DOUBLE` | End-of-day open interest valued in USD | | `open_positions` | `BIGINT` | Count of open positions at end of day | | `funding_rate` | `DOUBLE` | Funding rate for the day | | `funding_rate_annualized` | `DOUBLE` | Funding rate annualized | | `_updated_at` | `TIMESTAMP` | When this row was last refreshed | ## Flow versus stock Two different kinds of measure share this table, and they aggregate differently: * **Flows** — `volume_usd`, `volume_units`, `buy_volume_usd`, `sell_volume_usd`, `trades_count`. Sum these across days. * **Stocks** — `open_interest_units`, `open_interest_usd`, `open_positions`. These are point-in-time end-of-day snapshots. Take the last value or an average; never sum them across days. `unique_takers` is a distinct count within each day, so summing it across days double-counts anyone who traded on more than one day. ## Open interest is both-sides `open_interest_units` and `open_interest_usd` sum longs and shorts to match the Hyperliquid UI. One-sided open interest, the convention most traditional venues report, is half: ```sql theme={null} open_interest_units / 2 AS one_sided_open_interest ``` ## Exclude the open UTC day The open UTC day's row is incomplete. Filter it out for trend work: ```sql theme={null} WHERE block_date < current_date ``` ## Example query ```sql theme={null} -- Market league table over the last 30 complete days SELECT market_symbol, builder_name, asset_class, SUM(volume_usd) AS volume_usd_30d, SUM(trades_count) AS fills_30d, MAX_BY(open_interest_usd, block_date) AS latest_open_interest_usd FROM rwa_hyperliquid.perp_metrics_daily WHERE block_date >= current_date - INTERVAL '30' day AND block_date < current_date GROUP BY 1, 2, 3 ORDER BY 4 DESC LIMIT 30 ``` **Asset class trend:** ```sql theme={null} SELECT block_date, asset_class, SUM(volume_usd) AS volume_usd, SUM(open_interest_usd) AS end_of_day_open_interest_usd FROM rwa_hyperliquid.perp_metrics_daily WHERE block_date >= current_date - INTERVAL '90' day AND block_date < current_date GROUP BY 1, 2 ORDER BY 1 DESC, 3 DESC ``` Note that summing `open_interest_usd` across markets within one day is valid — those are distinct positions at the same instant. Summing it across days is not. # rwa_hyperliquid.perp_metrics_hourly Source: https://docs.dune.com/data-catalog/curated/rwa/activity/perp-metrics-hourly Hourly volume, open interest, funding rate, and taker activity per RWA perpetual market on Hyperliquid HIP-3. `rwa_hyperliquid.perp_metrics_hourly` pre-aggregates RWA perp activity into hourly buckets with market classification already joined on. Grain: one row per market per hour, keyed on `(block_month, block_hour, perp_dex, market_symbol)`. Use it instead of aggregating [`perp_trades`](/data-catalog/curated/rwa/activity/perp-trades) yourself whenever hourly resolution is enough. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Table schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | Partition column | | `block_date` | `DATE` | Date of the hour bucket | | `block_hour` | `TIMESTAMP` | Start of the hour bucket, UTC | | `perp_dex` | `VARCHAR` | Builder DEX short code | | `market_symbol` | `VARCHAR` | Market ticker within the builder DEX | | `coin` | `VARCHAR` | Full market id in `dex:SYMBOL` form | | `asset_id` | `INTEGER` | HIP-3 asset id | | `asset_class` | `VARCHAR` | Shared RWA product taxonomy | | `asset_type` | `VARCHAR` | Finer classification within `asset_class` | | `underlying_ticker` | `VARCHAR` | Ticker of the referenced real-world instrument | | `builder_name` | `VARCHAR` | Builder DEX full name | | `trades_count` | `BIGINT` | Taker fills in the hour | | `volume_usd` | `DOUBLE` | Taker-leg notional volume in USD | | `volume_units` | `DOUBLE` | Volume in contract units | | `buy_volume_usd` | `DOUBLE` | Taker buy volume | | `sell_volume_usd` | `DOUBLE` | Taker sell volume | | `unique_takers` | `BIGINT` | Distinct taker addresses in the hour | | `vwap` | `DOUBLE` | Volume-weighted average fill price | | `open_interest_units` | `DOUBLE` | Open interest in contract units, **both sides summed** | | `open_interest_usd` | `DOUBLE` | Open interest valued in USD | | `open_positions` | `BIGINT` | Count of open positions | | `funding_rate` | `DOUBLE` | Funding rate for the hour | | `funding_rate_annualized` | `DOUBLE` | Funding rate annualized | | `_updated_at` | `TIMESTAMP` | When this row was last refreshed | ## Open interest is both-sides `open_interest_units` and `open_interest_usd` sum longs and shorts, matching what the Hyperliquid UI displays. Classical one-sided open interest — the convention most traditional venues report — is **half** this number. ```sql theme={null} open_interest_units / 2 AS one_sided_open_interest ``` Pick one convention and state it. Comparing an unadjusted figure here against a one-sided figure from another venue overstates Hyperliquid by 2x. ## The newest hour is always partial The most recent bucket is incomplete by construction, since the hour has not finished. Filter it out for any trend or comparison: ```sql theme={null} WHERE block_hour < date_trunc('hour', now()) ``` Leaving it in produces a phantom drop at the right edge of every chart. ## Volume is taker-leg `volume_usd` inherits the taker-leg-only convention from [`perp_trades`](/data-catalog/curated/rwa/activity/perp-trades), so it matches Hyperliquid's own reported market volume rather than double-counting both sides. `buy_volume_usd` and `sell_volume_usd` split that same taker volume by direction, so the two sum to `volume_usd`. ## Example query ```sql theme={null} -- Hourly volume and open interest for a market SELECT block_hour, market_symbol, volume_usd, unique_takers, open_interest_usd, open_interest_units / 2 AS one_sided_oi_units, funding_rate_annualized FROM rwa_hyperliquid.perp_metrics_hourly WHERE block_hour >= now() - INTERVAL '7' day AND block_hour < date_trunc('hour', now()) AND underlying_ticker = 'TSLA' ORDER BY 1 DESC ``` **Funding rate extremes across markets:** ```sql theme={null} SELECT block_hour, market_symbol, asset_class, funding_rate_annualized, open_interest_usd FROM rwa_hyperliquid.perp_metrics_hourly WHERE block_hour >= now() - INTERVAL '2' day AND block_hour < date_trunc('hour', now()) AND open_interest_usd > 100000 ORDER BY abs(funding_rate_annualized) DESC LIMIT 25 ``` > [!NOTE] > > For daily rollups, use [`perp_metrics_daily`](/data-catalog/curated/rwa/activity/perp-metrics-daily) rather than aggregating this table — open interest is a point-in-time stock, not a flow, so summing hourly values across a day is wrong. # rwa_hyperliquid.perp_positions_hourly Source: https://docs.dune.com/data-catalog/curated/rwa/activity/perp-positions-hourly Per-account position snapshots on RWA perpetual markets, taken at each hourly funding round, with signed size, USD notional, and the funding settled on the position. `rwa_hyperliquid.perp_positions_hourly` is the per-account position surface for RWA perpetuals. Grain: one row per `(trader, coin, block_hour)` — every account position open in a Hyperliquid HIP-3 RWA market at the single global funding round that clears every market and account each hour. Market classification is already joined on. It is the RWA-scoped subset of [`hyperliquid.perp_positions_hourly`](/data-catalog/curated/perpetuals/hyperliquid/perp-positions-hourly). [`perp_trades`](/data-catalog/curated/rwa/activity/perp-trades) tells you what an account *did*; this table tells you what it *held*. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Table schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | First partition key. Filter it to bound a read in time | | `block_date` | `DATE` | Day of `block_hour`. Not a partition key | | `block_hour` | `TIMESTAMP(3) WITH TIME ZONE` | The funding round the position was open at, truncated to the hour | | `block_number` | `BIGINT` | Block of the funding round. One value per round, so it identifies the round rather than the row | | `perp_dex` | `VARCHAR` | Builder DEX short code. Never `hyperliquid` — no first-party market is classified real-world | | `coin` | `VARCHAR` | Full market id in `dex:SYMBOL` form. The join key to `rwa_hyperliquid.markets` | | `market_symbol` | `VARCHAR` | `coin` with the `dex:` prefix stripped. **Not unique across dexes**, so never join or group on it alone | | `asset_id` | `BIGINT` | Numeric HIP-3 market id. `BIGINT`, since HIP-4 ids exceed 1e8 | | `asset_class` | `VARCHAR` | Shared RWA product taxonomy. Never null | | `asset_type` | `VARCHAR` | Finer classification within `asset_class`. Never null | | `underlying_ticker` | `VARCHAR` | Ticker of the referenced real-world instrument. Null where no listed instrument exists (indices, commodities, fx, pre-IPO names) | | `trader` | `VARBINARY` | The account holding the position, as raw bytes | | `trader_prefix` | `VARCHAR` | Second partition key: the first byte of `trader` as two lowercase hex characters. Filter it alongside `trader` or nothing prunes | | `position_size` | `DOUBLE` | Signed size in base units; negative is short, and never zero | | `position_side` | `VARCHAR` | `long` or `short`, from the sign of `position_size` | | `valuation_price` | `DOUBLE` | The market's close price carried forward to the round — the same price `perp_metrics_hourly` strikes open interest at | | `position_notional_usd` | `DOUBLE` | `abs(position_size) * valuation_price` — unsigned exposure, so read `position_side` for direction | | `funding_amount_usd` | `DOUBLE` | Funding settled on this position in this round, signed from the account's perspective: negative means it paid | | `funding_rate` | `DOUBLE` | The round's settled rate for the market, identical across every account in the round | | `metadata_last_updated` | `DATE` | Date a curated cell on this market last changed. The pushable form of the `_updated_at` floor — says nothing about the position | | `_updated_at` | `TIMESTAMP(3) WITH TIME ZONE` | The later of the position row's own watermark and the market map's `last_updated` | ## A snapshot series, not a position history Rows exist only for positions open at the top of the hour. A close is the **absence** of a row in the next hour, never a zero-size row, and a position opened and closed inside the same hour never appears at all. To detect a close, compare the set of `(trader, coin)` keys between two hours rather than looking for a terminating row. This also means positions are not reconstructible from fills: `perp_trades` publishes both legs of every match and so is per-account complete, but it reports fills, not what an account held at an hour boundary. RWA history starts **2025-10-13**, later than the venue-wide funding feed floor, because RWA HIP-3 markets listed after it. > [!WARNING] > > The newest hour is **missing rather than empty** until its funding round is ingested. Filter `block_hour < date_trunc('hour', now())` for complete data, and never read a zero count at the current hour as zero open interest. ## Single-account reads must filter trader_prefix The physical table this view reads is partitioned on `(block_month, trader_prefix)`. Trino derives no partition value from `trader = 0x…` on its own, so a `trader`-only predicate reads every one of the 256 buckets in range instead of one. The bucket is a readable hex prefix rather than a hash precisely so you can state it yourself — it is the address's first two hex characters, lowercase: ```sql theme={null} -- One account's RWA position snapshots this month, complete hours only SELECT coin, underlying_ticker, asset_class, position_side, position_size, position_notional_usd, funding_amount_usd FROM rwa_hyperliquid.perp_positions_hourly WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '1' day) AND trader_prefix = 'ab' -- required, or nothing prunes AND trader = 0xab5d5f0a3b1c2d3e4f5061728394a5b6c7d8e9f0 AND block_hour < DATE_TRUNC('hour', NOW()) ORDER BY position_notional_usd DESC ``` Where the address is not a literal, `lower(substr(to_hex(trader), 1, 2))` gives the same value. `to_hex` returns uppercase and the partition values are lowercase, so an uppercase prefix matches nothing. `coin` does **not** prune here. Market-grain questions belong in [`perp_metrics_hourly`](/data-catalog/curated/rwa/activity/perp-metrics-hourly), which already carries open interest and funding per market-hour. ## Rolling up reproduces open interest Both tables value a position at the same carried-forward trade price, so aggregating to `(coin, block_hour)` reproduces `perp_metrics_hourly.open_interest_usd` and `open_positions` exactly: ```sql theme={null} SELECT block_hour, coin, SUM(position_notional_usd) AS open_interest_usd, SUM(ABS(position_size)) AS open_interest_units, COUNT(*) AS open_positions FROM rwa_hyperliquid.perp_positions_hourly WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '7' day) AND block_date >= CURRENT_DATE - INTERVAL '7' day AND block_hour < DATE_TRUNC('hour', NOW()) GROUP BY 1, 2 ``` That sum counts **both sides** — every long is matched by a short — which is the convention the Hyperliquid UI uses. Classical one-sided open interest is half of it. Use `perp_metrics_hourly` when the market-level figure is all you need; this table is for when you need to decompose it by account. Because `valuation_price` is a trade price rather than a mark price, a position's notional differs from the Hyperliquid UI's mark-priced value by the trade-to-mark basis. ## Funding `funding_amount_usd` is the payment the venue actually settled on that position in that round, not a rate applied to a notional you compute yourself — use it directly for per-account funding cost. A long pays (negative) when `funding_rate` is positive and receives when it is negative; a short is the mirror. `funding_amount_usd = 0` means the payment rounded to zero on a live position, not a disabled market. `funding_rate` repeats on every row of a `(coin, block_hour)`, so average it per market-hour rather than per position. It is the rate as settled, not the forward-looking rate shown beside the Hyperliquid funding countdown. ```sql theme={null} -- Who paid and who collected funding on RWA equity perps last week SELECT '0x' || lower(to_hex(trader)) AS trader, SUM(funding_amount_usd) AS net_funding_usd, AVG(position_notional_usd) AS avg_notional_usd, COUNT(*) AS position_hours FROM rwa_hyperliquid.perp_positions_hourly WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '7' day) AND block_date >= CURRENT_DATE - INTERVAL '7' day AND block_hour < DATE_TRUNC('hour', NOW()) AND asset_class = 'equities' GROUP BY 1 ORDER BY 2 DESC LIMIT 25 ``` ## Classification is joined live `asset_class`, `asset_type`, and `underlying_ticker` come from [`rwa_hyperliquid.markets`](/data-catalog/curated/rwa/registry/hyperliquid-markets) on every read, so reclassifying a market lands immediately with nothing to backfill. RWA scope is that classification itself, and it is default-deny: a market appears only once its underlying is classified as real-world. Crypto, crypto-dominance indices, GPU-compute indices, and any market that has listed but not been classified are all absent — a market missing here is unclassified, not pending. `fx` is **in** scope. > [!NOTE] > > Entry price, unrealized PnL, and an account's leverage and margin mode are not here — [`perp_trades`](/data-catalog/curated/rwa/activity/perp-trades) carries leverage and margin mode per fill, and market-level `max_leverage` and `margin_mode` are in [`rwa_hyperliquid.markets`](/data-catalog/curated/rwa/registry/hyperliquid-markets). Vaults are ordinary accounts here and are not flagged. # rwa_hyperliquid.perp_trades Source: https://docs.dune.com/data-catalog/curated/rwa/activity/perp-trades Taker-leg fills on RWA perpetual markets, covering Hyperliquid HIP-3 builder-deployed perps, with per-fill trader leverage and margin mode. `rwa_hyperliquid.perp_trades` is the fill table for RWA perpetual futures — synthetic exposure to a real-world asset with no tokenized share involved. Grain: one taker-leg fill per row, keyed on `(block_month, block_date, unique_key)`. It covers Hyperliquid HIP-3 builder-deployed markets. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Taker leg only Each row represents the taker leg of a fill. As a result, `SUM(notional_usd)` matches the volume Hyperliquid reports for the market without double-counting both sides. ## Leverage and margin, per fill Three columns carry the trader's risk posture at fill time, and nothing else in the RWA catalog has them — not even the pre-aggregated metrics tables: | Column | What it tells you | | - | - | | `leverage` | The trader's leverage on the position at the moment of the fill | | `margin_mode` | Whether the trader held the position `cross` or `isolated` | | `leverage_setting` | Whether that leverage was chosen by the trader or inherited from the market default | ## Table schema | Column | Type | Description | | - | - | - | | `block_month` | `DATE` | Partition column | | `block_date` | `DATE` | Fill date | | `block_time` | `TIMESTAMP(3) WITH TIME ZONE` | Fill timestamp | | `block_number` | `BIGINT` | Block height | | `perp_dex` | `VARCHAR` | Builder DEX short code | | `coin` | `VARCHAR` | Full market id in `dex:SYMBOL` form, e.g. `xyz:TSLA` | | `market_symbol` | `VARCHAR` | Market ticker within the builder DEX | | `asset_id` | `INTEGER` | HIP-3 asset id. **Join key to `rwa_hyperliquid.markets.asset_id`** | | `side` | `VARCHAR` | `buy` or `sell`, from the taker's perspective | | `price` | `DOUBLE` | Fill price | | `size` | `DOUBLE` | Fill size in contract units | | `notional_usd` | `DOUBLE` | USD notional of the fill | | `fill_type` | `VARCHAR` | `order`, `twap`, `liquidation`, `adl` (auto-deleveraging), or `settlement` | | `builder_name` | `VARCHAR` | Builder DEX full name | | `trader` | `VARCHAR` | Taker address | | `leverage` | `INTEGER` | Trader's leverage on the position at fill time. Always populated | | `margin_mode` | `VARCHAR` | `cross` or `isolated` — what the trader actually used for this position | | `leverage_setting` | `VARCHAR` | `explicit` when the trader set leverage themselves, `market_default` when they never did | | `dir` | `VARCHAR` | Hyperliquid direction string, e.g. Open Long, Close Short | | `fee` | `DOUBLE` | Protocol fee paid | | `builder_fee` | `DOUBLE` | Fee routed to the builder | | `deployer_fee` | `DOUBLE` | Fee routed to the market deployer | | `twap_id` | `BIGINT` | TWAP order identifier, for `fill_type = 'twap'` | | `liquidation_method` | `VARCHAR` | Liquidation mechanism, for `fill_type = 'liquidation'` | | `liquidation_liquidated_user` | `VARCHAR` | Account that was liquidated | | `liquidation_mark_px` | `DOUBLE` | Mark price at liquidation | | `oid` | `BIGINT` | Order identifier | | `tid` | `BIGINT` | Trade identifier | | `unique_key` | `VARCHAR` | Row identifier | | `_updated_at` | `TIMESTAMP(3) WITH TIME ZONE` | When this row was last refreshed | > [!WARNING] > > `asset_id` is `INTEGER` here, so it joins to `rwa_hyperliquid.markets.asset_id` with no cast. Do **not** join it to `markets.token_address`, which is the same value typed as `VARCHAR`. > > A perp has no `token_id` and never joins to `rwa_multichain.tokens` — there is no token behind it. ## fill_type matters for volume Liquidations, auto-deleveraging (`adl`), and market-delisting `settlement` fills are not discretionary trading. `order` fills dominate, followed by `twap`, with forced closes a small tail. Keep only user-initiated fills when measuring genuine trading demand: ```sql theme={null} WHERE fill_type IN ('order', 'twap') ``` TWAP fills are one order sliced into many small fills, so they inflate trade counts far more than volume — the fill count runs orders of magnitude above the number of distinct orders behind it. Count distinct `twap_id` rather than rows if you want order-level counts. ## Getting asset class This table has no `asset_class`. Join [`rwa_hyperliquid.markets`](/data-catalog/curated/rwa/registry/hyperliquid-markets) for classification, issuer, and leverage caps: ```sql theme={null} SELECT m.asset_class, m.underlying_ticker, p.builder_name, COUNT(*) AS fills, SUM(p.notional_usd) AS volume_usd FROM rwa_hyperliquid.perp_trades p JOIN rwa_hyperliquid.markets m ON m.asset_id = p.asset_id WHERE p.block_date >= current_date - INTERVAL '7' day AND p.fill_type IN ('order', 'twap') GROUP BY 1, 2, 3 ORDER BY 5 DESC LIMIT 25 ``` ## leverage_setting decides whether leverage is a choice `market_default` fills use Hyperliquid's default of `min(20, max_leverage)` rather than trader-selected leverage. Filter to `explicit` whenever you are measuring trader risk appetite — mixing the two makes the default look like a popular choice: ```sql theme={null} WHERE leverage_setting = 'explicit' ``` ## margin_mode here is the trader's choice, not the market's rule Two different columns share this name, and they mean different things: * `rwa_hyperliquid.markets.margin_mode` is the regime the **deployer** set for the market: `cross`, `noCross`, or `strictIsolated`. * `perp_trades.margin_mode` is what the **trader** actually used on that position: `cross` or `isolated`. A market with `margin_mode = 'cross'` permits both, and in practice sees both — traders on cross-enabled markets still pick isolated a meaningful share of the time. A `noCross` or `strictIsolated` market only ever produces `isolated` fills. So the market-level column tells you what was allowed and the trade-level column tells you what was chosen; they are not interchangeable. ## Example query ```sql theme={null} -- Leverage distribution by asset class, trader-chosen leverage only SELECT m.asset_class, t.margin_mode, COUNT(*) AS fills, APPROX_PERCENTILE(t.leverage, 0.5) AS median_leverage, APPROX_PERCENTILE(t.leverage, 0.95) AS p95_leverage, SUM(t.notional_usd) AS volume_usd FROM rwa_hyperliquid.perp_trades t JOIN rwa_hyperliquid.markets m ON m.asset_id = t.asset_id WHERE t.block_date >= current_date - INTERVAL '7' day AND t.block_date < current_date AND t.leverage_setting = 'explicit' AND t.fill_type IN ('order', 'twap') GROUP BY 1, 2 ORDER BY 6 DESC ``` **Was leverage elevated going into a liquidation cluster?** ```sql theme={null} SELECT block_date, market_symbol, COUNT(*) FILTER (WHERE fill_type = 'liquidation') AS liquidations, APPROX_PERCENTILE(leverage, 0.5) AS median_leverage_all_fills, SUM(notional_usd) FILTER (WHERE fill_type = 'liquidation') AS liquidated_notional_usd FROM rwa_hyperliquid.perp_trades WHERE block_date >= current_date - INTERVAL '30' day AND block_date < current_date GROUP BY 1, 2 HAVING COUNT(*) FILTER (WHERE fill_type = 'liquidation') > 0 ORDER BY 5 DESC LIMIT 50 ``` > [!NOTE] > > For pre-aggregated volume, open interest, and funding rather than raw fills, use [`perp_metrics_hourly`](/data-catalog/curated/rwa/activity/perp-metrics-hourly) or [`perp_metrics_daily`](/data-catalog/curated/rwa/activity/perp-metrics-daily). Neither carries leverage — this table is the only source for it. # rwa_multichain.trades Source: https://docs.dune.com/data-catalog/curated/rwa/activity/trades Secondary-market trades of tokenized real-world assets — DEX swaps plus RWA-native venues including Ondo Global Markets, Swarm, and Dinari. `rwa_multichain.trades` covers where tokenized RWAs actually change hands. Grain: one row per trade, keyed on `(blockchain, block_month, block_date, unique_key)`. It unions DEX swaps with RWA-native venues and normalizes both into a two-token swap schema. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Two platform types `platform_type` splits the table into the two kinds of venue: | `platform_type` | What it covers | | - | - | | `dex` | Ordinary DEX swaps where one leg is an RWA — Uniswap, Raydium, PancakeSwap, Meteora, Curve, Aerodrome, and others | | `rwa_platform` | Purpose-built RWA venues — Ondo Global Markets, Swarm, Dinari | DEX volume dominates by row count, but `rwa_platform` is where issuer-operated primary and secondary flow shows up. Split on `platform_type` rather than treating the table as homogeneous. ## rwa_side tells you which leg is the RWA Every row is a two-token swap, and either leg can be the real-world asset. `rwa_side` resolves it: | `rwa_side` | Meaning | Read the RWA from | | - | - | - | | `buy` | The RWA was bought | `token_bought_*` columns | | `sell` | The RWA was sold | `token_sold_*` columns | | `rwa_to_rwa` | Both legs are RWAs | Either, depending on the question | Ignoring `rwa_side` and always reading `token_bought_address` gives you the stablecoin or quote asset roughly half the time. For directional flow analysis, filter `rwa_side IN ('buy', 'sell')` to exclude the RWA-to-RWA rows that would double-count. `trades` does not have a `token_id` column. To attach RWA reference data, select the RWA leg with `rwa_side`, then join its address to the relevant chain identity: ```sql theme={null} CASE rwa_side WHEN 'buy' THEN token_bought_address WHEN 'sell' THEN token_sold_address END AS rwa_token_address ``` For EVM and Solana rows, that value matches `rwa_multichain.tokens_reference_data.token_id`. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain for the trade | | `block_month` | `DATE` | Partition column | | `block_date` | `DATE` | Trade date | | `block_time` | `TIMESTAMP` | Trade timestamp | | `block_number` | `BIGINT` | Block height | | `platform_type` | `VARCHAR` | `dex` or `rwa_platform` | | `project` | `VARCHAR` | Venue name, e.g. `uniswap`, `raydium`, `ondo_global_markets` | | `version` | `VARCHAR` | Venue version where applicable | | `token_bought_symbol` | `VARCHAR` | Symbol of the token received | | `token_bought_address` | `VARCHAR` | Address of the token received | | `token_bought_amount` | `DOUBLE` | Decimals-adjusted amount received | | `token_bought_amount_raw` | `UINT256` | Raw amount received | | `token_sold_symbol` | `VARCHAR` | Symbol of the token given | | `token_sold_address` | `VARCHAR` | Address of the token given | | `token_sold_amount` | `DOUBLE` | Decimals-adjusted amount given | | `token_sold_amount_raw` | `UINT256` | Raw amount given | | `token_pair` | `VARCHAR` | Normalized pair label | | `amount_usd` | `DOUBLE` | USD value of the trade | | `taker` | `VARCHAR` | Address taking the trade | | `maker` | `VARCHAR` | Counterparty, where the venue exposes one | | `project_contract_address` | `VARCHAR` | Pool or venue contract | | `tx_id` | `VARCHAR` | Transaction identifier | | `tx_from` | `VARCHAR` | Transaction sender | | `tx_to` | `VARCHAR` | Transaction recipient | | `event_index` | `BIGINT` | Event position within the transaction | | `sub_event_index` | `BIGINT` | Position within a single event | | `rwa_side` | `VARCHAR` | Which leg is the RWA: `buy`, `sell`, or `rwa_to_rwa` | | `unique_key` | `VARCHAR` | Row identifier | | `_updated_at` | `TIMESTAMP` | When this row was last refreshed | > [!NOTE] > > Addresses are `VARCHAR` across all token and account columns — 0x-hex on EVM, base58 on Solana — so one query covers both without casting. For point-in-time valuation, resolve the RWA leg and join [`prices`](/data-catalog/curated/rwa/valuation/prices) on `(blockchain, token_id)` and its validity range. ## This table does not contain perpetuals Perpetual futures on RWA underlyings are a different instrument with a different schema, and they live in [`perp_trades`](/data-catalog/curated/rwa/activity/perp-trades). A perp fill is not a two-token swap, so it is deliberately not unioned in here. Comparing spot to synthetic activity means querying both tables and joining on asset class. ## Example query ```sql theme={null} -- Venue mix for RWA secondary trading SELECT platform_type, project, COUNT(*) AS trades, COUNT(DISTINCT taker) AS unique_takers, SUM(amount_usd) AS volume_usd FROM rwa_multichain.trades WHERE block_month >= date_trunc('month', current_date - INTERVAL '1' month) AND rwa_side IN ('buy', 'sell') GROUP BY 1, 2 ORDER BY 5 DESC NULLS LAST LIMIT 30 ``` **Net directional flow per asset, reading the correct leg:** ```sql theme={null} SELECT block_date, CASE rwa_side WHEN 'buy' THEN token_bought_symbol WHEN 'sell' THEN token_sold_symbol END AS rwa_symbol, SUM(CASE WHEN rwa_side = 'buy' THEN amount_usd ELSE -amount_usd END) AS net_buy_usd, SUM(amount_usd) AS gross_volume_usd FROM rwa_multichain.trades WHERE block_month >= date_trunc('month', current_date) AND rwa_side IN ('buy', 'sell') GROUP BY 1, 2 ORDER BY 1 DESC, 4 DESC NULLS LAST ``` **Attach issuer and product class to the RWA leg:** ```sql theme={null} WITH rwa_legs AS ( SELECT *, CASE rwa_side WHEN 'buy' THEN token_bought_address WHEN 'sell' THEN token_sold_address END AS rwa_token_id FROM rwa_multichain.trades WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE) AND rwa_side IN ('buy', 'sell') ) SELECT r.issuer_name, r.asset_class, SUM(t.amount_usd) AS volume_usd FROM rwa_legs AS t INNER JOIN rwa_multichain.tokens_reference_data AS r ON r.blockchain = t.blockchain AND r.token_id = t.rwa_token_id GROUP BY 1, 2 ORDER BY 3 DESC ``` # rwa_multichain.transfers Source: https://docs.dune.com/data-catalog/curated/rwa/activity/transfers Transfer-level movement of tokenized real-world assets across 24 chains, normalized into one cross-chain schema. `rwa_multichain.transfers` is the movement table for tokenized RWAs. Grain: one row per transfer, keyed on `(blockchain, block_month, block_date, unique_key)`. It normalizes transfers from 24 chains into a single schema with `VARCHAR` addresses. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Table schema | Column | Type | Description | | - | - | - | | `unique_key` | `VARCHAR` | Row identifier | | `blockchain` | `VARCHAR` | Chain for the transfer | | `block_time` | `TIMESTAMP` | Transfer timestamp | | `block_date` | `DATE` | Transfer date | | `block_month` | `DATE` | Partition column. Filter on this for large scans | | `block_number` | `BIGINT` | Block height | | `tx_id` | `VARCHAR` | Transaction identifier. Transaction hash on EVM, signature on Solana | | `tx_index` | `BIGINT` | Transaction position within the block | | `event_index` | `BIGINT` | Event position within the transaction | | `sub_event_index` | `BIGINT` | Position within a single event, for chains that emit multiple movements per event | | `from_address` | `VARCHAR` | Sender. 0x-hex on EVM, base58 on Solana, native form elsewhere | | `to_address` | `VARCHAR` | Recipient | | `tx_signer` | `VARCHAR` | Account that signed the transaction, which may differ from `from_address` | | `token_address` | `VARCHAR` | Normalized native token identifier. Join key to the NAV tables after casting | | `token_id` | `VARCHAR` | Normalized cross-chain token identifier, joins to `rwa_multichain.tokens` | | `token_symbol` | `VARCHAR` | RWA token symbol | | `token_standard` | `VARCHAR` | Native token standard. Finer-grained than on `tokens` — see the note below | | `amount_raw` | `DOUBLE` | Amount in the token's native precision | | `amount` | `DOUBLE` | Decimals-adjusted amount | | `price_usd` | `DOUBLE` | Curated USD price applied to this transfer | | `amount_usd` | `DOUBLE` | Curated USD value of the transfer | | `transfer_type` | `VARCHAR` | Event classification. **Non-EVM chains only** — see below | | `is_supply_event` | `BOOLEAN` | `true` when the transfer is a native mint/burn or other supply change | | `_updated_at` | `TIMESTAMP` | When this row was last refreshed | > [!WARNING] > > `token_standard` here uses finer-grained values than `rwa_multichain.tokens`: `erc20`, `bep20`, `tip20`, `spl_token`, `spl_token_2022`, `classic`, `soroban`, `issued`, `sui_coin`. Do not join the two tables on `token_standard`; join on `(blockchain, token_id)`. ## Use is_supply_event for cross-chain mint/burn filtering `is_supply_event` is the normalized cross-chain flag for native supply changes. Use it to isolate peer-to-peer movement: ```sql theme={null} WHERE NOT is_supply_event ``` Keep `transfer_type` when you need chain-native detail. It is `NULL` for **every** EVM row and populated only on Solana, Stellar, Sui, XRPL, and Aptos. | Chain group | `transfer_type` | Mints and burns | | - | - | - | | All EVM-compatible chains | Always `NULL` | **Present** as zero-address rows; use `is_supply_event` | | Solana, Stellar | Populated | **Present** as `mint` and `burn` rows | | Sui, XRPL, Aptos | Populated | Use `is_supply_event` for supply changes | So a filter like `WHERE transfer_type = 'transfer'` silently drops all EVM-compatible activity, which is the large majority of rows. A plain `SUM(amount)` can include issuance and redemption alongside wallet-to-wallet movement on EVM-compatible chains, Solana, and Stellar. Use `NOT is_supply_event` to isolate peer-to-peer volume. Values observed on the typed chains include `transfer`, `mint`, `burn`, `payment`, `object_created`, `object_deleted`, `ownership_transfer`, `ownership_balance_topup`, `ownership_balance_spend`, and `transfer_with_balance_change`. > [!NOTE] > > For issuance and redemption analysis, use [`supply_changes`](/data-catalog/curated/rwa/holders-supply/supply-changes) instead. It covers native supply events across supported chains and provides `direction` (`increase` or `decrease`) for net-flow calculations. Never sum `transfers` and `supply_changes` together. ## Tempo reconstruction boundary Tempo transfer and balance reconstruction is supported from 2026-05-05. This is a data support boundary, not a claim that Tempo began on that date. Coverage uses complete transfer replay from that boundary because no independent Tempo daily holder-state source exists. Tempo's zero-address TIP-20 rows remain in `transfers`. `supply_changes` derives them once and verifies them against native TIP-20 `Mint` and `Burn` events. ## Query performance Filter on `block_month` or `block_date` to prune partitions, and add `blockchain` when you only need one chain. Robinhood Chain and Solana dominate row counts, so an unfiltered scan is expensive. ```sql theme={null} -- ✅ Good: partition-pruned and chain-scoped SELECT * FROM rwa_multichain.transfers WHERE block_month >= date_trunc('month', current_date) AND blockchain = 'ethereum' ``` ## Example query ```sql theme={null} -- Weekly peer-to-peer transfer volume by chain SELECT date_trunc('week', block_date) AS week, blockchain, COUNT(*) AS transfers, COUNT(DISTINCT from_address) AS unique_senders, SUM(amount_usd) AS volume_usd FROM rwa_multichain.transfers WHERE block_month >= date_trunc('month', current_date - INTERVAL '2' month) AND NOT is_supply_event GROUP BY 1, 2 ORDER BY 1 DESC, 5 DESC NULLS LAST ``` **Largest single transfers of an asset:** ```sql theme={null} SELECT block_time, blockchain, from_address, to_address, amount, amount_usd, tx_id FROM rwa_multichain.transfers WHERE block_month >= date_trunc('month', current_date - INTERVAL '1' month) AND token_symbol = 'BUIDL' ORDER BY amount DESC LIMIT 25 ``` # All RWA Tables Source: https://docs.dune.com/data-catalog/curated/rwa/all-tables-overview Complete inventory of RWA tables on Dune, with grain and refresh cadence. Curated RWA tables across four concept groups. The `rwa_multichain` schema covers tokenized assets; `rwa_hyperliquid` covers synthetic RWA perpetuals. There is no `rwa_multichain.token_metadata` table. ## Registry and classification | Table | Grain | Refresh | Docs | | - | - | - | - | | `rwa_multichain.tokens` | One row per token per chain | Hourly | [Open](/data-catalog/curated/rwa/registry/tokens) | | `rwa_multichain.tokens_reference_data` | One row per token per chain, with product fields when registered | Hourly | [Open](/data-catalog/curated/rwa/registry/tokens-reference-data) | | `rwa_multichain.product_reference_data` | One row per `product_id`, with a `deployments` array | Hourly | [Open](/data-catalog/curated/rwa/registry/product-reference-data) | | `rwa_hyperliquid.markets` | One row per HIP-3 perp market | Hourly | [Open](/data-catalog/curated/rwa/registry/hyperliquid-markets) | ## Holders and supply | Table | Grain | Refresh | Docs | | - | - | - | - | | `rwa_multichain.balances` | Daily, per holder per token per chain | Daily | [Open](/data-catalog/curated/rwa/holders-supply/balances) | | `rwa_multichain.balances_enriched` | Daily, per holder, with entity labels | Daily | [Open](/data-catalog/curated/rwa/holders-supply/balances-enriched) | | `rwa_multichain.supply` | Daily, per token per chain | Daily | [Open](/data-catalog/curated/rwa/holders-supply/supply) | | `rwa_multichain.supply_changes` | Event-level issuance, redemption, clawback, interest | Event-driven | [Open](/data-catalog/curated/rwa/holders-supply/supply-changes) | ### Supporting label tables | Table | Grain | Refresh | | - | - | - | | `rwa_multichain.holder_labels` | One resolved label per chain/address | Hourly | | `rwa_multichain.protocol_holder_labels` | Protocol-owned labels per chain/address | Hourly | Both are already folded into `balances_enriched`, so start there unless you need the label resolver itself. ## Valuation | Table | Grain | Refresh | Docs | | - | - | - | - | | `rwa_multichain.prices` | One row per token per price validity window | Hourly | [Open](/data-catalog/curated/rwa/valuation/prices) | | `rwa_multichain.nav` | One row per NAV update event | Daily | [Open](/data-catalog/curated/rwa/valuation/nav) | | `rwa_multichain.nav_intervals` | One row per NAV validity window | Daily | [Open](/data-catalog/curated/rwa/valuation/nav-intervals) | | `rwa_multichain.unit_conversions` | Time-versioned Solana Token-2022 unit multipliers | Hourly | [Open](/data-catalog/curated/rwa/valuation/unit-conversions) | ## Activity and trading | Table | Grain | Refresh | Docs | | - | - | - | - | | `rwa_multichain.transfers` | Transfer-level | Hourly | [Open](/data-catalog/curated/rwa/activity/transfers) | | `rwa_multichain.trades` | Trade-level | Hourly | [Open](/data-catalog/curated/rwa/activity/trades) | | `rwa_hyperliquid.perp_trades` | Fill-level, with leverage | Hourly | [Open](/data-catalog/curated/rwa/activity/perp-trades) | | `rwa_hyperliquid.perp_metrics_hourly` | Hourly, per market | Hourly | [Open](/data-catalog/curated/rwa/activity/perp-metrics-hourly) | | `rwa_hyperliquid.perp_metrics_daily` | Daily, per market | Hourly | [Open](/data-catalog/curated/rwa/activity/perp-metrics-daily) | | `rwa_hyperliquid.perp_positions_hourly` | Hourly, per account per market | Hourly | [Open](/data-catalog/curated/rwa/activity/perp-positions-hourly) | ## Picking the right table | If you want to know | Use | | - | - | | Which RWAs exist and on which chains | `tokens` | | Token identity with attached product classification and legal fields | `tokens_reference_data` | | One row per product, with classification, legal fields, and chain deployments | `product_reference_data` | | Total outstanding supply and AUM per token | `supply` (`supply_usd`) | | Issuance and redemption flows | `supply_changes` | | Who holds an asset and how concentrated holders are | `balances` | | How much of supply sits with CEXs, protocols, or custodians | `balances_enriched` | | Token-unit USD price windows | `prices` | | How often an issuer publishes NAV, or whether a feed is stale | `nav` | | Raw NAV validity windows (EVM hex join is EVM-only) | `nav_intervals` | | Solana display-unit vs token-unit scaling | `unit_conversions` | | How tokens moved between wallets | `transfers` | | Where an asset trades onchain and at what volume | `trades` | | Synthetic exposure to a real-world asset without a token | `rwa_hyperliquid.perp_trades` | | Trader leverage and margin mode on RWA perps | `rwa_hyperliquid.perp_trades` | | Open interest and funding on RWA perps | `perp_metrics_hourly`, `perp_metrics_daily` | | What an individual account held on RWA perps, and the funding it paid | `rwa_hyperliquid.perp_positions_hourly` | | Which HIP-3 perp markets exist and what they reference | `rwa_hyperliquid.markets` | # rwa_multichain.balances Source: https://docs.dune.com/data-catalog/curated/rwa/holders-supply/balances Daily holder balance snapshots for tokenized real-world assets across all tracked chains, with curated USD values. `rwa_multichain.balances` is the cross-chain holder snapshot table. Grain: one row per holder per token per chain per day, keyed on `(blockchain, day, address, token_id)`. Use it to measure holder counts, concentration, and AUM. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain for the native balance source | | `day` | `DATE` | Balance snapshot date | | `address` | `VARCHAR` | Normalized holder address. 0x-hex on EVM, base58 on Solana, native form elsewhere | | `token_symbol` | `VARCHAR` | RWA token symbol where available | | `token_address` | `VARCHAR` | Normalized native token identifier as `VARCHAR` | | `token_id` | `VARCHAR` | Normalized cross-chain token identifier for joining to `rwa_multichain.tokens` | | `token_standard` | `VARCHAR` | Native token standard or asset namespace, including `tip20` for Tempo | | `currency` | `VARCHAR` | Token metadata currency where available | | `balance_raw` | `DOUBLE` | Raw token balance in the source token's native precision | | `balance` | `DOUBLE` | Token balance adjusted for decimals | | `balance_usd` | `DOUBLE` | USD value of the balance using curated RWA prices | | `last_updated` | `TIMESTAMP` | UTC timestamp when the balance last changed | ## USD valuation `balance_usd` applies Dune's curated RWA price for the snapshot date. For asset-level AUM, use [`supply.supply_usd`](/data-catalog/curated/rwa/holders-supply/supply). You do not need to join [`prices`](/data-catalog/curated/rwa/valuation/prices) to read `balance_usd`. Join `prices` when you need `value_kind` and the validity window. ```sql theme={null} SELECT b.day, b.token_symbol, SUM(b.balance_usd) AS holder_usd FROM rwa_multichain.balances AS b WHERE b.day >= current_date - INTERVAL '30' day AND b.balance > 0 GROUP BY 1, 2 ``` ## Balance reconstruction boundaries Most EVM-chain balances come from balance-update streams. On several non-EVM chains they are reconstructed by accumulating transfers, which means a chain that started tracking mid-history can carry a different starting point than a full-history rebuild would produce. Treat cross-chain holder totals for those chains as directional rather than exact. Indexed tokens without a Backed/xStocks or Ethereum STBT adapter are absent from this table. Tempo is EVM-compatible but uses TIP-20, represented as `token_standard = 'tip20'`. Its transfer and balance reconstruction is supported from 2026-05-05. Coverage uses complete transfer replay from that boundary because no independent Tempo daily holder-state source exists. The date is a support boundary, not Tempo's start date. ## Zero balances are retained Rows persist after a holder empties a position, so `balance = 0` rows appear in the snapshot. Filter `balance > 0` when counting holders, or you will count every address that ever held the asset. ## Example query ```sql theme={null} -- Holder concentration for a single asset WITH latest AS ( SELECT address, balance FROM rwa_multichain.balances WHERE day = current_date - INTERVAL '1' day AND token_symbol = 'BUIDL' AND balance > 0 ) SELECT COUNT(*) AS holders, SUM(balance) AS total_balance, MAX(balance) / SUM(balance) AS top_holder_share FROM latest ``` **Top holders across all chains:** ```sql theme={null} SELECT address, COUNT(DISTINCT token_id) AS assets_held, SUM(balance_usd) AS portfolio_usd FROM rwa_multichain.balances WHERE day = current_date - INTERVAL '1' day AND balance > 0 AND balance_usd IS NOT NULL GROUP BY 1 ORDER BY 3 DESC LIMIT 50 ``` # rwa_multichain.balances_enriched Source: https://docs.dune.com/data-catalog/curated/rwa/holders-supply/balances-enriched Daily RWA holder balances with entity attribution — CEX, lending protocol, custodian, and treasury labels. `rwa_multichain.balances_enriched` extends [`balances`](/data-catalog/curated/rwa/holders-supply/balances) with entity attribution, so you can tell how much of an asset sits with centralized exchanges, lending protocols, and custodians versus unattributed wallets. Grain: one row per holder per token per chain per day, same as `balances`. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## What it answers Raw balances tell you an address holds 40% of an asset. They do not tell you whether that address is a custodian holding on behalf of thousands of end investors, an exchange omnibus wallet, or a single whale — three very different market-structure readings of the same number. The label columns resolve that: * How much of supply sits with CEXs, protocols, or custodians versus unknown wallets * Who the labeled top holders are * What an asset's DeFi exposure is, via labeled lending-protocol holdings * How much of outstanding supply is circulating versus issuer, bridge, or distributor inventory ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain for the native balance source | | `day` | `DATE` | Balance snapshot date | | `address` | `VARCHAR` | Normalized holder address | | `token_symbol` | `VARCHAR` | RWA token symbol | | `token_address` | `VARCHAR` | Normalized native token identifier | | `token_id` | `VARCHAR` | Normalized cross-chain token identifier | | `token_standard` | `VARCHAR` | Native token standard or asset namespace, including `tip20` for Tempo | | `token_product_id` | `VARCHAR` | \`blockchain | token_standard | token_id`. Join key to `tokens_reference_data\` | | `currency` | `VARCHAR` | Token metadata currency where available | | `balance_raw` | `DOUBLE` | Raw token balance in native precision | | `balance` | `DOUBLE` | Decimals-adjusted balance | | `balance_usd` | `DOUBLE` | USD value using curated RWA prices | | `address_label` | `VARCHAR` | Label value. `NULL` for unlabeled addresses | | `address_category` | `VARCHAR` | Top-level holder classification. Unlabeled rows use `unidentified` or `unidentified_smart_contract` | | `address_subcategory` | `VARCHAR` | Finer classification, or the top-level / unidentified fallback | | `address_label_source` | `VARCHAR` | Exact RWA label source. `NULL` for unidentified holders | | `address_label_method` | `VARCHAR` | RWA label extraction method. `NULL` for unidentified holders | | `is_smart_contract` | `BOOLEAN` | Whether the holder is a deployed EVM smart contract. `NULL` on Robinhood and non-EVM chains | | `is_circulating` | `BOOLEAN` | `false` for xStocks system wallets holding xStocks, bridge lockboxes, issuer inventory, and custodian distributor omnibus. CEX, DEX, lending, and unidentified wallets stay `true`. [`supply.circulating_supply`](/data-catalog/curated/rwa/holders-supply/supply) sums this flag. | | `last_updated` | `TIMESTAMP` | UTC timestamp when the balance last changed | ## Holder attribution Known entities carry their resolved label and category. Other rows are preserved with `address_category = 'unidentified'`; supported EVM contracts use `unidentified_smart_contract`. `address_category` and `address_subcategory` are non-null, so no `COALESCE(..., 'unlabeled')` is needed. `token_product_id` is the exact join key to [`tokens_reference_data`](/data-catalog/curated/rwa/registry/tokens-reference-data). Do not join the two tables on `product_id`: one product may have many chain deployments. Tempo smart-contract classification uses `tempo.creation_traces`. More specific entity and protocol labels retain precedence over the generic `unidentified_smart_contract` classification. ## Table schema notes Because one row per holder per day is preserved, zero balances persist after a holder exits. Filter `balance > 0` when counting holders. ## Example query ```sql theme={null} -- Supply attribution by holder type SELECT address_category AS holder_type, COUNT(DISTINCT address) AS holders, SUM(balance_usd) AS balance_usd FROM rwa_multichain.balances_enriched WHERE day = CURRENT_DATE - INTERVAL '1' DAY AND balance > 0 GROUP BY 1 ORDER BY 3 DESC NULLS LAST ``` **Labeled top holders for one asset:** ```sql theme={null} SELECT address, address_label, address_category, is_smart_contract, balance, balance_usd FROM rwa_multichain.balances_enriched WHERE day = CURRENT_DATE - INTERVAL '1' DAY AND token_symbol = 'BUIDL' AND balance > 0 ORDER BY balance DESC LIMIT 25 ``` **CEX-held share of an asset over time:** ```sql theme={null} SELECT day, SUM(CASE WHEN address_category = 'cex' THEN balance ELSE 0 END) / SUM(balance) AS cex_share FROM rwa_multichain.balances_enriched WHERE day >= CURRENT_DATE - INTERVAL '90' DAY AND token_symbol = 'BUIDL' AND balance > 0 GROUP BY 1 ORDER BY 1 DESC ``` # rwa_multichain.supply Source: https://docs.dune.com/data-catalog/curated/rwa/holders-supply/supply Daily outstanding supply per RWA token per chain, with curated USD-valued AUM. `rwa_multichain.supply` tracks total outstanding supply per token per chain as a daily series. Grain: one row per token per chain per day. Use it for AUM and supply trends instead of aggregating every holder balance. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Why use it over aggregating balances Summing `balance` from [`balances`](/data-catalog/curated/rwa/holders-supply/balances) gives the same answer, but it scans every holder row for every day in the window — expensive for a metric you often want across all assets and a long history. This table is pre-aggregated, so supply trends and AUM charts read one row per token per day. It also carries `supply_usd`, so per-product AUM does not require a manual point-in-time join. A token can have `supply_usd` even when it has no covering row in [`prices`](/data-catalog/curated/rwa/valuation/prices). ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain for the token deployment | | `day` | `DATE` | Supply snapshot date | | `token_symbol` | `VARCHAR` | RWA token symbol | | `token_address` | `VARCHAR` | Normalized native token identifier | | `token_id` | `VARCHAR` | Normalized cross-chain token identifier, joins to `rwa_multichain.tokens` | | `token_standard` | `VARCHAR` | Native token standard or asset namespace, including `tip20` for Tempo | | `supply_raw` | `UINT256` | Total outstanding supply in native precision | | `supply` | `DOUBLE` | Decimals-adjusted outstanding supply | | `supply_usd` | `DOUBLE` | Outstanding supply in USD | | `circulating_supply` | `DOUBLE` | Outstanding supply excluding issuer inventory, bridge lockboxes, xStocks system wallets, and custodian distributor omnibus. Null when holder reconstruction cannot be reconciled with outstanding supply | | `circulating_supply_usd` | `DOUBLE` | `circulating_supply` in USD. Null when `circulating_supply` or `supply_usd` is null | | `circulating_supply_status` | `VARCHAR` | `ok`, `total_supply_unavailable`, or `exceeds_total_supply`. Null when circulating supply is unavailable | | `price_source` | `VARCHAR` | Source of `supply_usd`: `oracle`, `iex`, `coinpaprika`, or `prices_dex`. Null when `supply_usd` is null | | `last_updated` | `TIMESTAMP` | Block time of the latest supply change reflected in this snapshot | ## Supply is per chain, not per asset An asset deployed on several chains has one row per chain per day. Cross-chain total supply for a single asset means summing across `blockchain`: ```sql theme={null} SELECT day, token_symbol, SUM(supply) AS total_supply FROM rwa_multichain.supply WHERE token_symbol = 'BUIDL' GROUP BY 1, 2 ``` Reading a single chain's row as the asset's total supply is the most common mistake on this table. Tempo is EVM-compatible but its supply rows use `token_standard = 'tip20'`, not `erc20`. They inherit the [balance reconstruction](/data-catalog/curated/rwa/holders-supply/balances) support boundary of 2026-05-05, which should not be interpreted as Tempo's start date. ## Example query ```sql theme={null} -- Supply trend for the largest assets SELECT day, token_symbol, SUM(supply) AS supply, SUM(supply_usd) AS supply_usd FROM rwa_multichain.supply WHERE day >= CURRENT_DATE - INTERVAL '90' DAY GROUP BY 1, 2 ORDER BY 1 DESC, 4 DESC NULLS LAST ``` **Net supply change over the last 30 days, by asset class:** ```sql theme={null} WITH windowed AS ( SELECT r.asset_class, s.token_id, MIN_BY(s.supply_usd, s.day) AS supply_start, MAX_BY(s.supply_usd, s.day) AS supply_end FROM rwa_multichain.supply AS s INNER JOIN rwa_multichain.tokens_reference_data AS r ON r.blockchain = s.blockchain AND r.token_id = s.token_id WHERE s.day >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY 1, 2 ) SELECT asset_class, SUM(supply_start) AS supply_usd_30d_ago, SUM(supply_end) AS supply_usd_now, SUM(supply_end) - SUM(supply_start) AS net_change_usd FROM windowed GROUP BY 1 ORDER BY 4 DESC NULLS LAST ``` # rwa_multichain.supply_changes Source: https://docs.dune.com/data-catalog/curated/rwa/holders-supply/supply-changes Event-level issuance, redemption, clawback, and interest-distribution activity, isolated from peer-to-peer transfers. `rwa_multichain.supply_changes` isolates events that increase or decrease onchain supply from ordinary wallet-to-wallet movement. Grain: one row per native supply-change event. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## What it answers * How much of an asset was minted or redeemed, and when * Whether net flows are positive or negative over a period * Whether onchain mint and redeem events reconcile against what an issuer or custodian reports on their own books That last one is the use case customers ask for most: an independent onchain check on issuer-reported subscription and redemption figures. ## Table schema | Column | Type | Description | | - | - | - | | `unique_key` | `VARCHAR` | Row identifier | | `blockchain` | `VARCHAR` | Chain for the event | | `block_time` | `TIMESTAMP` | Event timestamp | | `block_date` | `DATE` | Event date | | `block_month` | `DATE` | Partition column. Filter on this for large scans | | `block_number` | `BIGINT` | Block height | | `tx_id` | `VARCHAR` | Transaction identifier | | `tx_index` | `BIGINT` | Transaction position within the block | | `event_index` | `BIGINT` | Event position within the transaction | | `sub_event_index` | `BIGINT` | Position within a chain-native event | | `from_address` | `VARCHAR` | Source address where the chain exposes one | | `to_address` | `VARCHAR` | Destination address where the chain exposes one | | `token_address` | `VARCHAR` | Normalized native token identifier | | `token_id` | `VARCHAR` | Normalized cross-chain token identifier | | `token_symbol` | `VARCHAR` | RWA token symbol | | `token_standard` | `VARCHAR` | Native token standard, including `tip20` for Tempo | | `amount_raw` | `DOUBLE` | Absolute amount in native precision | | `amount` | `DOUBLE` | Absolute decimals-adjusted amount | | `price_usd` | `DOUBLE` | Curated USD price applied to the event | | `amount_usd` | `DOUBLE` | Absolute curated USD value | | `event_type` | `VARCHAR` | `issuance`, `redemption`, `clawback`, or `interest_distribution` | | `direction` | `VARCHAR` | `increase` or `decrease` | | `_updated_at` | `TIMESTAMP` | When this row was last refreshed | ## Use direction for net flow `amount` is always unsigned. Apply the sign from `direction`: ```sql theme={null} SUM(CASE WHEN direction = 'increase' THEN amount ELSE -amount END) AS net_issuance, SUM(amount) AS gross_flow ``` `event_type` explains why the supply moved. `direction` explains whether the onchain supply increased or decreased. For example, `clawback` is a decrease and `interest_distribution` is an increase. ## Relationship to transfers [`transfers`](/data-catalog/curated/rwa/activity/transfers) is the canonical transfer surface and marks lifecycle rows with `is_supply_event`. On Tempo, zero-address TIP-20 issuance and redemption rows are retained in `transfers` with `is_supply_event = true`. This table derives each of those events once from the canonical transfer rows and verifies them against native TIP-20 `Mint` and `Burn` events. > [!WARNING] > > A mint or burn can therefore be a row in both `transfers` and `supply_changes`. Use `transfers` with `NOT is_supply_event` for peer-to-peer movement, and use `supply_changes` for issuance and redemption. Do not union or sum the two surfaces. ## Example query ```sql theme={null} -- Daily net issuance per asset SELECT block_date, token_symbol, SUM(CASE WHEN direction = 'increase' THEN amount ELSE 0 END) AS increased, SUM(CASE WHEN direction = 'decrease' THEN amount ELSE 0 END) AS decreased, SUM(CASE WHEN direction = 'increase' THEN amount ELSE -amount END) AS net_change, SUM(amount_usd) AS gross_flow_usd FROM rwa_multichain.supply_changes WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '2' MONTH) GROUP BY 1, 2 ORDER BY 1 DESC, 6 DESC NULLS LAST ``` **Largest single subscriptions and redemptions:** ```sql theme={null} SELECT block_time, blockchain, token_symbol, event_type, direction, from_address, to_address, amount, amount_usd, tx_id FROM rwa_multichain.supply_changes WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '1' MONTH) ORDER BY amount_usd DESC NULLS LAST LIMIT 25 ``` **Net flow by issuer:** ```sql theme={null} SELECT r.issuer_name, SUM(CASE WHEN s.direction = 'increase' THEN s.amount ELSE -s.amount END) AS net_units, SUM(CASE WHEN s.direction = 'increase' THEN s.amount_usd ELSE -s.amount_usd END) AS net_flow_usd FROM rwa_multichain.supply_changes AS s INNER JOIN rwa_multichain.tokens_reference_data AS r ON r.blockchain = s.blockchain AND r.token_id = s.token_id WHERE s.block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '3' MONTH) GROUP BY 1 ORDER BY 3 DESC NULLS LAST ``` # Real-World Assets (RWAs) Source: https://docs.dune.com/data-catalog/curated/rwa/overview Curated real-world asset datasets on Dune — tokenized treasuries, equities, and commodities, plus synthetic RWA perpetuals Real-world assets bring offchain value onchain: tokenized treasuries and money-market funds, tokenized equities, commodities, private credit, and real estate. Dune provides curated RWA data covering both halves of the market — **tokenized RWAs**, where the asset exists as a real token you can hold and transfer, and **synthetic RWA perpetuals** on Hyperliquid HIP-3 markets, where traders get exposure to a real-world asset without any token existing. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** hourly (activity) to daily (balances, NAV) · **Chains:** 24: Ethereum, Arbitrum, Arc, Avalanche, Base, BNB, Ink, Mantle, Monad, Morph, Optimism, Plasma, Plume, Polygon, Robinhood Chain, Sei, Tempo, X Layer, zkSync, plus Solana, Aptos, Sui, XRPL, and Stellar > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. > [card] [Explore on Dune](https://dune.com/data/rwa) > > Browse the RWA data page on dune.com, or the [RWA overview dashboard](https://dune.com/dune/rwa-overview) for AUM and issuer league tables. > [card] [Get This Data](https://dune.com/enterprise?dataset=rwa) > > Access RWA data via API, Datashare, or the Dune App. ## Available Data > [card] [Registry & Classification](/data-catalog/curated/rwa/registry/tokens) > > Which assets exist, on which chains, and the product behind each one — asset class, issuer, legal wrapper, and eligibility > [card] [Holders & Supply](/data-catalog/curated/rwa/holders-supply/balances) > > Daily holder balances, entity attribution, outstanding supply, and issuance flows > [card] [Valuation](/data-catalog/curated/rwa/valuation/prices) > > Token-unit USD prices, plus onchain NAV events and point-in-time windows > [card] [Activity & Trading](/data-catalog/curated/rwa/activity/transfers) > > Token transfers, secondary-market trades, and RWA perpetual futures activity > [card] [All Tables](/data-catalog/curated/rwa/all-tables-overview) > > Complete inventory of all RWA tables ## When to Use These Tables Use RWA tables when you need to: * Track AUM, supply, and holder growth for tokenized treasuries, funds, and equities * Measure issuer and platform market share across asset classes * Analyze holder concentration and entity composition, including CEX and protocol holdings * Value onchain positions using curated USD prices (NAV-backed where an oracle exists) * Monitor issuance and redemption flows against issuer-reported figures * Track secondary-market liquidity for RWAs on DEXs and RWA-native venues * Compare tokenized exposure against synthetic perpetual exposure for the same underlying * Segment products by legal wrapper, custodian, regulator, or investor eligibility ## Query Performance Activity tables (`transfers`, `trades`, `perp_trades`) are partitioned by `block_month`. Always filter on it, and add `blockchain` when you only need one chain — Robinhood Chain and Solana dominate row counts, so unfiltered scans are expensive. `balances` is a daily snapshot, so filter `day` to a single date unless you need a trend. ```sql theme={null} -- Good: partition-pruned and chain-scoped SELECT * FROM rwa_multichain.transfers WHERE block_month >= DATE_TRUNC('month', CURRENT_DATE) AND blockchain = 'ethereum' ``` ## Methodology **Tokenized RWAs** are built around `rwa_multichain.tokens`, the canonical identity registry of every tracked asset. `token_id` already stores each chain's native identifier as `VARCHAR`, including EVM-compatible contract addresses, Solana mint addresses, Aptos asset types, Sui coin types, and XRPL and Stellar asset ids. A single query therefore spans all 24 chains. Join `transfers`, `balances`, and `supply` on `(blockchain, token_id)`. [`tokens_reference_data`](/data-catalog/curated/rwa/registry/tokens-reference-data) attaches product classification and legal attributes to each registered token (join activity on `(blockchain, token_id)`, join [`balances_enriched`](/data-catalog/curated/rwa/holders-supply/balances-enriched) on `token_product_id`). [`product_reference_data`](/data-catalog/curated/rwa/registry/product-reference-data) publishes the same product fields at one row per `product_id`. Tempo is EVM-compatible, but its covered RWA tokens use the native TIP-20 standard and appear as `token_standard = 'tip20'`, not `erc20`. See the [token registry](/data-catalog/curated/rwa/registry/tokens) for the canonical deployments and [transfers](/data-catalog/curated/rwa/activity/transfers) for the supported reconstruction window. There is no `rwa_multichain.token_metadata` table. `trades` has no `token_id`; resolve the RWA leg with `rwa_side` plus `token_bought_address` / `token_sold_address`. **Valuation.** Use [`supply.supply_usd`](/data-catalog/curated/rwa/holders-supply/supply) and `balances.balance_usd` for USD totals. [`rwa_multichain.prices`](/data-catalog/curated/rwa/valuation/prices) is USD per on-chain token unit with `[valid_from, valid_to)` windows from onchain NAV and declared NAV feeds. You do not need to join `prices` to get AUM; a token can have `supply_usd` even when it has no covering `prices` row. [`nav`](/data-catalog/curated/rwa/valuation/nav) still records each onchain NAV update; [`nav_intervals`](/data-catalog/curated/rwa/valuation/nav-intervals) forward-fills those events. The `0x` + `to_hex(asset_address)` join against `token_address` is **EVM-only**. For Solana, Stellar, and XRPL, `asset_address` is UTF-8-encoded `token_id`, not an EVM address. **Synthetic RWA perpetuals** use a native perp schema — side, price, size, notional, funding, open interest — not a two-token swap schema. `rwa_hyperliquid.markets` is the registry of curated HIP-3 markets, `rwa_hyperliquid.perp_trades` holds taker-leg fills with per-fill trader leverage and margin mode, `perp_metrics_hourly` / `perp_metrics_daily` pre-aggregate volume, open interest, and funding, and `perp_positions_hourly` snapshots each account's open position at every hourly funding round. Perp fills keep the taker leg only, so volume matches Hyperliquid's own reported figures instead of double-counting both sides, and open interest is reported both-sides (longs plus shorts) to match the Hyperliquid UI. Metrics unique keys use `(block_month, block_hour|block_date, perp_dex, market_symbol)`, not `coin`. `perp_metrics_daily` is daily grain, hourly refresh. These five tables are the RWA-classified subset; the [Perpetuals Trading](/data-catalog/curated/perpetuals/overview) collection covers every Hyperliquid perp market, crypto included, plus per-account positions and account activity. Tokenized products and Hyperliquid markets share the same legal asset-class vocabulary: `credit`, `fixed_income`, `cash_equivalent`, `equities`, `multi_asset`, `commodities`, `real_estate`, `fx`, `other`. For tokenized products, `asset_class` and `asset_type` are canonical product fields: use them from `tokens_reference_data` at token grain or `product_reference_data` at product grain. Separately listed ETF, ETP, and fund shares are `equities`, regardless of their underlying exposure, while direct native products retain the underlying asset class. The two halves never share token identifiers: a perpetual has no token behind it, so it never joins to `rwa_multichain.tokens`. ## Example Queries **Largest tokenized assets by AUM and holder count:** ```sql theme={null} SELECT s.token_symbol, s.blockchain, h.holders, s.supply_usd AS aum_usd FROM rwa_multichain.supply AS s LEFT JOIN ( SELECT blockchain, token_id, COUNT(DISTINCT address) AS holders FROM rwa_multichain.balances WHERE day = CURRENT_DATE - INTERVAL '1' DAY AND balance > 0 GROUP BY 1, 2 ) AS h ON h.blockchain = s.blockchain AND h.token_id = s.token_id WHERE s.day = CURRENT_DATE - INTERVAL '1' DAY ORDER BY 4 DESC NULLS LAST LIMIT 25 ``` **AUM by token and issuer:** ```sql theme={null} SELECT s.day, s.token_symbol, r.issuer_name, SUM(s.supply_usd) AS aum_usd FROM rwa_multichain.supply AS s LEFT JOIN rwa_multichain.tokens_reference_data AS r ON r.blockchain = s.blockchain AND r.token_id = s.token_id WHERE s.day >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY 1, 2, 3 ORDER BY 1 DESC, 4 DESC ``` **Synthetic perp volume by asset class (do not sum open interest across days):** ```sql theme={null} SELECT asset_class, SUM(volume_usd) AS volume_usd, SUM(open_interest_usd) AS open_interest_usd FROM rwa_hyperliquid.perp_metrics_daily WHERE block_date = CURRENT_DATE - INTERVAL '1' DAY GROUP BY 1 ORDER BY 2 DESC ``` Summing `open_interest_usd` across markets on a single day is valid. Summing it across days is not: open interest is a stock, not a flow. ## Related Tables * `rwa_multichain.prices` — curated USD per token unit over validity windows. AUM is `supply.supply_usd` * `prices.day` / `prices.hour` — market prices for RWAs that also trade as ordinary crypto assets * `tokens.transfers` — all token transfers, unfiltered by RWA scope * `dex.trades` — full DEX trade coverage; `rwa_multichain.trades` is the RWA-scoped subset plus RWA-native venues > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom RWA datasets, additional chains, or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private RWA analytics pipelines with the dbt Connector. # rwa_hyperliquid.markets Source: https://docs.dune.com/data-catalog/curated/rwa/registry/hyperliquid-markets Registry of Hyperliquid HIP-3 builder-deployed perpetual markets that reference a real-world asset, classified by asset class and asset type. `rwa_hyperliquid.markets` is the dimension table for synthetic RWA exposure. Grain: one row per HIP-3 builder-deployed perpetual market that maps to a real-world asset, keyed on `(perp_dex, market_symbol)`. `token_address` is also unique and stores the numeric HIP-3 asset id as `VARCHAR`. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## RWA market scope This table contains HIP-3 markets classified as exposure to a real-world asset. Crypto perps, crypto-dominance indices, and compute-price indices are outside its scope, so no additional RWA filter is required. For every market on the venue, first-party and HIP-3 alike, use [`hyperliquid.perp_market_details`](/data-catalog/curated/perpetuals/hyperliquid/perp-market-details) in the [Perpetuals Trading](/data-catalog/curated/perpetuals/overview) collection. It is keyed on `coin` and carries no RWA filter. Classification is keyed per market rather than per ticker, because the same symbol behaves differently across builder DEXs — quote convention, contract scale, and spec all vary. `mkts:US500` is roughly one-tenth the contract size of `xyz:SP500`, so the two are separate rows with separate descriptions. ## Table schema | Column | Type | Description | | - | - | - | | `token_address` | `VARCHAR` | Integer HIP-3 asset id (`100000 + dex_index * 10000 + asset_index`) as `VARCHAR`. Exists for column parity with the tokenized RWA dimensions | | `token_standard` | `VARCHAR` | Always `hyperliquid_perp` | | `perp_dex` | `VARCHAR` | Builder DEX short code (`xyz`, `flx`, `vntl`, `km`, `cash`, `mkts`, and others) | | `coin` | `VARCHAR` | Full market id in `dex:SYMBOL` form, e.g. `xyz:TSLA` | | `market_symbol` | `VARCHAR` | Market ticker within the builder DEX | | `asset_id` | `INTEGER` | Numeric form of the HIP-3 asset id | | `symbol` | `VARCHAR` | Asset ticker | | `name` | `VARCHAR` | Asset name | | `asset_class` | `VARCHAR` | Shared RWA product taxonomy: `credit`, `fixed_income`, `cash_equivalent`, `equities`, `multi_asset`, `commodities`, `real_estate`, `fx`, `other` | | `asset_type` | `VARCHAR` | Finer classification within `asset_class`, e.g. `equities_synthetic`, `equities_index`, `metals`, `cash_fx` | | `description` | `VARCHAR` | Curated description of the underlying reference, including contract unit where the DEX spec states one (e.g. "1 troy ounce of gold") | | `underlying_ticker` | `VARCHAR` | Ticker of the referenced real-world instrument | | `issuer_id` | `VARCHAR` | Issuer identifier | | `issuer_name` | `VARCHAR` | Same as `builder_name`. Exists for column parity with the tokenized RWA dimensions | | `platform_id` | `VARCHAR` | Platform identifier | | `platform_name` | `VARCHAR` | Same as `builder_name` | | `builder_name` | `VARCHAR` | Builder DEX full name, e.g. XYZ, Ventuals, Felix Exchange. This is the name carried on the trades and metrics tables | | `deployer` | `VARCHAR` | Address that deployed the market | | `dex_index` | `INTEGER` | Index of the builder DEX | | `max_leverage` | `INTEGER` | Configured max leverage. Can change via growth mode. Hyperliquid's default when a trader never sets one is `min(20, max_leverage)` | | `margin_mode` | `VARCHAR` | Margin regime set by the deployer: `cross` (cross margin permitted, traders may still pick isolated), `noCross` (isolated only), `strictIsolated` (isolated only and position margin fixed after open). What traders actually chose per fill is [`rwa_hyperliquid.perp_trades.margin_mode`](/data-catalog/curated/rwa/activity/perp-trades) | | `only_isolated` | `BOOLEAN` | `true` when `margin_mode != 'cross'` | | `is_delisted` | `BOOLEAN` | `true` once the market has been delisted | | `last_updated` | `DATE` | Date a curated taxonomy field on the row last changed | | `_updated_at` | `TIMESTAMP` | Latest refresh timestamp | > [!NOTE] > > For HIP-3 perps the builder DEX operator is both the issuer and the platform of the synthetic contract, so `issuer_name`, `platform_name`, and `builder_name` all carry the same value. The three columns exist so this dimension lines up with the tokenized RWA dimensions. ## Asset class taxonomy HIP-3 markets use the product-metadata asset-class vocabulary so tokenized and synthetic exposure can be grouped without a separate mapping. Legacy perp-only classes such as `rates` and `private_funds` are not used. ## Example query ```sql theme={null} -- Market registry with asset classification, by builder DEX SELECT builder_name, asset_class, COUNT(*) AS markets, MAX(max_leverage) AS max_leverage FROM rwa_hyperliquid.markets WHERE NOT is_delisted GROUP BY 1, 2 ORDER BY 3 DESC ``` **Join to perp fills for asset-class attribution:** ```sql theme={null} SELECT m.asset_class, m.underlying_ticker, COUNT(*) AS fills, SUM(p.notional_usd) AS volume_usd FROM rwa_hyperliquid.perp_trades AS p INNER JOIN rwa_hyperliquid.markets AS m ON m.asset_id = p.asset_id WHERE p.block_date >= current_date - INTERVAL '7' day GROUP BY 1, 2 ORDER BY 4 DESC LIMIT 25 ``` # rwa_multichain.product_reference_data Source: https://docs.dune.com/data-catalog/curated/rwa/registry/product-reference-data Product-grain RWA catalog — legal wrapper, issuer, eligibility, and a deployments array of chain identities. `rwa_multichain.product_reference_data` is the product catalog behind tokenized RWAs. Grain: one row per `product_id`. `deployments` is an array of `(chain, token_address)` pairs from the product token registry — empty (never null) when the product has no registered on-chain identity yet. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. This is the inverse of [`tokens_reference_data`](/data-catalog/curated/rwa/registry/tokens-reference-data): that table is token grain with product fields attached; this table is product grain with chain deployments nested. Join the two on `product_id`. ## Table schema **Product identity** | Column | Type | Description | | - | - | - | | `product_id` | `VARCHAR` | Stable lowercase product identifier. Unique. Join key to `tokens_reference_data` | | `product_name` | `VARCHAR` | Official name as used by the issuer or platform | | `issuer_id` / `issuer_name` | `VARCHAR` | Legal issuing entity | | `platform_id` / `platform_name` | `VARCHAR` | Tokenization or distribution platform | | `deployments` | `ARRAY(ROW("chain" VARCHAR, "token_address" VARCHAR))` | `(chain, token_address)` pairs. Empty array when none are registered | **Asset classification** | Column | Type | Description | | - | - | - | | `asset_class` | `VARCHAR` | Broad asset or economic-exposure category. Same vocabulary as Hyperliquid markets; see classification caveats below | | `asset_type` | `VARCHAR` | More specific exposure or product subtype within the classification vocabulary | | `underlying_asset` | `VARCHAR` | What backs the token | | `underlying_ticker` / `underlying_exchange` | `VARCHAR` | Independent market ticker and venue | | `denomination_currency` | `VARCHAR` | ISO 4217 currency of account, not the investment currency | **Mechanics and legal structure** | Column | Type | Description | | - | - | - | | `transfer_restriction` | `VARCHAR` | `NONE`, `ALLOWLIST`, `PLATFORM_INTERNAL`, `NON_TRANSFERABLE` | | `acquisition_access` | `VARCHAR` | `PERMISSIONLESS`, `KYC_ONBOARDING`, `PLATFORM_ACCOUNT_ONLY` | | `transfer_model` | `VARCHAR` | Free-text detail behind the two columns above | | `product_status` | `VARCHAR` | Lifecycle state | | `issuance_date` | `VARCHAR` | Product issuance date where known | | `jurisdiction_country` / `jurisdiction_iso2` | `VARCHAR` | Domicile of the issuing legal entity | | `legal_wrapper_type` | `VARCHAR` | Legal form through which holders obtain exposure | | `asset_manager_entity` | `VARCHAR` | Portfolio manager when distinct from the issuer | | `custodian_entity` | `VARCHAR` | Institution holding the underlying | | `transfer_agent_entity` | `VARCHAR` | Appointed transfer agent for this product | | `regulatory_framework` / `regulator` | `VARCHAR` | Offering regime and supervising authority | | `issuer_entity` / `issuer_lei` / `issuer_cik` | `VARCHAR` | Exact legal registrant and identifiers | | `eligible_investors` | `VARCHAR` | Investor class permitted to hold the product | | `redemption_mechanism` | `VARCHAR` | `INSTANT_ONCHAIN`, `T_PLUS_N_OFFCHAIN`, `SECONDARY_MARKET_ONLY` | | `last_updated` | `DATE` | Date another cell on this row last changed | ### Blank versus NOT_APPLICABLE * **Blank** means the value is unknown or not yet verified. * **`NOT_APPLICABLE`** means the field has been shown not to apply — a basket product has no single `underlying_ticker`, a non-SEC issuer has no `issuer_cik`. No other placeholder appears. `WHERE custodian_entity NOT IN ('', 'NOT_APPLICABLE')` gives products with a known custodian; `WHERE custodian_entity = 'NOT_APPLICABLE'` gives products for which custody does not apply. ### asset_class values Shared with [`rwa_hyperliquid.markets`](/data-catalog/curated/rwa/registry/hyperliquid-markets): | Value | Meaning | | - | - | | `credit` | Credit-sector debt: corporates, agencies, securitizations, private lending | | `fixed_income` | Sovereign debt whose stated maturity exceeds one year | | `cash_equivalent` | Debt maturing in one year or less, including T-bills and money-market instruments | | `equities` | Public or private company shares and equity funds; some ETF records also use this class for the listed instrument | | `multi_asset` | Allocation spanning more than one asset class | | `commodities` | Physical or commodity-linked goods | | `real_estate` | Property or property-backed interests | | `fx` | Currency exposure itself, not the currency a product is priced in | | `other` | Exposure that does not fit the preceding classes | These fields describe asset categories and more specific exposure or product subtypes. They can look through a fund or token wrapper to the economic exposure: the iShares Gold Trust products `iau_d`, `iauon`, and `wtiau` are `commodities` / `metals`. An ETF wrapper alone does not imply `equities` / `equities_exchange_traded_funds`. Use `legal_wrapper_type` for the product's legal or structural wrapper. Classification is not yet consistent across all products. For example, `gldx` uses `commodities` / `metals`, while `gldon` uses `equities` / `equities_exchange_traded_funds`, although both reference `GLD`. Some bond ETFs, including `tlton` and `sgovon`, also retain the instrument-based equity/ETF classification. For exposure analysis across products, check `underlying_asset` and `underlying_ticker` alongside these fields; do not assume a uniform look-through classification. For debt classified by exposure, `cash_equivalent` is a maturity test, not a credit-quality test. A 20-year Treasury is `fixed_income`. `fx` is the currency pair or index; denomination is `denomination_currency`. ### Selected asset_type values `asset_type` is validated independently of `asset_class`. Common pairings: | Parent class | Values | | - | - | | `credit` | `corporate_bonds_high_yield`, `corporate_bonds_investment_grade`, `credit_fund`, `private_credit`, `private_credit_fund`, `private_credit_senior_secured_loans`, `securitized_products` | | `equities` | `equities_cash`, `equities_exchange_traded_funds`, `equities_fund`, `equities_index`, `equities_index_fund`, `equities_preferred`, `equities_synthetic`, `private_equity`, `venture_capital_fund_interest` | | `commodities` | `agriculture`, `carbon_credits`, `energy`, `gemstones`, `metals` | | `cash_equivalent` | `government_debt_us`, `government_debt_non_us`, `money_market_fund` | | `fixed_income` | `government_debt_us`, `government_debt_non_us`, `fixed_income_diversified` | | `real_estate` | `residential_real_estate` | | `fx` | `cash_fx` | | `other` | `crypto_hedge_fund`, `fine_art`, `hedge_fund`, `insurance_linked_securities` | `energy` and `fixed_income_diversified` can appear under more than one parent. Filter on the pair when that matters. ### legal_wrapper_type values `DIRECT_TOKENIZED_EQUITY`, `LEDGER_BASED_SECURITY`, `SPECIAL_PURPOSE_VEHICLE`, `REGISTERED_FUND`, `UNREGISTERED_FUND`, `ETF_PASSTHROUGH_WRAPPER`, `STRUCTURED_NOTE`, `STRUCTURED_CREDIT_TRANCHE`, `DERIVATIVE_CONTRACT`, `CUSTODIAL_RECEIPT`, `WRAPPED_RWA_TOKEN`, `DEFI_VAULT_SHARE`, `OTHER`. ### eligible_investors values `UNRESTRICTED`, `US_RETAIL`, `US_ACCREDITED`, `US_QUALIFIED_PURCHASER`, `PROFESSIONAL_QUALIFIED`, `NON_US_PERSON`, `INSTITUTIONAL_ONLY`. `PROFESSIONAL_QUALIFIED` is jurisdiction-neutral (MiFID II, Swiss CISA, UK FCA, and similar tests). Which regime supplies the test is a `regulatory_framework` fact. ## Issuer, platform, and asset manager * `issuer_name` identifies the legal entity that issues this tokenized product. Do not substitute the manager, platform, sponsor, or issuer of an instrument the product wraps. Group by this field for issuer rankings, not automatically for asset-manager rankings. * `platform_name` identifies the tokenization or distribution platform. For example, `tlton` has issuer `Ondo Global Markets (BVI) Limited` and platform `Ondo Global Markets`; its underlying ticker is `TLT`. * `asset_manager_entity` identifies the entity managing the underlying portfolio when distinct from the issuer. Use the populated manager field for manager attribution; a blank value is unknown, and `NOT_APPLICABLE` denotes a self-managed or passive receipt structure. ## Example queries **Issuer league table for tokenized money market funds:** ```sql theme={null} SELECT p.issuer_name, p.platform_name, p.custodian_entity, COUNT(DISTINCT p.product_id) AS products, SUM(s.supply_usd) AS aum_usd FROM rwa_multichain.supply AS s INNER JOIN rwa_multichain.tokens_reference_data AS r ON r.blockchain = s.blockchain AND r.token_id = s.token_id INNER JOIN rwa_multichain.product_reference_data AS p ON p.product_id = r.product_id WHERE s.day = CURRENT_DATE - INTERVAL '1' DAY AND p.asset_type = 'money_market_fund' GROUP BY 1, 2, 3 ORDER BY 5 DESC NULLS LAST LIMIT 25 ``` Products explicitly classified as `US_RETAIL`, by legal wrapper (excludes the separate `UNRESTRICTED` category): ```sql theme={null} SELECT legal_wrapper_type, regulator, jurisdiction_iso2, COUNT(*) AS products FROM rwa_multichain.product_reference_data WHERE eligible_investors = 'US_RETAIL' AND legal_wrapper_type <> '' GROUP BY 1, 2, 3 ORDER BY 4 DESC ``` # rwa_multichain.tokens Source: https://docs.dune.com/data-catalog/curated/rwa/registry/tokens Canonical registry of tokenized real-world assets across 24 chains, with a normalized token_id for cross-chain joins. `rwa_multichain.tokens` is the identity table for every tokenized RWA Dune tracks. Grain: one row per token per chain, keyed on `(blockchain, token_standard, token_id)`. Native identifiers are already stored in `token_id`; there are no separate `contract_address` / `token_mint_address` columns on this view. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Why token_id exists Each chain identifies a token differently: EVM-compatible chains use a contract address, Solana a mint address, Aptos an asset type, Sui a coin type, and XRPL and Stellar their own asset identifiers. This table normalizes all of those into a single `VARCHAR` `token_id`. Join on `(blockchain, token_id)` and one query works across all 24 chains. That key resolves every row in `balances`, `transfers`, and `supply`. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain for the native token identifier | | `token_standard` | `VARCHAR` | Native token standard or asset namespace. One of `erc20`, `tip20`, `spl`, `aptos_asset`, `sui_coin`, `xrpl_asset`, `stellar_asset` | | `token_id` | `VARCHAR` | Normalized token identifier for cross-chain joins. Use this as the join key | | `currency` | `VARCHAR` | Native currency code from the canonical token-list model | | `balance_semantics` | `VARCHAR` | Balance behavior for the token: `standard` or `indexed` | > [!NOTE] > > `token_standard` here uses coarse namespaces. The `transfers` table uses finer-grained values (`bep20`, `tip20`, `spl_token`, `spl_token_2022`, `classic`, `soroban`, `issued`), so do not join the two tables on `token_standard`. Use `(blockchain, token_id)`. `balance_semantics = 'indexed'` means the holder balance can change without a normal transfer. Those tokens stay in [`tokens`](/data-catalog/curated/rwa/registry/tokens) and [`transfers`](/data-catalog/curated/rwa/activity/transfers). [`balances`](/data-catalog/curated/rwa/holders-supply/balances) includes them only for Backed/xStocks share multipliers and the Ethereum STBT share index (`0x530824da86689c9c17cdc2871ff29b058345b44a`). Other indexed tokens have no holder rows. ## Tempo coverage Tempo is EVM-compatible, but its tokens use TIP-20. Tempo rows therefore use `token_standard = 'tip20'` and must not be interpreted as ERC-20 deployments. The canonical Tempo RWA deployments in this registry are: * BUIDL: `0xb5ff12bd8010baef823d1bfa2ce6bdc0109cbb24` * BRSRV: `0xe36e2e79beb1b7f618201eead6106a7d737695e3` * syrupUSDC: `0x20c0000000000000000000008191667423f70e67` BRSRV is canonical and remains in the registry even when no supply is outstanding. Two other Tempo deployments are intentionally excluded from RWA coverage. sUSDe (`0x20c000000000000000000000bd95bfb69fbe6ce3`) is excluded because it is classified as a stablecoin and yield-bearing asset; this does not imply that sUSDe is absent from RWA coverage on other chains. The non-canonical syrupUSDC deployment (`0x20c000000000000000000000c4ba4256aa07ce38`) is also excluded. It recorded five historical transfers from 2026-04-28 through 2026-05-01. ## Asset class and issuer This table is an identity registry, not a classification table. It does not carry product classification or issuer details. Join [`tokens_reference_data`](/data-catalog/curated/rwa/registry/tokens-reference-data) on `(blockchain, token_id)` for the issuer and attached product fields, including `asset_class` and `asset_type`. Use [`product_reference_data`](/data-catalog/curated/rwa/registry/product-reference-data) when you need one row per product instead of one row per token. ## Example query ```sql theme={null} -- Token coverage by chain and standard SELECT blockchain, token_standard, COUNT(DISTINCT token_id) AS tokens FROM rwa_multichain.tokens GROUP BY 1, 2 ORDER BY 3 DESC ``` **Resolve holder balances to the registry:** ```sql theme={null} SELECT t.blockchain, t.token_standard, b.token_symbol, COUNT(DISTINCT b.address) AS holders FROM rwa_multichain.balances AS b INNER JOIN rwa_multichain.tokens AS t ON t.blockchain = b.blockchain AND t.token_id = b.token_id WHERE b.day = CURRENT_DATE - INTERVAL '1' DAY AND b.balance > 0 GROUP BY 1, 2, 3 ORDER BY 4 DESC LIMIT 50 ``` # rwa_multichain.tokens_reference_data Source: https://docs.dune.com/data-catalog/curated/rwa/registry/tokens-reference-data Token-grain RWA reference data — token identity with attached product classification, legal, and operational metadata. `rwa_multichain.tokens_reference_data` is the reference table for every token in [`rwa_multichain.tokens`](/data-catalog/curated/rwa/registry/tokens). Grain: one row per token per chain, keyed on `(blockchain, token_standard, token_id)`. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Why it is separate from `tokens` `tokens` answers "does this token exist and what is its identifier". `tokens_reference_data` adds the issuer label, balance behavior, and every public field from `product_reference_data`. Tokens without an associated product remain available with `product_id` and the attached product fields null. A product and a token are not the same thing. One product — say Franklin Templeton's BENJI fund — has a row per chain it is deployed on, and the product-level columns repeat identically across those rows. Deduplicate on `product_id` when you are counting products rather than deployments. For the product catalog itself, use [`product_reference_data`](/data-catalog/curated/rwa/registry/product-reference-data). ## Join keys | Join to | Key | Notes | | - | - | - | | `tokens`, `transfers`, `balances`, `supply`, `prices` | `(blockchain, token_id)` | Default activity join | | `balances_enriched` | `token_product_id` | `concat(blockchain, '\|', token_standard, '\|', token_id)` | | `product_reference_data` | `product_id` | Use when you need one row per product instead of one row per token | Do **not** join `balances_enriched` on `product_id`. One product has many chain tokens, so that join fans out. ## Product classification `asset_class` and `asset_type` are the canonical product classification fields. They are sourced from [`product_reference_data`](/data-catalog/curated/rwa/registry/product-reference-data) and mirrored here for token-grain queries. Tokens with a null `product_id` have null product fields. `issuer` is the token-list label. `issuer_name` is the legal issuer from product metadata. They are not interchangeable. ## Table schema **Token identity** | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain the token instance lives on | | `token_standard` | `VARCHAR` | `erc20`, `tip20`, `spl`, `aptos_asset`, `sui_coin`, `xrpl_asset`, `stellar_asset` | | `token_id` | `VARCHAR` | Normalized token identifier. Join key to `tokens`, `balances`, `transfers`, and `supply` | | `token_product_id` | `VARCHAR` | `blockchain\|token_standard\|token_id`. Join key to `balances_enriched` | | `symbol` | `VARCHAR` | Display symbol | | `asset` | `VARCHAR` | Human-readable asset name | | `issuer` | `VARCHAR` | Token-list issuer label. For XRPL this is `asset_issuer`, not the on-chain account | | `balance_semantics` | `VARCHAR` | Balance behavior: `standard` or `indexed`. Populated for EVM tokens | **Product attach** (null when `product_id` is null) | Column | Type | Description | | - | - | - | | `product_id` | `VARCHAR` | Registry product identifier | | `product_name` | `VARCHAR` | Legal/product name | | `issuer_id` / `issuer_name` | `VARCHAR` | Legal issuing entity | | `platform_id` / `platform_name` | `VARCHAR` | Tokenization or distribution platform | | `asset_class` | `VARCHAR` | Canonical product asset class | | `asset_type` | `VARCHAR` | Canonical product subtype | | `underlying_asset` | `VARCHAR` | What backs the token | | `underlying_ticker` / `underlying_exchange` | `VARCHAR` | Independent market ticker and venue | | `iex_blocked` | `BOOLEAN` | Whether IEX pricing is disabled while the product needs human review | | `denomination_currency` | `VARCHAR` | ISO 4217 currency of account | | `transfer_restriction` | `VARCHAR` | `NONE`, `ALLOWLIST`, `PLATFORM_INTERNAL`, `NON_TRANSFERABLE` | | `acquisition_access` | `VARCHAR` | `PERMISSIONLESS`, `KYC_ONBOARDING`, `PLATFORM_ACCOUNT_ONLY` | | `transfer_model` | `VARCHAR` | Free-text detail behind the two columns above | | `product_status` | `VARCHAR` | Lifecycle state | | `issuance_date` | `VARCHAR` | Product issuance date where known | | `jurisdiction_country` / `jurisdiction_iso2` | `VARCHAR` | Domicile of the issuing legal entity | | `legal_wrapper_type` | `VARCHAR` | Legal form of the wrapper | | `asset_manager_entity` | `VARCHAR` | Portfolio manager when distinct from the issuer | | `custodian_entity` | `VARCHAR` | Institution holding the underlying | | `transfer_agent_entity` | `VARCHAR` | Appointed transfer agent | | `regulatory_framework` / `regulator` | `VARCHAR` | Offering regime and supervising authority | | `issuer_entity` / `issuer_lei` / `issuer_cik` | `VARCHAR` | Exact legal registrant and identifiers | | `eligible_investors` | `VARCHAR` | Investor class permitted to hold the product | | `redemption_mechanism` | `VARCHAR` | `INSTANT_ONCHAIN`, `T_PLUS_N_OFFCHAIN`, `SECONDARY_MARKET_ONLY` | | `last_updated` | `DATE` | Date another cell on the product row last changed | | `deployments` | `ARRAY(ROW("chain" VARCHAR, "token_address" VARCHAR))` | All registered chain deployments for the attached product | ## Do not join on symbol Token symbols are not a safe product key. The same product carries different tickers across access channels, unrelated products share tickers, and scam tokens squat real tickers on other chains. Join on `(blockchain, token_id)` or `token_product_id`, never on `symbol` or `underlying_ticker`. ## Example queries **AUM, holders, and product count by legal asset class:** ```sql theme={null} SELECT r.asset_class, COUNT(DISTINCT r.product_id) AS products, COUNT(DISTINCT b.address) AS holders, SUM(b.balance_usd) AS aum_usd FROM rwa_multichain.balances AS b INNER JOIN rwa_multichain.tokens_reference_data AS r ON r.blockchain = b.blockchain AND r.token_id = b.token_id WHERE b.day = CURRENT_DATE - INTERVAL '1' DAY AND b.balance > 0 GROUP BY 1 ORDER BY 4 DESC NULLS LAST ``` **Join enriched balances on `token_product_id`:** ```sql theme={null} SELECT r.product_name, r.issuer_name, e.address_category, SUM(e.balance_usd) AS balance_usd FROM rwa_multichain.balances_enriched AS e INNER JOIN rwa_multichain.tokens_reference_data AS r ON r.token_product_id = e.token_product_id WHERE e.day = CURRENT_DATE - INTERVAL '1' DAY AND e.balance > 0 GROUP BY 1, 2, 3 ORDER BY 4 DESC NULLS LAST LIMIT 50 ``` # rwa_multichain.nav Source: https://docs.dune.com/data-catalog/curated/rwa/valuation/nav Verified onchain value update events for tokenized real-world assets, retaining NAV, price meaning, and unit basis. `rwa_multichain.nav` records verified onchain value updates for tokenized RWAs. Grain: one row per update event, keyed on `unique_key`. Use it to inspect publication history and source semantics. For cross-chain AUM and point-in-time valuation, start with [`rwa_multichain.prices`](/data-catalog/curated/rwa/valuation/prices). > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Why NAV rather than market price A tokenized money-market fund does not have a meaningful market price — it has a net asset value published by its issuer or an oracle. Most tokenized RWAs either barely trade onchain or trade at a price pinned to NAV. This table reads NAV directly from the verified onchain source contract for each asset, so USD valuations do not depend on there being a liquid market. For assets that also trade as ordinary crypto tokens, `prices.day` and `prices.hour` remain the right source for market price. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain where the NAV update was published | | `chain_id` | `BIGINT` | Numeric chain identifier | | `asset_address` | `VARBINARY` | Legacy binary asset identifier. EVM is native bytes; Solana, Stellar, and XRPL encode `token_id` as UTF-8; Sui stores package bytes | | `oracle_address` | `VARBINARY` | Native oracle/source identifier bytes | | `usd_nav_price` | `DOUBLE` | Backward-compatible USD value column | | `usd_price` | `DOUBLE` | Generic USD value without implying accounting NAV | | `value_kind` | `VARCHAR` | Financial meaning: `accounting_nav`, `redemption_rate`, `tracker_price`, `commodity_reference`, or `par_value` | | `price_basis` | `VARCHAR` | Quantity unit priced: `token_unit`, `display_unit`, `share_unit`, or `reference_unit` | | `nav_raw` | `UINT256` | Raw NAV value as emitted onchain | | `nav_decimals` | `INTEGER` | Decimal precision of `nav_raw` | | `quote_currency` | `VARCHAR` | Currency the source published in. Mostly `USD`; also `EUR`, `GBP`, `CHF`, `CNY`, `HKD` | | `issuer` | `VARCHAR` | Issuer of the asset | | `symbol` | `VARCHAR` | Asset ticker | | `block_time` | `TIMESTAMP WITH TIME ZONE` | When the update was published onchain | | `block_date` | `DATE` | Date of the update | | `block_month` | `DATE` | Partition column | | `block_number` | `BIGINT` | Block height | | `tx_hash` | `VARBINARY` | Transaction that published the update | | `evt_index` | `BIGINT` | Event position within the transaction | | `trace_address` | `ARRAY(BIGINT)` | Trace position, for NAV read from a call rather than an event | | `effective_at` | `TIMESTAMP WITH TIME ZONE` | When the NAV takes effect. May differ from `block_time` when a source publishes a value dated to an earlier valuation point | | `unique_key` | `VARCHAR` | Row identifier | | `_updated_at` | `TIMESTAMP WITH TIME ZONE` | When this row was last refreshed | > [!NOTE] > > Use `usd_price` with `value_kind` and `price_basis`. `usd_nav_price` remains for backward compatibility, but not every source is an accounting NAV. `quote_currency` records the source quote; `usd_price` is normalized to USD. ## Use nav_intervals for point-in-time joins Because this table holds discrete events, valuing a balance or transfer from it means finding the most recent update at or before a given timestamp — a correlated subquery or a window function. [`nav_intervals`](/data-catalog/curated/rwa/valuation/nav-intervals) precomputes exactly that as `valid_from` / `valid_to` ranges for source-level NAV analysis. Prefer [`prices`](/data-catalog/curated/rwa/valuation/prices) for cross-chain activity joins; use `nav` when you want the update events themselves, for example to measure publication frequency or detect a stale feed. ## Address representation differs by chain The common EVM join converts native bytes to lowercase 0x hex: ```sql theme={null} '0x' || lower(to_hex(n.asset_address)) = b.token_address ``` That expression is **EVM-only**. Solana, Stellar, and XRPL store textual `token_id` as UTF-8 bytes, so use `from_utf8(asset_address)`. Sui stores native package bytes. Use [`prices`](/data-catalog/curated/rwa/valuation/prices) whenever you need one cross-chain join on `(blockchain, token_id)`. ## Example query ```sql theme={null} -- Latest NAV per asset, with publication recency SELECT blockchain, symbol, issuer, quote_currency, usd_price, value_kind, price_basis, block_time AS last_update FROM ( SELECT *, ROW_NUMBER() OVER (PARTITION BY blockchain, asset_address ORDER BY effective_at DESC) AS rn FROM rwa_multichain.nav WHERE block_date >= current_date - INTERVAL '30' day ) WHERE rn = 1 ORDER BY last_update DESC ``` **Find feeds that have gone stale:** ```sql theme={null} SELECT blockchain, symbol, issuer, MAX(effective_at) AS last_nav, date_diff('day', MAX(effective_at), now()) AS days_stale FROM rwa_multichain.nav GROUP BY 1, 2, 3 HAVING date_diff('day', MAX(effective_at), now()) > 7 ORDER BY 5 DESC ``` # rwa_multichain.nav_intervals Source: https://docs.dune.com/data-catalog/curated/rwa/valuation/nav-intervals Validity windows derived from RWA value events, retaining price meaning and unit basis for point-in-time analysis. `rwa_multichain.nav_intervals` turns the discrete value events in [`nav`](/data-catalog/curated/rwa/valuation/nav) into validity windows. Grain: one row per value per asset with a `valid_from` / `valid_to` range, keyed on `unique_key`. Use it for source-level NAV analysis. For cross-chain token-unit valuation, prefer [`rwa_multichain.prices`](/data-catalog/curated/rwa/valuation/prices). > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Why it exists NAV is published irregularly — daily for some issuers, weekly or on demand for others. Valuing a transfer that happened between two publications means finding the most recent NAV at or before that timestamp. Doing that inline is a correlated subquery or a window function over the full NAV history, repeated for every join. This table forward-fills instead: each NAV value carries the window over which it was the prevailing value, so a point-in-time join becomes a plain range predicate. The most recent value per asset has `valid_to IS NULL`, meaning it is still in force. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain where the NAV was published | | `chain_id` | `BIGINT` | Numeric chain identifier | | `asset_address` | `VARBINARY` | Legacy binary asset identifier. Representation differs by chain | | `oracle_address` | `VARBINARY` | Native oracle/source identifier bytes | | `usd_nav_price` | `DOUBLE` | Backward-compatible USD value column | | `usd_price` | `DOUBLE` | Generic USD value without implying accounting NAV | | `value_kind` | `VARCHAR` | `accounting_nav`, `redemption_rate`, `tracker_price`, `commodity_reference`, or `par_value` | | `price_basis` | `VARCHAR` | `token_unit`, `display_unit`, `share_unit`, or `reference_unit` | | `nav_raw` | `UINT256` | Raw NAV value as emitted onchain | | `nav_decimals` | `INTEGER` | Decimal precision of `nav_raw` | | `quote_currency` | `VARCHAR` | Currency the source published in | | `issuer` | `VARCHAR` | Issuer of the asset | | `symbol` | `VARCHAR` | Asset ticker | | `valid_from` | `TIMESTAMP WITH TIME ZONE` | Start of the window, inclusive | | `valid_to` | `TIMESTAMP WITH TIME ZONE` | End of the window, exclusive. `NULL` for the open-ended interval | | `block_time` | `TIMESTAMP WITH TIME ZONE` | When the underlying update was published onchain | | `block_number` | `BIGINT` | Block height of the underlying update | | `tx_hash` | `VARBINARY` | Transaction that published the update | | `evt_index` | `BIGINT` | Event position within the transaction | | `trace_address` | `ARRAY(BIGINT)` | Trace position, where NAV was read from a call | | `unique_key` | `VARCHAR` | Row identifier | | `_updated_at` | `TIMESTAMP WITH TIME ZONE` | When this row was last refreshed | ## The EVM point-in-time join pattern Two things to get right: the half-open range predicate, and the EVM `VARBINARY`-to-hex address conversion. ```sql theme={null} -- Value each transfer at the NAV in force when it happened SELECT t.block_time, t.token_symbol, n.issuer, t.amount, n.usd_price, n.value_kind, t.amount * n.usd_price AS amount_usd_at_nav FROM rwa_multichain.transfers AS t INNER JOIN rwa_multichain.nav_intervals AS n ON n.blockchain = t.blockchain AND '0x' || lower(to_hex(n.asset_address)) = t.token_address AND t.block_time >= n.valid_from AND (n.valid_to IS NULL OR t.block_time < n.valid_to) WHERE t.block_date >= current_date - INTERVAL '7' day AND t.blockchain = 'ethereum' ORDER BY t.block_time DESC LIMIT 100 ``` `valid_to IS NULL` must be handled explicitly. Without it, every row priced by the open-ended NAV interval drops out of the result, which silently biases any total toward historical activity. The `0x` + `to_hex(asset_address)` expression is EVM-only. Solana, Stellar, and XRPL textual ids use `from_utf8(asset_address)`; Sui stores package bytes. For daily cross-chain data, use `prices`, or compare on dates with a chain-correct identifier: ```sql theme={null} AND b.day >= date(n.valid_from) AND (n.valid_to IS NULL OR b.day < date(n.valid_to)) ``` > [!NOTE] > > `balances.balance_usd` already uses curated RWA prices. Join this table when you need source-level NAV semantics or a different valuation timestamp. # rwa_multichain.prices Source: https://docs.dune.com/data-catalog/curated/rwa/valuation/prices Canonical RWA prices normalized to USD per on-chain token unit, with validity windows and source-mechanism metadata. `rwa_multichain.prices` is the cross-chain valuation surface for tokenized RWAs. Grain: one row per `(blockchain, token_id, valid_from)`, with non-overlapping `[valid_from, valid_to)` windows. Rows come from onchain NAV and declared NAV feeds. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. Unlike `nav_intervals`, this view exposes a normalized textual `token_id` and prices whose basis is one on-chain token unit. It standardizes chain-specific address representation and unit conversions. USD totals already live on [`supply.supply_usd`](/data-catalog/curated/rwa/holders-supply/supply) and `balances.balance_usd`; you do not need to join this table to compute AUM. A token can have `supply_usd` or `balance_usd` even when it has no covering row here. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain for the token deployment | | `token_standard` | `VARCHAR` | Native token standard or asset namespace, including `tip20` for Tempo | | `token_id` | `VARCHAR` | Normalized textual token identifier. Join key to `tokens`, `balances`, `transfers`, and `supply` | | `asset_address` | `VARBINARY` | Binary asset identifier from the NAV tables | | `price_usd` | `DOUBLE` | USD price per normalized on-chain token unit | | `value_kind` | `VARCHAR` | `accounting_nav`, `redemption_rate`, `tracker_price`, `commodity_reference`, or `par_value` | | `valid_from` | `TIMESTAMP WITH TIME ZONE` | Inclusive start of the price window | | `valid_to` | `TIMESTAMP WITH TIME ZONE` | Exclusive end. `NULL` only for an open interval | | `oracle_address` | `VARBINARY` | Native source identifier bytes | | `source_kind` | `VARCHAR` | Source mechanism from the verified oracle registry | | `source_table` | `VARCHAR` | Source dataset providing the value | | `_updated_at` | `TIMESTAMP WITH TIME ZONE` | Latest refresh timestamp | ## Point-in-time join ```sql theme={null} SELECT b.day, b.blockchain, b.token_symbol, p.value_kind, SUM(b.balance * p.price_usd) AS nav_usd FROM rwa_multichain.balances AS b LEFT JOIN rwa_multichain.prices AS p ON p.blockchain = b.blockchain AND p.token_id = b.token_id AND CAST(b.day AS TIMESTAMP) >= p.valid_from AND (p.valid_to IS NULL OR CAST(b.day AS TIMESTAMP) < p.valid_to) WHERE b.day = CURRENT_DATE - INTERVAL '1' DAY AND b.balance > 0 GROUP BY 1, 2, 3, 4 ORDER BY 5 DESC NULLS LAST ``` Use a `LEFT JOIN` to retain all balance rows while attaching the price in force for each snapshot. Prefer `balance_usd` or `supply.supply_usd` when you want the USD value already stored on those tables. ## value_kind matters All values are USD per token unit, but they do not all mean accounting NAV: | Value | Meaning | | - | - | | `accounting_nav` | Issuer or fund accounting net asset value | | `redemption_rate` | Units or value redeemable per token | | `tracker_price` | Value published by a tracker or oracle | | `commodity_reference` | Commodity reference price | | `par_value` | Declared or contractual par value | Keep `value_kind` in reconciliations and methodology notes. It tells downstream users what financial claim the USD number represents. ## Tempo price coverage Tempo prices are identifier-exact for the three canonical TIP-20 deployments: * BUIDL (`0xb5ff12bd8010baef823d1bfa2ce6bdc0109cbb24`) uses the issuer-supported Ethereum RedStone publication. * BRSRV (`0xe36e2e79beb1b7f618201eead6106a7d737695e3`) uses the issuer-supported Ethereum RedStone publication. * syrupUSDC (`0x20c0000000000000000000008191667423f70e67`) uses the canonical Ethereum pool's `convertToAssets` series. `prices` exposes the source mechanism through `oracle_address`, `source_kind`, and `source_table`. Ethereum block and transaction provenance is retained on `rwa_multichain.nav` and `rwa_multichain.nav_intervals`, not directly on `prices`. The mapping applies only to the listed identifiers, not to similarly named or non-canonical Tempo deployments. # rwa_multichain.unit_conversions Source: https://docs.dune.com/data-catalog/curated/rwa/valuation/unit-conversions Time-versioned multipliers between token, display, and share units for RWA assets on Solana Token-2022. `rwa_multichain.unit_conversions` records time-versioned conversion multipliers between token, display, and share units. Grain: one row per chain-native conversion update, keyed on `(blockchain, unique_key)`. The shared multichain contract contains Solana Token-2022 rows. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. Use this table when the amount shown to a user differs from the raw token-unit balance. Solana rows use Token-2022 `ScaledUiAmountConfig`. Other rows use synthetic-share indexes, share-to-token conversions, and interest accrual. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain for the conversion | | `token_standard` | `VARCHAR` | Native token standard | | `token_id` | `VARCHAR` | Normalized textual token identifier | | `mechanism` | `VARCHAR` | `scaled_ui`, `synthetic_shares`, `share_conversion`, or `interest_accrual` | | `source_basis` | `VARCHAR` | `token_unit`, `display_unit`, or `share_unit` | | `target_basis` | `VARCHAR` | `token_unit`, `display_unit`, or `share_unit` | | `multiplier` | `DOUBLE` | Multiply the source quantity by this value to reach the target basis | | `multiplier_raw` | `VARCHAR` | Source-native multiplier representation | | `multiplier_decimals` | `INTEGER` | Decimal precision of `multiplier_raw`, where applicable | | `valid_from` | `TIMESTAMP WITH TIME ZONE` | Inclusive start of the conversion interval | | `valid_to` | `TIMESTAMP WITH TIME ZONE` | Exclusive end. `NULL` for the active value | | `observed_at` | `TIMESTAMP WITH TIME ZONE` | When Dune observed the source update | | `source_kind` | `VARCHAR` | Source mechanism | | `source_address` | `VARCHAR` | Contract, program, mint, or account that published the update | | `source_block_number` | `BIGINT` | Source block or slot | | `source_tx_id` | `VARCHAR` | Source transaction identifier | | `source_event_index` | `BIGINT` | Event or instruction position | | `authority` | `VARCHAR` | Account authorized to update the conversion | | `unique_key` | `VARCHAR` | Chain-native row identifier | | `_updated_at` | `TIMESTAMP WITH TIME ZONE` | Latest refresh timestamp | ## As-of conversion ```sql theme={null} SELECT b.day, b.token_symbol, b.balance AS token_units, b.balance * c.multiplier AS display_units FROM rwa_multichain.balances AS b INNER JOIN rwa_multichain.unit_conversions AS c ON c.blockchain = b.blockchain AND c.token_id = b.token_id AND CAST(b.day AS TIMESTAMP) >= c.valid_from AND (c.valid_to IS NULL OR CAST(b.day AS TIMESTAMP) < c.valid_to) WHERE b.blockchain = 'solana' AND b.day = CURRENT_DATE - INTERVAL '1' DAY AND c.source_basis = 'token_unit' AND c.target_basis = 'display_unit' ``` Apply each multiplier only to balances inside its validity interval. Token-2022 multipliers can change over time. # Stablecoin Activity Enriched (EVM) Source: https://docs.dune.com/data-catalog/curated/stablecoins/activity-enriched/stablecoins-evm-activity-enriched Transfer-level stablecoin activity classification across 39 supported EVM chains The `stablecoins_evm.activity_enriched` table classifies each stablecoin transfer into an activity category (for example DEX, CEX, bridge, lending, issuer). > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Why these enriched tables matter Stablecoin analysis comes down to two fundamental questions: 1. Where are stablecoins right now? (balances) 2. How did they get there? (activity) This activity-enriched table answers the second question by tracing the economic path of transfers across categories such as DEX trading, lending, borrowing, bridging, internal transfers, and payment-like flows. ### What this dataset is designed to do * Explain how stablecoin balances move through the ecosystem. * Attribute transfer activity with transparent, reproducible logic. * Provide a defensible foundation for flow analysis. The goal is to turn stablecoin flow data from noise into structured economic insight. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name | | `block_month` | `DATE` | First day of month (partition column) | | `block_date` | `DATE` | Transaction date | | `block_time` | `TIMESTAMP` | Transaction timestamp | | `block_number` | `BIGINT` | Block number | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `BIGINT` | Transfer event index | | `activity_evt_index` | `BIGINT` | Matched activity event index (nullable) | | `trace_address` | `VARCHAR` | Trace address (nullable) | | `token_standard` | `VARCHAR` | Token standard (`erc20`) | | `token_address` | `VARBINARY` | Token contract address | | `token_symbol` | `VARCHAR` | Token symbol | | `currency` | `VARCHAR` | ISO 4217 code | | `amount_raw` | `UINT256` | Raw transfer amount | | `amount` | `DOUBLE` | Decimals-adjusted amount | | `price_usd` | `DOUBLE` | USD price used for valuation | | `amount_usd` | `DOUBLE` | USD amount | | `from_address` | `VARBINARY` | Sender | | `to_address` | `VARBINARY` | Recipient | | `category` | `VARCHAR` | Activity category | | `activity` | `VARCHAR` | Activity label | | `project_address` | `VARBINARY` | Matched project address (nullable) | | `project_name` | `VARCHAR` | Matched project name (nullable) | | `project_version` | `VARCHAR` | Matched project version (nullable) | | `unique_key` | `VARCHAR` | Unique transfer identifier | ## Value possibilities The `category` and `activity` columns are intentionally standardized so downstream models, dashboards, and monitoring can rely on deterministic value vocabularies. | `category` | Allowed `activity` values | Description | | - | - | - | | `dex_swap` | `dex_swap` | Direct swaps on decentralized exchanges and DEX aggregators (Uniswap, Curve, 1inch, etc.). | | `flashloan` | `flashloan_borrow`, `flashloan_repay` | Atomic borrow-and-repay within a single transaction. | | `issuer` | `issuer_peg_rebalance` | Peg stability module operations (e.g. Sky PSM, Spark PSM). Ethereum only. | | `yield` | `yield_deposit`, `yield_withdraw` | Deposits and withdrawals from yield strategy contracts. Ethereum only. | | `cex` | `cex_deposit`, `cex_withdraw`, `cex_internal_transfer` | Transfers to/from known centralized exchange wallets. | | `lending` | `lending_supply`, `lending_borrow`, `lending_repay`, `lending_withdraw` | Supply, borrow, repay, and withdraw on lending protocols. | | `bridge` | `bridge_deposit`, `bridge_withdraw` | Cross-chain transfers via bridge contracts. | | `dex_liquidity` | `dex_liquidity_supply`, `dex_liquidity_withdraw` | Non-swap transfers to/from DEX contracts (liquidity adds/removes). | | `unidentified` | `unidentified_activity` | Transfers not matched to any known activity pattern. | This mapping enables consistent flow segmentation, KPI rollups, and alerting logic without custom per-dashboard label handling. As protocol coverage expands, new values may be added in backward-compatible fashion. ## Methodology Classification is done at the transfer level, not the transaction level. 1. Start from curated stablecoin transfer rows in `stablecoins_evm.transfers`. 2. Build candidate matches for each transfer against activity-specific datasets (for example DEX, bridge, CEX, flashloan, lending, and issuer signals) using transfer-level keys such as `tx_hash`, token identity, and amount context. 3. Resolve conflicts with a deterministic precedence order, so each transfer gets exactly one winning category. 4. Write unmatched transfers as `unidentified` to preserve full coverage instead of dropping rows. ### Important interpretation details * One transaction can map to multiple categories if it contains multiple stablecoin transfers. * `project_address`, `project_name`, and `project_version` are populated only when a protocol/entity match exists. * Priority rules improve consistency, but edge cases still exist when protocols emit similar transfer patterns in the same transaction. ## Sample query ```sql theme={null} SELECT a.block_date , a.category , COUNT(*) AS transfers , SUM(a.amount_usd) AS volume_usd FROM stablecoins_evm.activity_enriched AS a WHERE a.blockchain = 'ethereum' AND a.block_date >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY a.block_date, a.category ORDER BY a.block_date DESC, volume_usd DESC ``` ## Notes * One transfer maps to one output row (highest-priority match wins). * For performance, filter by `blockchain` and `block_month`. # Stablecoin Activity Enriched (Solana) Source: https://docs.dune.com/data-catalog/curated/stablecoins/activity-enriched/stablecoins-solana-activity-enriched Transfer-level stablecoin activity classification on Solana The `stablecoins_solana.activity_enriched` table classifies each stablecoin transfer on Solana into an activity category. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. ## Why these enriched tables matter Stablecoin analysis comes down to two fundamental questions: 1. Where are stablecoins right now? (balances) 2. How did they get there? (activity) This activity-enriched table answers the second question by tracing the economic path of transfers across categories such as DEX trading, lending, borrowing, bridging, internal transfers, and payment-like flows. ### What this dataset is designed to do * Explain how stablecoin balances move through the ecosystem. * Attribute transfer activity with transparent, reproducible logic. * Provide a defensible foundation for flow analysis. The goal is to turn stablecoin flow data from noise into structured economic insight. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name (`solana`) | | `block_month` | `DATE` | First day of month (partition column) | | `block_date` | `DATE` | Transaction date | | `block_time` | `TIMESTAMP` | Transaction timestamp | | `block_slot` | `BIGINT` | Solana slot number | | `tx_id` | `VARCHAR` | Transaction signature | | `outer_instruction_index` | `BIGINT` | Outer instruction index | | `inner_instruction_index` | `BIGINT` | Inner instruction index (nullable) | | `token_mint_address` | `VARCHAR` | Token mint address | | `token_symbol` | `VARCHAR` | Token symbol | | `currency` | `VARCHAR` | ISO 4217 code | | `from_owner` | `VARCHAR` | Sender wallet | | `to_owner` | `VARCHAR` | Receiver wallet | | `amount_raw` | `UINT256` | Raw transfer amount | | `amount` | `DOUBLE` | Decimals-adjusted amount | | `amount_usd` | `DOUBLE` | USD amount | | `outer_executing_account` | `VARCHAR` | Program executing instruction | | `category` | `VARCHAR` | Activity category | | `activity` | `VARCHAR` | Activity label | | `project_address` | `VARCHAR` | Matched project address (nullable) | | `project_name` | `VARCHAR` | Matched project name (nullable) | | `project_version` | `VARCHAR` | Matched project version (nullable) | | `unique_key` | `VARCHAR` | Unique transfer identifier | ## Value possibilities The `category` and `activity` columns are intentionally standardized so downstream models, dashboards, and monitoring can rely on deterministic value vocabularies. | `category` | Allowed `activity` values | Description | | - | - | - | | `dex_swap` | `dex_swap` | Direct swaps on decentralized exchanges. | | `cex` | `cex_deposit`, `cex_withdraw`, `cex_internal_transfer` | Transfers to/from known centralized exchange wallets. | | `issuer` | `issuer_mint`, `issuer_burn`, `issuer_unidentified` | Stablecoin minting, redemption, and peg stability operations. | | `flashloan` | `flashloan_borrow`, `flashloan_repay`, `flashloan_unidentified` | Atomic borrow-and-repay within a single transaction. | | `lending` | `lending_supply`, `lending_borrow`, `lending_repay`, `lending_withdraw`, `lending_unidentified` | Supply, borrow, repay, and withdraw on lending protocols. | | `yield` | `yield_unidentified` | Transfers to/from yield strategy or wrapper programs. | | `bridge` | `bridge_deposit`, `bridge_withdraw` | Cross-chain transfers via bridge programs. | | `unidentified` | `unidentified_activity` | Transfers not matched to any known activity pattern. | | `unidentified_bot_activity` | `unidentified_bot_activity` | High-volume automated program patterns not yet classified. | This mapping enables consistent flow segmentation, KPI rollups, and alerting logic without custom per-dashboard label handling. As protocol coverage expands, new values may be added in backward-compatible fashion. ## Methodology Classification is done at the transfer level, not the transaction level. 1. Start from curated stablecoin transfer rows in `stablecoins_solana.transfers`. 2. Evaluate each transfer against category-specific detection logic using Solana-native context (transaction signature, instruction indexes, token mint, transfer amount, and known program/address labels). 3. Apply deterministic priority rules when multiple category matches exist for a transfer. 4. Keep full transfer coverage by assigning unmatched rows to `unidentified` (or `unidentified_bot_activity` for high-volume automated program patterns). ### Important interpretation details * The same transaction can produce different categories across its individual transfers. * Instruction index context is important on Solana for distinguishing activity legs inside one transaction. * `project_address`, `project_name`, and `project_version` are populated only when a confident protocol/entity match exists. ## Sample query ```sql theme={null} SELECT a.block_date , a.category , COUNT(*) AS transfers , SUM(a.amount_usd) AS volume_usd FROM stablecoins_solana.activity_enriched AS a WHERE a.block_date >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY a.block_date, a.category ORDER BY a.block_date DESC, volume_usd DESC ``` ## Notes * One transfer maps to one output row (highest-priority match wins). * For performance, filter by `blockchain` and `block_month`. # Stablecoin Activity Enriched (Tron) Source: https://docs.dune.com/data-catalog/curated/stablecoins/activity-enriched/stablecoins-tron-activity-enriched Planned transfer-level stablecoin activity classification on Tron This page is reserved for `stablecoins_tron.activity_enriched`. > [!NOTE] > > Coming soon. This dataset is planned to follow the same transfer-level activity classification pattern as EVM and Solana enriched activity tables. For methodology details today, see: * `/data-catalog/curated/stablecoins/activity-enriched/stablecoins-evm-activity-enriched` * `/data-catalog/curated/stablecoins/activity-enriched/stablecoins-solana-activity-enriched` # Stablecoin Activity Enriched (XRPL) Source: https://docs.dune.com/data-catalog/curated/stablecoins/activity-enriched/stablecoins-xrpl-activity-enriched Transfer-level stablecoin activity classification on XRPL The `stablecoins_xrpl.activity_enriched` table classifies each stablecoin transfer on XRPL. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. A transfer is `cex` when the sender or recipient is a house or hard exchange address from the served entity lookup. Everything else is `unidentified`. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name (`xrpl`) | | `block_month` | `DATE` | First day of month (partition column) | | `block_date` | `DATE` | Transaction date | | `block_time` | `TIMESTAMP` | Transaction timestamp | | `block_number` | `BIGINT` | XRPL ledger index | | `tx_hash` | `VARCHAR` | Transaction hash | | `evt_index` | `BIGINT` | Always `NULL` | | `activity_evt_index` | `BIGINT` | Always `NULL` | | `trace_address` | `ARRAY(BIGINT)` | Always `NULL` | | `token_standard` | `VARCHAR` | Token standard (`issued`) | | `token_address` | `VARCHAR` | XRPL asset id | | `token_symbol` | `VARCHAR` | Token symbol | | `currency` | `VARCHAR` | ISO 4217 currency code | | `amount_raw` | `UINT256` | Raw transfer amount | | `amount` | `DOUBLE` | Decimals-adjusted amount | | `price_usd` | `DOUBLE` | USD price used for valuation | | `amount_usd` | `DOUBLE` | USD amount | | `from_address` | `VARCHAR` | Sender account | | `to_address` | `VARCHAR` | Recipient account | | `category` | `VARCHAR` | Activity category | | `activity` | `VARCHAR` | Activity label | | `project_address` | `VARCHAR` | Matched exchange address (nullable) | | `project_name` | `VARCHAR` | Matched exchange entity key (nullable) | | `project_version` | `VARCHAR` | Always `NULL` | | `unique_key` | `VARCHAR` | Unique transfer identifier | ## Value possibilities | `category` | Allowed `activity` values | Description | | - | - | - | | `cex` | `cex_deposit`, `cex_withdraw`, `cex_internal_transfer` | Transfers to, from, or between known exchange accounts. | | `unidentified` | `unidentified_activity` | Transfers not matched to an exchange account. | ## Sample query ```sql theme={null} SELECT a.block_date , a.activity , SUM(a.amount_usd) AS volume_usd FROM stablecoins_xrpl.activity_enriched AS a WHERE a.block_date >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY a.block_date, a.activity ORDER BY a.block_date DESC ``` ## Notes * Updated daily. * For partition pruning, filter by `block_month`. # Stablecoin Balances Enriched (EVM) Source: https://docs.dune.com/data-catalog/curated/stablecoins/balances-enriched/stablecoins-evm-balances-enriched Daily stablecoin balances and circulating supply with address-type enrichment across 39 supported EVM chains. The `stablecoins_evm.balances_enriched` table extends EVM stablecoin balances with address classification, entity tags, whale flags, and a circulating supply flag.> [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access.## Why these enriched tables matterStablecoin analysis comes down to two fundamental questions:1) Where are stablecoins right now? (balances) 2) How did they get there? (activity)This balances-enriched table answers the first question by going beyond raw balances and adding attribution for where capital sits: CEX, lending, treasury, yield, bridge, whale concentration, and more.## Table schema| Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name | | `day` | `DATE` | Balance date (partition column) | | `address` | `VARBINARY` | Holder address | | `token_symbol` | `VARCHAR` | Token symbol | | `token_address` | `VARBINARY` | Token contract address | | `token_standard` | `VARCHAR` | Token standard (`erc20`) | | `token_id` | `VARCHAR` | Always `NULL` | | `balance_raw` | `UINT256` | Raw balance | | `balance` | `DOUBLE` | Decimals-adjusted balance | | `balance_usd` | `DOUBLE` | USD value | | `currency` | `VARCHAR` | ISO 4217 code | | `address_category` | `VARCHAR` | Address category (see below) | | `address_subcategory` | `VARCHAR` | Address subcategory | | `address_project` | `VARCHAR` | Project/entity name (nullable) | | `address_version` | `VARCHAR` | Project version (nullable) | | `address_label` | `VARCHAR` | Label value (nullable) | | `is_smart_contract` | `BOOLEAN` | Contract flag | | `is_whale` | `BOOLEAN` | Address holds >= \$10M total stablecoins that day | | `is_circulating` | `BOOLEAN` | `true` when the balance contributes to circulating supply. `false` for lock-and-mint / rollup-escrow / check-balance / non-minting bridge escrows, issuer bridge escrow, and CEX locked-token wallets (e.g., Binance Stablecoin Proof of Assets). Use `WHERE is_circulating = true` to compute circulating supply. | | `last_updated` | `TIMESTAMP` | Last balance update time |## Address categoriesEvery address receives exactly one `address_category` — no double counting is possible by construction. When an address matches a curated label, that label wins. Unlabeled addresses fall through: smart contract → `unidentified_smart_contract`, EOA with >= \$10M → `unidentified_whale`, otherwise → `unidentified`.When an address appears in multiple label sets, a fixed priority order resolves the conflict (table is ordered by priority, highest first):| `address_category` | Allowed `address_subcategory` values | Description | | - | - | - | | `erc20_contract` | `erc20_contract` | Canonical stablecoin token contracts defining supply. Not deployed capital. | | `dex` | `dex_liquidity`, `dex_execution` | Stablecoins in decentralized exchange pools and routing contracts. | | `lending` | `lending_liquidity`, `lending_execution` | Stablecoins deployed as credit in lending protocols. | | `bridge` | `bridge_liquidity` | Stablecoins escrowed or locked for cross-chain transfers. | | `yield` | `yield_liquidity`, `yield_execution` | Stablecoins in strategy or wrapper contracts earning passive yield. | | `issuer` | `issuer_operations`, `issuer_treasury` | Stablecoin monetary infrastructure — minting, redemption, peg management. | | `treasury_or_governance` | `treasury`, `treasury_collector`, `governance` | Protocol-controlled capital for governance, reserves, or fees. | | `cex` | `cex` | Known exchange-controlled wallets (hot and cold). Not user deposit addresses. | | `burn` | `burn` | Irrecoverable token sinks (dead/burn addresses). | | `unidentified_smart_contract` | `unidentified_smart_contract` | Contracts detected onchain but not yet categorized. | | `unidentified_whale` | `unidentified_whale` | Unlabeled EOAs holding >= \$10M total stablecoin balance that day. Recalculated daily. | | `unidentified` | `unidentified` | Addresses with no known classification. |As label coverage expands, new values may be added in backward-compatible fashion.## Methodology1) Start from daily rows in `stablecoins_evm.balances`. 2) Join curated address labels to assign `address_category`, subcategory, and project metadata where a label exists. 3) Derive `is_smart_contract` (from creation traces), `is_whale` (>= \$10M total stablecoin balance), and `is_circulating` (true unless the address is a bridge escrow / issuer bridge escrow / CEX locked-token wallet) flags per address per day. 4) Apply the priority waterfall for unlabeled addresses to maintain complete coverage.Category totals should be interpreted as "where balances sit" rather than ownership or liability accounting. Labels represent the best-known economic function of an address and can evolve as coverage improves.## Sample query```sql theme=\{null} SELECT b.address_category , b.token_symbol , SUM(b.balance_usd) AS total_usd FROM stablecoins_evm.balances_enriched AS b WHERE b.blockchain = 'ethereum' AND b.day = CURRENT_DATE AND b.balance > 0 GROUP BY b.address_category, b.token_symbol ORDER BY total_usd DESC ```## Notes- For performance, filter by `blockchain` and `day`. - For circulating supply, filter `WHERE is_circulating = true`. For bridge exposure, filter `WHERE address_category = 'bridge'`. Both are intentionally retained in the table. \## Interpreting balances vs circulating supply \
    \
  • This table records onchain balances per address per day. Totals are not equivalent to circulating supply by default — bridge-locked, issuer-escrow, and CEX proof-of-assets balances are intentionally retained so you can analyze them.\
  • \
  • Two metrics, two recipes: \
      \
    • \*\*Total balances\*\* — sum \`balance_usd\` with no exclusion filter. Includes bridge-locked funds (e.g., more than \$4B USDT can appear in the Tether \`USDT0Adapter\` contract on Ethereum while representing circulating \`USDT0\` on other chains), issuer escrow, and CEX-locked balances.\
    • \
    • \*\*Circulating supply\*\* — add \`WHERE is_circulating = true\`. The flag excludes lock-and-mint / rollup-escrow / check-balance / non-minting bridges (\`address_subcategory\` in \`bridge_lockAndMint\`, \`bridge_rollup_escrow\`, \`bridge_check_balance\`, \`bridge_nonMinting\`), issuer bridge escrow, and CEX proof-of-assets wallets (e.g., Binance Stablecoin Proof of Assets).\
    • \
    \
  • \
  • We retain bridge / issuer-escrow / CEX-locked balances in the table itself because exclusions are not objective across bridge designs, and some bridge-held balances represent liquidity for chains not covered elsewhere. The \`is_circulating\` flag encodes Dune's best-known classification — readable, auditable, and revisable as coverage improves.\
  • \
  • Bridge exposure is directly analyzable with \`address_category = 'bridge'\`.\
  • \
# Stablecoin Balances Enriched (Solana) Source: https://docs.dune.com/data-catalog/curated/stablecoins/balances-enriched/stablecoins-solana-balances-enriched Daily stablecoin balances and circulating supply with address-type enrichment on Solana. The `stablecoins_solana.balances_enriched` table extends Solana stablecoin balances with address classification, whale flags, and a circulating supply flag.> [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access.## Why these enriched tables matterStablecoin analysis comes down to two fundamental questions:1) Where are stablecoins right now? (balances) 2) How did they get there? (activity)This balances-enriched table answers the first question by going beyond raw balances and adding attribution for where capital sits: CEX, lending, treasury, yield, bridge, whale concentration, and more.## Table schema| Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name (`solana`) | | `day` | `DATE` | Balance date (partition column) | | `address` | `VARCHAR` | Wallet address | | `token_symbol` | `VARCHAR` | Token symbol | | `token_address` | `VARCHAR` | Token mint address | | `token_standard` | `VARCHAR` | Token standard (`spl_token` or `token2022`) | | `token_id` | `VARCHAR` | Always `NULL` | | `balance_raw` | `UINT256` | Raw balance | | `balance` | `DOUBLE` | Decimals-adjusted balance | | `balance_usd` | `DOUBLE` | USD value | | `currency` | `VARCHAR` | ISO 4217 code | | `address_category` | `VARCHAR` | Address category (see below) | | `address_subcategory` | `VARCHAR` | Address subcategory (nullable) | | `address_project` | `VARCHAR` | Project/entity name (nullable) | | `address_version` | `VARCHAR` | Project version (nullable) | | `address_label` | `VARCHAR` | Label value (nullable) | | `is_whale` | `BOOLEAN` | Address holds >= \$10M total stablecoins that day | | `is_circulating` | `BOOLEAN` | `true` when the balance contributes to circulating supply. `false` for bridge escrows (lock-and-mint, rollup-escrow, check-balance, non-minting subcategories), issuer bridge escrow, and CEX locked-token wallets. Use `WHERE is_circulating = true` to compute circulating supply. | | `last_updated` | `TIMESTAMP` | Last balance update time |## Address categoriesEvery address receives exactly one `address_category` — no double counting is possible by construction. When an address matches a curated label, that label wins. Unlabeled addresses fall through: >= \$10M balance → `unidentified_whale`, otherwise → `unidentified`.When an address appears in multiple label sets, a fixed priority order resolves the conflict (table is ordered by priority, highest first):| `address_category` | Allowed `address_subcategory` values | Description | | - | - | - | | `bridge` | `bridge_liquidity` | Stablecoins escrowed or locked for cross-chain transfers. | | `dex` | `dex_liquidity`, `dex_execution` | Stablecoins in decentralized exchange pools and routing contracts. | | `lending` | `lending_liquidity`, `lending_execution` | Stablecoins deployed as credit in lending protocols. | | `yield` | `yield_liquidity`, `yield_execution` | Stablecoins in strategy or wrapper contracts earning passive yield. | | `issuer` | `issuer_operations`, `issuer_treasury` | Stablecoin monetary infrastructure — minting, redemption, peg management. | | `treasury_or_governance` | `treasury`, `treasury_collector`, `governance` | Protocol-controlled capital for governance, reserves, or fees. | | `cex` | `cex` | Known exchange-controlled wallets (hot and cold). Not user deposit addresses. | | `burn` | `burn` | Irrecoverable token sinks (dead/burn addresses). | | `unidentified_whale` | `unidentified_whale` | Unlabeled addresses holding >= \$10M total stablecoin balance that day. Recalculated daily. | | `unidentified` | `unidentified` | Addresses with no known classification. |As label coverage expands, new values may be added in backward-compatible fashion.## Methodology1) Start from daily rows in `stablecoins_solana.balances`. 2) Join curated Solana address labels to assign category, subcategory, and project metadata where available. 3) Derive `is_whale` (>= \$10M total stablecoin balance) and `is_circulating` (true unless the address is a bridge escrow / issuer bridge escrow / CEX locked-token wallet) flags per address per day. 4) Apply the priority waterfall for unlabeled addresses to maintain complete coverage.Category totals should be interpreted as "where balances sit" rather than ownership or liability accounting. Labels represent the best-known economic function of an address and can evolve as coverage improves.## Sample query```sql theme=\{null} SELECT b.address_category , b.token_symbol , SUM(b.balance_usd) AS total_usd FROM stablecoins_solana.balances_enriched AS b WHERE b.day = CURRENT_DATE AND b.balance > 0 GROUP BY b.address_category, b.token_symbol ORDER BY total_usd DESC ```## Notes- For performance, filter by `blockchain` and `day`. - For circulating supply, filter `WHERE is_circulating = true`. For bridge exposure, filter `WHERE address_category = 'bridge'`. Both are intentionally retained in the table. \## Interpreting balances vs circulating supply \
    \
  • This table records onchain balances per address per day. Totals are not equivalent to circulating supply by default — bridge-locked, issuer-escrow, and CEX proof-of-assets balances are intentionally retained so you can analyze them.\
  • \
  • Two metrics, two recipes: \
      \
    • \*\*Total balances\*\* — sum \`balance_usd\` with no exclusion filter. Includes bridge-locked funds (e.g., more than \$4B USDT can appear in the Tether \`USDT0Adapter\` contract on Ethereum while representing circulating \`USDT0\` on other chains), issuer escrow, and CEX-locked balances.\
    • \
    • \*\*Circulating supply\*\* — add \`WHERE is_circulating = true\`. The flag excludes lock-and-mint / rollup-escrow / check-balance / non-minting bridges (\`address_subcategory\` in \`bridge_lockAndMint\`, \`bridge_rollup_escrow\`, \`bridge_check_balance\`, \`bridge_nonMinting\`), issuer bridge escrow, and CEX proof-of-assets wallets (e.g., Binance Stablecoin Proof of Assets).\
    • \
    \
  • \
  • We retain bridge / issuer-escrow / CEX-locked balances in the table itself because exclusions are not objective across bridge designs, and some bridge-held balances represent liquidity for chains not covered elsewhere. The \`is_circulating\` flag encodes Dune's best-known classification — readable, auditable, and revisable as coverage improves.\
  • \
  • Bridge exposure is directly analyzable with \`address_category = 'bridge'\`.\
  • \
# Stablecoin Balances Enriched (Tron) Source: https://docs.dune.com/data-catalog/curated/stablecoins/balances-enriched/stablecoins-tron-balances-enriched Planned daily stablecoin balances and circulating supply with address-type enrichment on Tron. This page is reserved for `stablecoins_tron.balances_enriched`. > [!NOTE] > > Coming soon. This dataset is planned to follow the same address-classification pattern as EVM and Solana enriched balance tables, including the `is_circulating` flag for computing circulating supply. For methodology details today, see: * `/data-catalog/curated/stablecoins/balances-enriched/stablecoins-evm-balances-enriched` * `/data-catalog/curated/stablecoins/balances-enriched/stablecoins-solana-balances-enriched` When this table is live, it will follow the same balance-interpretation rules: balances include bridge-locked, issuer-escrow, and CEX-locked funds by default. Filter `WHERE is_circulating = true` to compute circulating supply. # Stablecoin Balances Enriched (XRPL) Source: https://docs.dune.com/data-catalog/curated/stablecoins/balances-enriched/stablecoins-xrpl-balances-enriched Daily stablecoin balances with address classification on XRPL The `stablecoins_xrpl.balances_enriched` table extends XRPL stablecoin balances with address classification, whale flags, and a circulating supply flag. > [card] [Gated dataset](https://dune.com/enterprise#contact-form) > > Querying this dataset requires an entitlement on your workspace. See [access tiers](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or contact the Dune team to enable access. Known exchange accounts are labeled `cex` from the served entity lookup (house and hard). Other accounts are `unidentified_whale` at \$10M or more that day, otherwise `unidentified`. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name (`xrpl`) | | `day` | `DATE` | Balance date (partition column) | | `address` | `VARCHAR` | Account address | | `token_symbol` | `VARCHAR` | Token symbol | | `token_address` | `VARCHAR` | XRPL asset id | | `token_standard` | `VARCHAR` | Token standard (`issued`) | | `token_id` | `VARCHAR` | Always `NULL` | | `balance_raw` | `UINT256` | Raw balance | | `balance` | `DOUBLE` | Decimals-adjusted balance | | `balance_usd` | `DOUBLE` | USD value | | `currency` | `VARCHAR` | ISO 4217 currency code | | `address_category` | `VARCHAR` | Address category (see below) | | `address_subcategory` | `VARCHAR` | Address subcategory | | `address_project` | `VARCHAR` | Exchange entity key (nullable) | | `address_version` | `VARCHAR` | Always `NULL` | | `address_label` | `VARCHAR` | Exchange entity key (nullable) | | `is_smart_contract` | `BOOLEAN` | Always `NULL` | | `is_whale` | `BOOLEAN` | Account holds >= \$10M total stablecoins that day | | `is_circulating` | `BOOLEAN` | `true` unless the account is a bridge escrow, an issuer bridge escrow, or the Binance stablecoin proof-of-assets wallet | | `last_updated` | `TIMESTAMP` | Last balance update time | ## Address categories | `address_category` | Allowed `address_subcategory` values | Description | | - | - | - | | `cex` | `cex` | Known exchange-controlled accounts. | | `unidentified_whale` | `unidentified_whale` | Unlabeled accounts holding >= \$10M total stablecoin balance that day. | | `unidentified` | `unidentified` | Accounts with no known classification. | ## Sample query ```sql theme={null} SELECT b.day , b.address_category , SUM(b.balance_usd) AS balance_usd FROM stablecoins_xrpl.balances_enriched AS b WHERE b.day >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY b.day, b.address_category ORDER BY b.day DESC ``` ## Notes * Updated daily. * For best performance, filter by `day`. ## Interpreting balances vs circulating supply
  • This table records onchain balances per address per day. Totals are not equivalent to circulating supply by default — bridge-locked, issuer-escrow, and CEX proof-of-assets balances are intentionally retained so you can analyze them.
  • Two metrics, two recipes:
    • **Total balances** — sum `balance_usd` with no exclusion filter. Includes bridge-locked funds (e.g., more than \$4B USDT can appear in the Tether `USDT0Adapter` contract on Ethereum while representing circulating `USDT0` on other chains), issuer escrow, and CEX-locked balances.
    • **Circulating supply** — this foundation table does not carry the `is_circulating` flag. Use the enriched balances table (`stablecoins_evm.balances_enriched`, `stablecoins_solana.balances_enriched`, or `stablecoins_tron.balances_enriched`) and filter `WHERE is_circulating = true`.
  • We retain bridge / issuer-escrow / CEX-locked balances in the table itself because exclusions are not objective across bridge designs, and some bridge-held balances represent liquidity for chains not covered elsewhere. The `is_circulating` flag encodes Dune's best-known classification — readable, auditable, and revisable as coverage improves.
# Stablecoin Balances (EVM) Source: https://docs.dune.com/data-catalog/curated/stablecoins/balances/stablecoins-evm-balances Daily stablecoin balances per address across 39 supported EVM chains The `stablecoins_evm.balances` table contains daily stablecoin balances per address across 39 supported EVM chains. One row represents one address-token balance snapshot for a specific day. Coverage is ERC20 stablecoin balances. > [card] [Upgrade to the enriched dataset](/data-catalog/curated/stablecoins/balances-enriched/stablecoins-evm-balances-enriched) > > Skip manual reconstruction. The enriched version packages attribution and methodology so you can move from raw data to insights faster. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name | | `day` | `DATE` | Balance date | | `address` | `VARBINARY` | Holder address | | `token_symbol` | `VARCHAR` | Token symbol | | `token_address` | `VARBINARY` | Token contract address | | `token_standard` | `VARCHAR` | Token standard (`erc20`) | | `token_id` | `VARCHAR` | Token id (typically NULL) | | `balance_raw` | `UINT256` | Raw balance | | `balance` | `DOUBLE` | Decimals-adjusted balance | | `balance_usd` | `DOUBLE` | USD value | | `currency` | `VARCHAR` | ISO 4217 currency code | | `last_updated` | `TIMESTAMP` | Last balance update time | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_evm\&table_name_t6f0df=balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_evm\&table_name_t6f0df=balances) ## Sample Queries ```sql theme={null} SELECT b.blockchain , b.token_symbol , SUM(b.balance_usd) AS total_supply_usd FROM stablecoins_evm.balances AS b WHERE b.day = CURRENT_DATE AND b.balance > 0 GROUP BY b.blockchain, b.token_symbol ORDER BY total_supply_usd DESC ``` ## Notes * Balances are forward-filled by day. * For best performance, filter by `blockchain` and `day`. * For multichain aggregate balances, see `stablecoins_multichain.balances`. ## Interpreting balances vs circulating supply
  • This table records onchain balances per address per day. Totals are not equivalent to circulating supply by default — bridge-locked, issuer-escrow, and CEX proof-of-assets balances are intentionally retained so you can analyze them.
  • Two metrics, two recipes:
    • **Total balances** — sum `balance_usd` with no exclusion filter. Includes bridge-locked funds (e.g., more than \$4B USDT can appear in the Tether `USDT0Adapter` contract on Ethereum while representing circulating `USDT0` on other chains), issuer escrow, and CEX-locked balances.
    • **Circulating supply** — this foundation table does not carry the `is_circulating` flag. Use the enriched balances table (`stablecoins_evm.balances_enriched`, `stablecoins_solana.balances_enriched`, or `stablecoins_tron.balances_enriched`) and filter `WHERE is_circulating = true`.
  • We retain bridge / issuer-escrow / CEX-locked balances in the table itself because exclusions are not objective across bridge designs, and some bridge-held balances represent liquidity for chains not covered elsewhere. The `is_circulating` flag encodes Dune's best-known classification — readable, auditable, and revisable as coverage improves.
# Stablecoin Balances (Multichain) Source: https://docs.dune.com/data-catalog/curated/stablecoins/balances/stablecoins-multichain-balances Normalized daily stablecoin balances across EVM, Solana, Tron, and XRPL The `stablecoins_multichain.balances` table is a normalized multichain balance view across: > [card] [Use the prepackaged enriched versions](/data-catalog/curated/stablecoins/overview) > > Skip manual reconstruction. The enriched version packages attribution and methodology so you can move from raw data to insights faster. * EVM stablecoin balances * Solana stablecoin balances * Tron stablecoin balances * XRPL stablecoin balances It standardizes `address` and `token_address` fields as `VARCHAR` for cross-chain analysis. One row represents one address-token balance snapshot for a specific day after cross-chain normalization. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name | | `day` | `DATE` | Balance date | | `address` | `VARCHAR` | Holder address (normalized) | | `token_symbol` | `VARCHAR` | Token symbol | | `token_address` | `VARCHAR` | Token contract/mint address (normalized) | | `token_standard` | `VARCHAR` | Token standard | | `token_id` | `VARCHAR` | Token id (typically NULL) | | `balance_raw` | `UINT256` | Raw balance | | `balance` | `DOUBLE` | Decimals-adjusted balance | | `balance_usd` | `DOUBLE` | USD value | | `currency` | `VARCHAR` | ISO 4217 currency code | | `last_updated` | `TIMESTAMP` | Last balance update time | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_multichain\&table_name_t6f0df=balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_multichain\&table_name_t6f0df=balances) ## Sample Queries ```sql theme={null} SELECT b.blockchain , SUM(b.balance_usd) AS total_supply_usd FROM stablecoins_multichain.balances AS b WHERE b.day = CURRENT_DATE AND b.balance > 0 GROUP BY b.blockchain ORDER BY total_supply_usd DESC ``` ## Notes * This is currently the stablecoin multichain aggregate table. * For chain-specific analysis, use `stablecoins_evm.balances`, `stablecoins_solana.balances`, `stablecoins_tron.balances`, and `stablecoins_xrpl.balances`. ## Interpreting balances vs circulating supply
  • This table records onchain balances per address per day. Totals are not equivalent to circulating supply by default — bridge-locked, issuer-escrow, and CEX proof-of-assets balances are intentionally retained so you can analyze them.
  • Two metrics, two recipes:
    • **Total balances** — sum `balance_usd` with no exclusion filter. Includes bridge-locked funds (e.g., more than \$4B USDT can appear in the Tether `USDT0Adapter` contract on Ethereum while representing circulating `USDT0` on other chains), issuer escrow, and CEX-locked balances.
    • **Circulating supply** — this foundation table does not carry the `is_circulating` flag. Use the enriched balances table (`stablecoins_evm.balances_enriched`, `stablecoins_solana.balances_enriched`, or `stablecoins_tron.balances_enriched`) and filter `WHERE is_circulating = true`.
  • We retain bridge / issuer-escrow / CEX-locked balances in the table itself because exclusions are not objective across bridge designs, and some bridge-held balances represent liquidity for chains not covered elsewhere. The `is_circulating` flag encodes Dune's best-known classification — readable, auditable, and revisable as coverage improves.
  • Excluding only selected bridges would also be incomplete in practice: some bridge-held balances represent liquidity for chains not covered elsewhere (for example Lighter and Hyperliquid bridge balances).
# Stablecoin Balances (Solana) Source: https://docs.dune.com/data-catalog/curated/stablecoins/balances/stablecoins-solana-balances Daily stablecoin balances per wallet on Solana The `stablecoins_solana.balances` table contains daily stablecoin balances per wallet on Solana. One row represents one wallet-token balance snapshot for a specific day. Coverage includes both SPL and SPL2022 stablecoin balances. > [card] [Upgrade to the enriched dataset](/data-catalog/curated/stablecoins/balances-enriched/stablecoins-solana-balances-enriched) > > Skip manual reconstruction. The enriched version packages attribution and methodology so you can move from raw data to insights faster. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name (`solana`) | | `day` | `DATE` | Balance date | | `address` | `VARCHAR` | Wallet address | | `token_symbol` | `VARCHAR` | Token symbol | | `token_address` | `VARCHAR` | Token mint address | | `token_standard` | `VARCHAR` | Token standard (`spl_token` / `token2022`) | | `token_id` | `VARCHAR` | Token id (typically NULL) | | `currency` | `VARCHAR` | ISO 4217 currency code | | `balance_raw` | `UINT256` | Raw balance | | `balance` | `DOUBLE` | Decimals-adjusted balance | | `balance_usd` | `DOUBLE` | USD value | | `last_updated` | `TIMESTAMP` | Last balance update time | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_solana\&table_name_t6f0df=balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_solana\&table_name_t6f0df=balances) ## Sample Queries ```sql theme={null} SELECT b.day , b.token_symbol , SUM(b.balance_usd) AS total_supply_usd FROM stablecoins_solana.balances AS b WHERE b.balance > 0 AND b.day >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY b.day, b.token_symbol ORDER BY b.day DESC, total_supply_usd DESC ``` ## Notes * Balances are forward-filled by day. * For best performance, filter by `day`. * For multichain aggregate balances, see `stablecoins_multichain.balances`. ## Interpreting balances vs circulating supply
  • This table records onchain balances per address per day. Totals are not equivalent to circulating supply by default — bridge-locked, issuer-escrow, and CEX proof-of-assets balances are intentionally retained so you can analyze them.
  • Two metrics, two recipes:
    • **Total balances** — sum `balance_usd` with no exclusion filter. Includes bridge-locked funds (e.g., more than \$4B USDT can appear in the Tether `USDT0Adapter` contract on Ethereum while representing circulating `USDT0` on other chains), issuer escrow, and CEX-locked balances.
    • **Circulating supply** — this foundation table does not carry the `is_circulating` flag. Use the enriched balances table (`stablecoins_evm.balances_enriched`, `stablecoins_solana.balances_enriched`, or `stablecoins_tron.balances_enriched`) and filter `WHERE is_circulating = true`.
  • We retain bridge / issuer-escrow / CEX-locked balances in the table itself because exclusions are not objective across bridge designs, and some bridge-held balances represent liquidity for chains not covered elsewhere. The `is_circulating` flag encodes Dune's best-known classification — readable, auditable, and revisable as coverage improves.
# Stablecoin Balances (Tron) Source: https://docs.dune.com/data-catalog/curated/stablecoins/balances/stablecoins-tron-balances Daily stablecoin balances per wallet on Tron The `stablecoins_tron.balances` table contains daily stablecoin balances per wallet on Tron. One row represents one wallet-token balance snapshot for a specific day. Coverage is TRC20 stablecoin balances. > [card] [Upgrade to the enriched dataset](/data-catalog/curated/stablecoins/balances-enriched/stablecoins-tron-balances-enriched) > > Skip manual reconstruction. The enriched version packages attribution and methodology so you can move from raw data to insights faster. It includes both 0x-format and base58-format address fields. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name (`tron`) | | `day` | `DATE` | Balance date | | `address` | `VARBINARY` | Holder address (0x) | | `address_varchar` | `VARCHAR` | Holder address (base58) | | `token_symbol` | `VARCHAR` | Token symbol | | `token_address` | `VARCHAR` | Token contract address (base58) | | `contract_address` | `VARBINARY` | Token contract address (0x) | | `token_standard` | `VARCHAR` | Token standard (`trc20`) | | `token_id` | `VARCHAR` | Token id (typically NULL) | | `balance_raw` | `UINT256` | Raw balance | | `balance` | `DOUBLE` | Decimals-adjusted balance | | `balance_usd` | `DOUBLE` | USD value | | `currency` | `VARCHAR` | ISO 4217 currency code | | `last_updated` | `TIMESTAMP` | Last balance update time | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_tron\&table_name_t6f0df=balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_tron\&table_name_t6f0df=balances) ## Sample Queries ```sql theme={null} SELECT b.day , b.token_symbol , SUM(b.balance_usd) AS total_supply_usd FROM stablecoins_tron.balances AS b WHERE b.balance > 0 AND b.day >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY b.day, b.token_symbol ORDER BY b.day DESC ``` ## Notes * Balances are forward-filled by day. * For best performance, filter by `day`. * For multichain aggregate balances, see `stablecoins_multichain.balances`. ## Interpreting balances vs circulating supply
  • This table records onchain balances per address per day. Totals are not equivalent to circulating supply by default — bridge-locked, issuer-escrow, and CEX proof-of-assets balances are intentionally retained so you can analyze them.
  • Two metrics, two recipes:
    • **Total balances** — sum `balance_usd` with no exclusion filter. Includes bridge-locked funds (e.g., more than \$4B USDT can appear in the Tether `USDT0Adapter` contract on Ethereum while representing circulating `USDT0` on other chains), issuer escrow, and CEX-locked balances.
    • **Circulating supply** — this foundation table does not carry the `is_circulating` flag. Use the enriched balances table (`stablecoins_evm.balances_enriched`, `stablecoins_solana.balances_enriched`, or `stablecoins_tron.balances_enriched`) and filter `WHERE is_circulating = true`.
  • We retain bridge / issuer-escrow / CEX-locked balances in the table itself because exclusions are not objective across bridge designs, and some bridge-held balances represent liquidity for chains not covered elsewhere. The `is_circulating` flag encodes Dune's best-known classification — readable, auditable, and revisable as coverage improves.
# Stablecoin Balances (XRPL) Source: https://docs.dune.com/data-catalog/curated/stablecoins/balances/stablecoins-xrpl-balances Daily stablecoin balances per account on XRPL The `stablecoins_xrpl.balances` table contains daily stablecoin balances per account on XRPL. One row represents one account-token balance snapshot for a specific day. Coverage starts with RLUSD. `token_address` is the XRPL asset id (`issuer:currency`). > [card] [Upgrade to the enriched dataset](/data-catalog/curated/stablecoins/balances-enriched/stablecoins-xrpl-balances-enriched) > > Skip manual reconstruction. The enriched version packages attribution and methodology so you can move from raw data to insights faster. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name (`xrpl`) | | `day` | `DATE` | Balance date | | `address` | `VARCHAR` | Account address | | `token_symbol` | `VARCHAR` | Token symbol | | `token_address` | `VARCHAR` | XRPL asset id | | `token_standard` | `VARCHAR` | Token standard (`issued`) | | `token_id` | `VARCHAR` | Token id (typically NULL) | | `balance_raw` | `UINT256` | Raw balance | | `balance` | `DOUBLE` | Decimals-adjusted balance | | `balance_usd` | `DOUBLE` | USD value | | `currency` | `VARCHAR` | ISO 4217 currency code | | `last_updated` | `TIMESTAMP` | Last balance update time | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_xrpl\&table_name_t6f0df=balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_xrpl\&table_name_t6f0df=balances) ## Sample Queries ```sql theme={null} SELECT b.day , b.token_symbol , SUM(b.balance_usd) AS total_supply_usd FROM stablecoins_xrpl.balances AS b WHERE b.balance > 0 AND b.day >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY b.day, b.token_symbol ORDER BY b.day DESC ``` ## Notes * Balances are forward-filled by day. * For best performance, filter by `day`. * For multichain aggregate balances, see `stablecoins_multichain.balances`. ## Interpreting balances vs circulating supply
  • This table records onchain balances per address per day. Totals are not equivalent to circulating supply by default — bridge-locked, issuer-escrow, and CEX proof-of-assets balances are intentionally retained so you can analyze them.
  • Two metrics, two recipes:
    • **Total balances** — sum `balance_usd` with no exclusion filter. Includes bridge-locked funds (e.g., more than \$4B USDT can appear in the Tether `USDT0Adapter` contract on Ethereum while representing circulating `USDT0` on other chains), issuer escrow, and CEX-locked balances.
    • **Circulating supply** — this foundation table does not carry the `is_circulating` flag. Use the enriched balances table (`stablecoins_evm.balances_enriched`, `stablecoins_solana.balances_enriched`, or `stablecoins_tron.balances_enriched`) and filter `WHERE is_circulating = true`.
  • We retain bridge / issuer-escrow / CEX-locked balances in the table itself because exclusions are not objective across bridge designs, and some bridge-held balances represent liquidity for chains not covered elsewhere. The `is_circulating` flag encodes Dune's best-known classification — readable, auditable, and revisable as coverage improves.
# Stablecoins Source: https://docs.dune.com/data-catalog/curated/stablecoins/overview Curated stablecoin transfers and balances across EVM, Solana, Tron, XRPL, and multichain views Two questions define stablecoin analysis: **where are balances right now**, and **how did they get there**. Foundation tables provide normalized transfer and balance records for chain and multichain analysis, while enriched tables classify transfer intent and address behavior with transparent methodology across EVM, Solana, Tron, and XRPL. > [!NOTE] > > **Maintained by:** Dune · **Chains:** 39 EVM chains, Solana, Tron, XRPL > [!WARNING] > > **🔒 Gated dataset — entitlement required.** The **entire** Stablecoins collection is gated: every `stablecoins_.*` table (`transfers`, `balances`, `activity_enriched`, `balances_enriched`) plus `stablecoins_multichain.{transfers, balances, tokens}` requires an active entitlement on your Dune workspace before you can query it. Gating is enforced App-side and is not visible on the table itself in the data explorer — see the [access tiers overview](/data-catalog/overview#access-tiers-public-vs-gated-datasets), or [contact the Dune team](https://dune.com/enterprise#contact-form) to enable access. > [card] [Get This Data](https://dune.com/data/stablecoins) > > Access stablecoin data via API, Datashare, or the Dune App. > [!NOTE] > > Explore these datasets on the [stablecoins data page](https://dune.com/data/stablecoins) with interactive dashboards you can filter, compare, and drill into. For issuer workflows, see [solutions for stablecoin issuers](https://dune.com/solutions/stablecoin-issuers). *** > [!NOTE] > > The enriched datasets in the `Balances enriched` and `Activity enriched` sections are refreshed daily. ## Balances enriched > [!NOTE] > > 🔒 **Gated (premium) dataset** — requires additional access. [Contact the Dune team](https://dune.com/enterprise#contact-form) to enable. **Every balance, labeled by holder type.** Measure where stablecoin balances sit across CEX, DEX, bridge, lending, treasury, yield, issuer, burn, and unlabeled buckets. Daily snapshots with standardized address-category taxonomy and EOA versus smart-contract differentiation help track deployment patterns, concentration risk, and structural balance shifts over time. **Use cases** * Track balance migration across holder categories over time * Monitor lending and CEX balance share by chain and token * Compare EOA and smart-contract balance share by category **Tables** > [card] [EVM balances enriched](/data-catalog/curated/stablecoins/balances-enriched/stablecoins-evm-balances-enriched) > > Daily EVM balances with address classification and whale flags > [card] [Solana balances enriched](/data-catalog/curated/stablecoins/balances-enriched/stablecoins-solana-balances-enriched) > > Daily Solana balances with address classification and whale flags > [card] [Tron balances enriched](/data-catalog/curated/stablecoins/balances-enriched/stablecoins-tron-balances-enriched) > > Planned daily Tron balances with address classification > [card] [XRPL balances enriched](/data-catalog/curated/stablecoins/balances-enriched/stablecoins-xrpl-balances-enriched) > > Daily XRPL balances with address classification and whale flags `Updated daily · 35+ chains · Standardized address taxonomy · EOA and smart-contract split · Premium dataset` *** ## Activity enriched > [!NOTE] > > 🔒 **Gated (premium) dataset** — requires additional access. [Contact the Dune team](https://dune.com/enterprise#contact-form) to enable. **From transfer noise to signal.** Track why stablecoins move, not just how much they move. Transfer volume on its own is often ambiguous, so each transfer is qualified with trigger-aware logic and classified into an economic action. Use this to separate DEX, bridge, CEX, lending, and issuer flows. **Use cases** * Turn raw transfer counts into intent-level flow analysis * Decompose multi-leg transactions into economic actions * Detect regime shifts by category, chain, and token **Tables** > [card] [EVM activity enriched](/data-catalog/curated/stablecoins/activity-enriched/stablecoins-evm-activity-enriched) > > Transfer-level activity classification across 39 supported EVM chains > [card] [Solana activity enriched](/data-catalog/curated/stablecoins/activity-enriched/stablecoins-solana-activity-enriched) > > Transfer-level activity classification on Solana > [card] [Tron activity enriched](/data-catalog/curated/stablecoins/activity-enriched/stablecoins-tron-activity-enriched) > > Planned transfer-level activity classification on Tron > [card] [XRPL activity enriched](/data-catalog/curated/stablecoins/activity-enriched/stablecoins-xrpl-activity-enriched) > > Transfer-level activity classification on XRPL `Updated daily · Transfer-level intent classification · One transfer, one category · Premium dataset` *** ## Foundation tables > [!NOTE] > > 🔒 **Gated dataset** — the foundation `stablecoins_.transfers` / `stablecoins_.balances` and the multichain views require an entitlement on your workspace, just like the enriched tables. See the [access tiers overview](/data-catalog/overview#access-tiers-public-vs-gated-datasets) or [contact the Dune team](https://dune.com/enterprise#contact-form) to enable access. **The raw data behind the enriched layers.** Raw transfer events and daily balance snapshots across EVM, Solana, Tron, and XRPL, plus a multichain balances view, with no labels or enrichment applied. These tables give you full history, token-level granularity, and USD-denominated amounts for building your own analytics. **Use cases** * Compute net flows between any pair of addresses * Build custom holder-concentration metrics from raw balances * Backtest strategies against full transfer history ### Transfers Every stablecoin transfer event with sender, receiver, amount, token metadata, and USD value. > [!NOTE] > > **Refresh:** \~1 hour > [card] [EVM transfers](/data-catalog/curated/stablecoins/transfers/stablecoins-evm-transfers) > > Stablecoin transfers across supported EVM networks > [card] [Solana transfers](/data-catalog/curated/stablecoins/transfers/stablecoins-solana-transfers) > > Stablecoin transfers on Solana > [card] [Tron transfers](/data-catalog/curated/stablecoins/transfers/stablecoins-tron-transfers) > > Stablecoin transfers on Tron with 0x and base58 fields > [card] [XRPL transfers](/data-catalog/curated/stablecoins/transfers/stablecoins-xrpl-transfers) > > Stablecoin transfers on XRPL > [card] [Multichain transfers](/data-catalog/curated/stablecoins/transfers/stablecoins-multichain-transfers) > > Normalized transfers across EVM, Solana, Tron, and XRPL ### Balances Daily end-of-day stablecoin balances per address with token metadata and USD value. > [!NOTE] > > **Refresh:** daily (data as of yesterday) > [card] [EVM balances](/data-catalog/curated/stablecoins/balances/stablecoins-evm-balances) > > Daily stablecoin balances for addresses on EVM networks > [card] [Solana balances](/data-catalog/curated/stablecoins/balances/stablecoins-solana-balances) > > Daily stablecoin balances for addresses on Solana > [card] [Tron balances](/data-catalog/curated/stablecoins/balances/stablecoins-tron-balances) > > Daily stablecoin balances for addresses on Tron > [card] [XRPL balances](/data-catalog/curated/stablecoins/balances/stablecoins-xrpl-balances) > > Daily stablecoin balances for addresses on XRPL > [card] [Multichain balances](/data-catalog/curated/stablecoins/balances/stablecoins-multichain-balances) > > Normalized stablecoin balances across EVM, Solana, Tron, and XRPL ### Reference > [card] [Multichain tokens](/data-catalog/curated/stablecoins/stablecoins-multichain-tokens) > > Reference table of all tracked stablecoins with token metadata `Updated daily · Chain + multichain coverage · Raw transfers and balances` # Stablecoin Tokens (Multichain) Source: https://docs.dune.com/data-catalog/curated/stablecoins/stablecoins-multichain-tokens Reference table of all tracked stablecoins across EVM, Solana, Tron, and XRPL with token metadata. The `stablecoins_multichain.tokens` table is a reference table listing all tracked stablecoins across EVM, Solana, Tron, and XRPL ecosystems with enriched symbol and decimals metadata. One row represents one stablecoin token on one blockchain. This table is useful for: * Looking up which stablecoins are tracked per chain * Joining with transfer or balance tables for token metadata * Filtering stablecoin activity by currency peg (USD, EUR, etc.) ## Table Schema | Column | Type | Description | Example | | - | - | - | - | | `blockchain` | `VARCHAR` | Chain name | `ethereum` | | `token_address` | `VARCHAR` | Token contract/mint address | `0xdac17f958d2ee523a2206206994597c13d831ec7` | | `currency` | `VARCHAR` | ISO 4217 currency code the stablecoin is pegged to | `USD` | | `symbol` | `VARCHAR` | Token symbol | `USDT` | | `decimals` | `BIGINT` | Token decimals | `6` | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_multichain\&table_name_t6f0df=tokens](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_multichain\&table_name_t6f0df=tokens) ## Sample Queries ```sql theme={null} SELECT t.blockchain , t.symbol , t.currency , t.token_address FROM stablecoins_multichain.tokens AS t ORDER BY t.blockchain, t.symbol ``` # Stablecoin Transfers (EVM) Source: https://docs.dune.com/data-catalog/curated/stablecoins/transfers/stablecoins-evm-transfers Stablecoin transfer events across 39 supported EVM chains The `stablecoins_evm.transfers` table contains curated stablecoin transfer records across 39 supported EVM chains. One row represents one ERC20 stablecoin transfer event at log granularity. > [card] [Upgrade to the enriched dataset](/data-catalog/curated/stablecoins/activity-enriched/stablecoins-evm-activity-enriched) > > Skip manual reconstruction. The enriched version packages attribution and methodology so you can move from raw data to insights faster. This table is useful for: * stablecoin flow analysis by chain, token, and address * transfer volume analysis in native units and USD * cross-chain stablecoin transfer comparisons ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name | | `block_month` | `DATE` | First day of month (partition column) | | `block_date` | `DATE` | Transaction date | | `block_time` | `TIMESTAMP` | Transaction timestamp | | `block_number` | `BIGINT` | Block number | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `BIGINT` | Transfer event index | | `trace_address` | `VARCHAR` | Trace address (nullable) | | `token_standard` | `VARCHAR` | Token standard (`erc20`) | | `token_address` | `VARBINARY` | Token contract address | | `token_symbol` | `VARCHAR` | Token symbol | | `currency` | `VARCHAR` | ISO 4217 currency code | | `amount_raw` | `UINT256` | Raw transfer amount | | `amount` | `DOUBLE` | Decimals-adjusted amount | | `price_usd` | `DOUBLE` | USD price used for valuation | | `amount_usd` | `DOUBLE` | USD amount | | `from` | `VARBINARY` | Sender address | | `to` | `VARBINARY` | Recipient address | | `unique_key` | `VARCHAR` | Unique transfer identifier | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_evm\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_evm\&table_name_t6f0df=transfers) ## Sample Queries ```sql theme={null} SELECT t.block_date , t.blockchain , t.token_symbol , SUM(t.amount_usd) AS volume_usd , COUNT(*) AS transfers FROM stablecoins_evm.transfers AS t WHERE t.block_date >= CURRENT_DATE - INTERVAL '7' DAY GROUP BY t.block_date, t.blockchain, t.token_symbol ORDER BY t.block_date DESC, volume_usd DESC ``` ## Notes * For partition pruning, filter by `blockchain` and `block_month`. # Stablecoin Transfers (Multichain) Source: https://docs.dune.com/data-catalog/curated/stablecoins/transfers/stablecoins-multichain-transfers Unified stablecoin transfer events across EVM, Solana, Tron, and XRPL in a single cross-chain view. The `stablecoins_multichain.transfers` table unions stablecoin transfer records from all supported ecosystems — EVM (39 chains), Solana, Tron, and XRPL — into a single cross-chain view with normalized address and hash types (VARCHAR). One row represents one stablecoin transfer event. This table is useful for: * Cross-ecosystem stablecoin flow analysis * Aggregate transfer volume across all supported chains * Comparing stablecoin movement patterns across EVM, Solana, Tron, and XRPL ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name | | `block_month` | `DATE` | First day of month (partition column) | | `block_date` | `DATE` | Transaction date | | `block_time` | `TIMESTAMP` | Transaction timestamp | | `block_number` | `BIGINT` | Block number (null for Solana) | | `tx_hash` | `VARCHAR` | Transaction hash | | `evt_index` | `BIGINT` | Event index within the transaction (null for Solana and XRPL) | | `token_standard` | `VARCHAR` | Token standard (e.g. `erc20`, `spl_token`, `issued`) | | `token_address` | `VARCHAR` | Token contract/mint address | | `token_symbol` | `VARCHAR` | Token symbol | | `currency` | `VARCHAR` | ISO 4217 currency code | | `amount_raw` | `UINT256` | Raw transfer amount | | `amount` | `DOUBLE` | Decimals-adjusted amount | | `price_usd` | `DOUBLE` | USD price per unit | | `amount_usd` | `DOUBLE` | USD value of transfer | | `from` | `VARCHAR` | Sender address | | `to` | `VARCHAR` | Recipient address | | `unique_key` | `VARCHAR` | Unique transfer identifier | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_multichain\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_multichain\&table_name_t6f0df=transfers) ## Sample Queries ```sql theme={null} SELECT t.block_date , t.blockchain , t.token_symbol , SUM(t.amount_usd) AS volume_usd , COUNT(*) AS transfers FROM stablecoins_multichain.transfers AS t WHERE t.block_date >= CURRENT_DATE - INTERVAL '7' DAY GROUP BY t.block_date, t.blockchain, t.token_symbol ORDER BY t.block_date DESC, volume_usd DESC ``` ## Notes * Addresses and hashes are cast to VARCHAR for cross-ecosystem compatibility. * For partition pruning, filter by `blockchain` and `block_month`. # Stablecoin Transfers (Solana) Source: https://docs.dune.com/data-catalog/curated/stablecoins/transfers/stablecoins-solana-transfers Stablecoin transfer events on Solana The `stablecoins_solana.transfers` table contains curated stablecoin transfer records on Solana. One row represents one transfer instruction call at instruction granularity. Coverage includes both SPL and SPL2022 stablecoin transfers. > [card] [Upgrade to the enriched dataset](/data-catalog/curated/stablecoins/activity-enriched/stablecoins-solana-activity-enriched) > > Skip manual reconstruction. The enriched version packages attribution and methodology so you can move from raw data to insights faster. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name (`solana`) | | `block_month` | `DATE` | First day of month (partition column) | | `block_date` | `DATE` | Transaction date | | `block_time` | `TIMESTAMP` | Transaction timestamp | | `block_slot` | `BIGINT` | Solana slot number | | `tx_id` | `VARCHAR` | Transaction signature | | `tx_index` | `BIGINT` | Transaction index in slot | | `outer_instruction_index` | `BIGINT` | Outer instruction index | | `inner_instruction_index` | `BIGINT` | Inner instruction index | | `token_version` | `VARCHAR` | Token standard version (`spl_token` / `token2022`) | | `token_mint_address` | `VARCHAR` | Token mint address | | `token_symbol` | `VARCHAR` | Token symbol | | `currency` | `VARCHAR` | ISO 4217 currency code | | `amount_raw` | `UINT256` | Raw transfer amount | | `amount` | `DOUBLE` | Decimals-adjusted amount | | `price_usd` | `DOUBLE` | USD price used for valuation | | `amount_usd` | `DOUBLE` | USD amount | | `from_owner` | `VARCHAR` | Sender wallet | | `to_owner` | `VARCHAR` | Receiver wallet | | `from_token_account` | `VARCHAR` | Source token account | | `to_token_account` | `VARCHAR` | Destination token account | | `tx_signer` | `VARCHAR` | Transaction signer | | `outer_executing_account` | `VARCHAR` | Program executing outer instruction | | `action` | `VARCHAR` | Transfer action label | | `unique_key` | `VARCHAR` | Unique transfer identifier | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_solana\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_solana\&table_name_t6f0df=transfers) ## Sample Queries ```sql theme={null} SELECT t.block_date , t.token_symbol , SUM(t.amount_usd) AS volume_usd , COUNT(*) AS transfers FROM stablecoins_solana.transfers AS t WHERE t.block_date >= CURRENT_DATE - INTERVAL '7' DAY GROUP BY t.block_date, t.token_symbol ORDER BY t.block_date DESC, volume_usd DESC ``` ## Notes * For partition pruning, filter by `block_month`. # Stablecoin Transfers (Tron) Source: https://docs.dune.com/data-catalog/curated/stablecoins/transfers/stablecoins-tron-transfers Stablecoin transfer events on Tron The `stablecoins_tron.transfers` table contains curated stablecoin transfer records on Tron. One row represents one TRC20 transfer event at event-log granularity. > [card] [Upgrade to the enriched dataset](/data-catalog/curated/stablecoins/activity-enriched/stablecoins-tron-activity-enriched) > > Skip manual reconstruction. The enriched version packages attribution and methodology so you can move from raw data to insights faster. It includes both `VARBINARY` (0x) and `VARCHAR` (base58) address/hash representations. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name (`tron`) | | `block_month` | `DATE` | First day of month (partition column) | | `block_date` | `DATE` | Transaction date | | `block_time` | `TIMESTAMP` | Transaction timestamp | | `block_number` | `BIGINT` | Block number | | `tx_hash` | `VARBINARY` | Transaction hash (0x) | | `evt_index` | `BIGINT` | Event index | | `trace_address` | `VARCHAR` | Trace address (nullable) | | `token_standard` | `VARCHAR` | Token standard (`trc20`) | | `token_address` | `VARCHAR` | Token contract address (base58) | | `token_symbol` | `VARCHAR` | Token symbol | | `currency` | `VARCHAR` | ISO 4217 currency code | | `amount_raw` | `UINT256` | Raw transfer amount | | `amount` | `DOUBLE` | Decimals-adjusted amount | | `price_usd` | `DOUBLE` | USD price used for valuation | | `amount_usd` | `DOUBLE` | USD amount | | `from` | `VARBINARY` | Sender address (0x) | | `to` | `VARBINARY` | Recipient address (0x) | | `unique_key` | `VARCHAR` | Unique transfer identifier | | `tx_from` | `VARBINARY` | Transaction sender (0x) | | `tx_to` | `VARBINARY` | Transaction receiver (0x) | | `tx_index` | `BIGINT` | Transaction index | | `contract_address` | `VARBINARY` | Token contract (0x) | | `tx_hash_varchar` | `VARCHAR` | Transaction hash (base58) | | `contract_address_varchar` | `VARCHAR` | Token contract (base58) | | `from_varchar` | `VARCHAR` | Sender address (base58) | | `to_varchar` | `VARCHAR` | Recipient address (base58) | | `tx_from_varchar` | `VARCHAR` | Transaction sender (base58) | | `tx_to_varchar` | `VARCHAR` | Transaction receiver (base58) | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_tron\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_tron\&table_name_t6f0df=transfers) ## Sample Queries ```sql theme={null} SELECT t.block_date , SUM(t.amount_usd) AS volume_usd , COUNT(*) AS transfers FROM stablecoins_tron.transfers AS t WHERE t.token_symbol = 'USDT' AND t.block_date >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY t.block_date ORDER BY t.block_date DESC ``` ## Notes * For partition pruning, filter by `block_month`. # Stablecoin Transfers (XRPL) Source: https://docs.dune.com/data-catalog/curated/stablecoins/transfers/stablecoins-xrpl-transfers Stablecoin transfer events on XRPL The `stablecoins_xrpl.transfers` table contains curated stablecoin transfer records on XRPL. One row represents one stablecoin transfer. Coverage starts with RLUSD. `token_address` is the XRPL asset id (`issuer:currency`). > [card] [Upgrade to the enriched dataset](/data-catalog/curated/stablecoins/activity-enriched/stablecoins-xrpl-activity-enriched) > > Skip manual reconstruction. The enriched version packages attribution and methodology so you can move from raw data to insights faster. ## Table schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Chain name (`xrpl`) | | `block_month` | `DATE` | First day of month (partition column) | | `block_date` | `DATE` | Transaction date | | `block_time` | `TIMESTAMP` | Transaction timestamp | | `block_number` | `BIGINT` | XRPL ledger index | | `tx_hash` | `VARCHAR` | Transaction hash | | `evt_index` | `BIGINT` | Always `NULL` | | `trace_address` | `ARRAY(BIGINT)` | Always `NULL` | | `token_standard` | `VARCHAR` | Token standard (`issued`) | | `token_address` | `VARCHAR` | XRPL asset id | | `token_symbol` | `VARCHAR` | Token symbol | | `currency` | `VARCHAR` | ISO 4217 currency code | | `amount_raw` | `UINT256` | Raw transfer amount | | `amount` | `DOUBLE` | Decimals-adjusted amount | | `price_usd` | `DOUBLE` | USD price used for valuation | | `amount_usd` | `DOUBLE` | USD amount | | `from` | `VARCHAR` | Sender account | | `to` | `VARCHAR` | Recipient account | | `unique_key` | `VARCHAR` | Unique transfer identifier | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_xrpl\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stablecoins_xrpl\&table_name_t6f0df=transfers) ## Sample Queries ```sql theme={null} SELECT t.block_date , SUM(t.amount_usd) AS volume_usd , COUNT(*) AS transfers FROM stablecoins_xrpl.transfers AS t WHERE t.token_symbol = 'RLUSD' AND t.block_date >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY t.block_date ORDER BY t.block_date DESC ``` ## Notes * For partition pruning, filter by `block_month`. * History starts on 2024-12-17. # staking_ethereum.deposits Source: https://docs.dune.com/data-catalog/curated/staking/deposits Ethereum beacon chain deposit events — validator activations with amounts, withdrawal credentials, and entity attribution. The `staking_ethereum.deposits` table contains all ETH staking deposits to the beacon chain with entity attribution. ## Table Schema | Column | Type | Description | | - | - | - | | `block_time` | `TIMESTAMP` | Block time of deposit transaction | | `block_number` | `BIGINT` | Block number | | `amount_staked` | `DOUBLE` | Amount of ETH staked | | `depositor_address` | `VARBINARY` | Address of the depositor | | `entity` | `VARCHAR` | Name of depositor entity if identified | | `entity_unique_name` | `VARCHAR` | Unique name of identified entity | | `entity_category` | `VARCHAR` | Category of identified entity | | `sub_entity` | `VARCHAR` | Sub-entity name if identified | | `sub_entity_unique_name` | `VARCHAR` | Unique name of sub-entity | | `sub_entity_category` | `VARCHAR` | Category of sub-entity | | `tx_hash` | `VARBINARY` | Transaction hash | | `tx_from` | `VARBINARY` | Address that executed the transaction | | `deposit_index` | `BIGINT` | Deposit index | | `pubkey` | `VARBINARY` | Validator public key | | `signature` | `VARBINARY` | Deposit signature | | `withdrawal_address` | `VARBINARY` | Defined withdrawal address | | `withdrawal_credentials_type` | `VARBINARY` | Withdrawal credentials type | | `withdrawal_credentials` | `VARBINARY` | Withdrawal credentials | | `evt_index` | `INTEGER` | Event index | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=staking_ethereum\&table_name_t6f0df=deposits](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=staking_ethereum\&table_name_t6f0df=deposits) # staking_ethereum.entities Source: https://docs.dune.com/data-catalog/curated/staking/entities Ethereum staking entities — known operators, institutional stakers, and liquid staking protocols. The `staking_ethereum.entities` table provides entity identification mapping for staking depositor addresses — linking wallet addresses to known staking operators and protocols. ## Table Schema | Column | Type | Description | | - | - | - | | `depositor_address` | `VARBINARY` | Address of identified depositor entity | | `tx_from` | `VARBINARY` | Address that initiated the staking deposit | | `pubkey` | `VARBINARY` | Public key of identified validator | | `withdrawal_credentials` | `VARBINARY` | Withdrawal credentials of identified validator | | `entity` | `VARCHAR` | Identified entity name (e.g., Lido, Coinbase) | | `entity_unique_name` | `VARCHAR` | Unique name of identified entity | | `category` | `VARCHAR` | Category of entity (e.g., Liquid Staking, CEX) | | `sub_entity` | `VARCHAR` | Sub-entity name (e.g., specific operator) | | `sub_entity_unique_name` | `VARCHAR` | Unique name of sub-entity | | `sub_entity_category` | `VARCHAR` | Category of sub-entity | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=staking_ethereum\&table_name_t6f0df=entities](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=staking_ethereum\&table_name_t6f0df=entities) # staking_ethereum.flows Source: https://docs.dune.com/data-catalog/curated/staking/flows Ethereum staking net flows — ETH movements in and out of the beacon chain by entity over time. The `staking_ethereum.flows` table combines deposits and withdrawals into a unified view for analyzing net staking flows over time. ## Table Schema | Column | Type | Description | | - | - | - | | `block_time` | `TIMESTAMP` | Block time | | `block_number` | `BIGINT` | Block number | | `amount_staked` | `DOUBLE` | Amount of ETH staked (deposits) | | `depositor_address` | `VARBINARY` | Address of the depositor | | `entity` | `VARCHAR` | Name of entity if identified | | `entity_unique_name` | `VARCHAR` | Unique name of identified entity | | `entity_category` | `VARCHAR` | Category of entity | | `sub_entity` | `VARCHAR` | Sub-entity name | | `sub_entity_unique_name` | `VARCHAR` | Unique name of sub-entity | | `sub_entity_category` | `VARCHAR` | Category of sub-entity | | `tx_from` | `VARBINARY` | Address that executed the transaction | | `deposit_index` | `BIGINT` | Deposit index | | `withdrawal_index` | `BIGINT` | Withdrawal index | | `validator_index` | `BIGINT` | Validator index | | `pubkey` | `VARBINARY` | Validator public key | | `signature` | `VARBINARY` | Signature | | `withdrawal_address` | `VARBINARY` | Withdrawal address | | `withdrawal_credentials_type` | `VARBINARY` | Withdrawal credentials type | | `withdrawal_credentials` | `VARBINARY` | Withdrawal credentials | | `amount_full_withdrawn` | `DOUBLE` | Amount from full validator withdrawal | | `amount_partial_withdrawn` | `DOUBLE` | Amount from partial (rewards) withdrawal | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `INTEGER` | Event index | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=staking_ethereum\&table_name_t6f0df=flows](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=staking_ethereum\&table_name_t6f0df=flows) # staking_ethereum.info Source: https://docs.dune.com/data-catalog/curated/staking/info Ethereum validator snapshots — current status, balance, activation epoch, and entity attribution. The `staking_ethereum.info` table provides static metadata about known staking entities. ## Table Schema | Column | Type | Description | | - | - | - | | `entity` | `VARCHAR` | Staking entity name | | `x_username` | `VARCHAR` | Entity's X (Twitter) username | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=staking_ethereum\&table_name_t6f0df=info](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=staking_ethereum\&table_name_t6f0df=info) # Staking Source: https://docs.dune.com/data-catalog/curated/staking/overview Curated Ethereum staking datasets with entity identification on Dune Dune's staking tables provide comprehensive data on Ethereum's Proof-of-Stake beacon chain — validator deposits, withdrawals, and entity identification. These tables map staking activity to known entities like Lido, Coinbase, Rocket Pool, and dozens of others. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~30 min · **Chain:** Ethereum only > [card] [Get This Data](https://dune.com/enterprise?dataset=staking) > > Access staking data via API, Datashare, or the Dune App. ## Available Tables > [card] [staking_ethereum.deposits](/data-catalog/curated/staking/deposits) > > All ETH staking deposits with entity attribution > [card] [staking_ethereum.flows](/data-catalog/curated/staking/flows) > > Combined deposits and withdrawals in a unified view > [card] [staking_ethereum.entities](/data-catalog/curated/staking/entities) > > Entity identification mapping for depositor addresses > [card] [staking_ethereum.info](/data-catalog/curated/staking/info) > > Static metadata about staking entities ## When to Use These Tables * Track ETH staking deposits and withdrawals over time * Analyze staking entity market share (Lido vs Coinbase vs solo stakers) * Monitor validator activity and withdrawal patterns * Identify which entities control staking infrastructure * Assess staking concentration risk ## Coverage **Chain:** Ethereum only (beacon chain staking is Ethereum-specific) **Entity identification via:** Depositor addresses, smart contract analysis, transaction origin addresses, withdrawal credentials, batch contract patterns, and protocol-specific identification for Coinbase, Binance, Lido, Rocket Pool, and many others. ## Query Performance `staking_ethereum.deposits` is an incremental table. Filter on `block_time` ranges for best performance. ```sql theme={null} -- ✅ Good: time-bounded SELECT * FROM staking_ethereum.deposits WHERE block_time >= DATE '2025-01-01' -- ❌ Slow: full table scan SELECT * FROM staking_ethereum.deposits WHERE entity = 'Lido' ``` ## Methodology Staking tables are maintained by Dune ([source code](https://github.com/duneanalytics/spellbook)). They decode events from Ethereum's beacon chain deposit contract, enrich them with entity identification from multiple sources (on-chain traces, known address mappings, withdrawal credential analysis), and join with beacon chain validator data for withdrawal tracking. Entity identification uses a layered approach: first matching depositor addresses to known entities, then analyzing smart contract patterns and withdrawal credentials, and finally using batch deposit heuristics for staking pools. ## Example Queries **Staking entity market share:** ```sql theme={null} SELECT entity, entity_category, SUM(amount_staked) AS total_eth_staked, COUNT(*) AS num_deposits FROM staking_ethereum.deposits GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 20 ``` **Monthly staking deposits vs withdrawals:** ```sql theme={null} SELECT date_trunc('month', block_time) AS month, SUM(amount_staked) AS eth_deposited, SUM(amount_full_withdrawn) AS eth_full_withdrawn, SUM(amount_partial_withdrawn) AS eth_partial_withdrawn, SUM(amount_staked) - SUM(amount_full_withdrawn) - SUM(amount_partial_withdrawn) AS net_staking_flow FROM staking_ethereum.flows WHERE block_time >= DATE '2024-01-01' GROUP BY 1 ORDER BY 1 ``` ## Related Tables * `labels.addresses` — Additional address labels beyond staking entities * `cex.addresses` — Identifies CEX-controlled addresses, useful for understanding CEX staking > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom staking analytics or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private staking analytics pipelines with the dbt Connector. # ERC20 Token Metadata Source: https://docs.dune.com/data-catalog/curated/token-metadata/evm/erc20-metadata Metadata like symbol, name, decimals, and contract address for ERC20 tokens across EVM networks. The `tokens.erc20` table contains metadata for ERC20 tokens across all EVM-compatible networks indexed on Dune. This dataset provides essential information about ERC20 tokens, including: * The blockchain on which the token exists * The contract address of the token * The token symbol * The token name * The number of decimals used by the token ### Coverage This table covers tokens across all EVM chains on Dune. Tokens are automatically detected and included when they meet the following criteria: * Have emitted ERC20 Transfer events * Have at least 1 transfer recorded on-chain New tokens meeting these criteria are added to the table within approximately 1 hour of detection. ### Data Sources We use [DefinedFi](https://docs.defined.fi/reference/token) as our metadata provider to retrieve token metadata for qualifying contracts. Native tokens are also included in this dataset, using metadata information from `dune.blockchains`. ### Utility The ERC20 metadata table offers valuable information for token analysis and integration, allowing you to: * Identify tokens across different blockchains * Retrieve essential token information for calculations and display ## Table Schema | Column | Type | Description | | - | - | - | | `blockchain` | `VARCHAR` | Blockchain on which the token exists | | `contract_address` | `VARBINARY` | Token contract address | | `symbol` | `VARCHAR` | Token ticker symbol | | `name` | `VARCHAR` | Full token name | | `decimals` | `INTEGER` | Number of decimal places used by the token | | `_updated_at` | `TIMESTAMP` | When this record was last updated | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens\&table_name_t6f0df=erc20](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens\&table_name_t6f0df=erc20) ## Sample Queries **Query ERC20 tokens on a specific blockchain** This query returns ERC20 tokens on the Ethereum blockchain: ```sql theme={null} SELECT contract_address, symbol, decimals FROM tokens.erc20 WHERE blockchain = 'ethereum' LIMIT 100 ``` **Find tokens with a specific symbol across blockchains** This query finds all tokens with the symbol "USDC" across different blockchains: ```sql theme={null} SELECT blockchain, contract_address, symbol, decimals FROM tokens.erc20 WHERE symbol = 'USDC' ``` **List tokens with non-standard decimal places** This query lists tokens that don't use the standard 18 decimal places: ```sql theme={null} SELECT blockchain, contract_address, symbol, decimals FROM tokens.erc20 WHERE decimals != 18 ORDER BY decimals DESC LIMIT 50 ``` **Count tokens by blockchain** This query shows the distribution of tokens across different blockchains: ```sql theme={null} SELECT blockchain, COUNT(*) as token_count FROM tokens.erc20 GROUP BY blockchain ORDER BY token_count DESC ``` # Token Metadata Source: https://docs.dune.com/data-catalog/curated/token-metadata/overview Comprehensive token metadata across blockchain networks Dune provides comprehensive token metadata that enables identification and analysis of digital assets across blockchain networks. Token metadata includes essential information such as token names, symbols, decimals, and contract addresses, which are fundamental for any token-related analysis. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** N/A · **Chains:** All EVM chains, Solana > [card] [Get This Data](https://dune.com/enterprise?dataset=token-metadata) > > Access token metadata via API, Datashare, or the Dune App. ## Available Datasets ### EVM Token Metadata > [card] [ERC20 Token Metadata](/data-catalog/curated/token-metadata/evm/erc20-metadata) > > Metadata for ERC20 tokens across EVM networks including name, symbol, decimals, and contract address ### Solana Token Metadata > [card] [Token Metadata](/data-catalog/curated/token-metadata/solana/token-metadata) > > Metadata for fungible tokens on the Solana blockchain > [card] [Token Accounts](/data-catalog/curated/token-metadata/solana/token-accounts) > > Information about token accounts on the Solana blockchain including account addresses, owners, and mint relationships ## Key Features * **Multi-Chain Coverage**: Token metadata across EVM and Solana ecosystems * **Automatic Detection**: New tokens are automatically added when detected on-chain * **Standardized Schema**: Consistent data structure for cross-chain analysis * **Essential Token Information**: Names, symbols, decimals, and contract addresses ## When to Use These Tables * Resolve token contract addresses to human-readable names and symbols * Look up decimal precision for raw amount conversions * Enrich transfer and trading data with token metadata * Build token registries and search interfaces * Validate token contract addresses across chains ## Methodology Token metadata tables are maintained by Dune ([source code](https://github.com/duneanalytics/spellbook)). EVM token metadata (`tokens.erc20`) is compiled from multiple sources: on-chain contract reads for name/symbol/decimals, community-contributed seed files, and automated detection from token transfer events. Solana token metadata (`tokens_solana.fungible`) uses on-chain Metaplex metadata and SPL token registry data. ## Example Queries **Look up token metadata by contract address:** ```sql theme={null} SELECT contract_address, symbol, decimals, name FROM tokens.erc20 WHERE blockchain = 'ethereum' AND contract_address = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 ``` **Find all tokens with a specific symbol:** ```sql theme={null} SELECT blockchain, contract_address, symbol, decimals FROM tokens.erc20 WHERE symbol = 'USDC' ORDER BY blockchain ``` ## Related Tables * `prices.day` / `prices.hour` — Token pricing (joins on blockchain + contract_address) * `tokens.transfers` — Token transfer events (uses same contract addresses) * `dex.trades` — DEX trading data with token references > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom token data or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private token registries with the dbt Connector. # Token Accounts Source: https://docs.dune.com/data-catalog/curated/token-metadata/solana/token-accounts Information about token accounts on the Solana blockchain. The `solana_utils.token_accounts` table contains information about token accounts on the Solana blockchain. Token accounts are used to hold balances of specific tokens for Solana wallets. This table provides essential data about token accounts, including: * The token account address * The owner of the token balance * The mint address of the token * The type of account (e.g., associated token account or regular token account) ### Utility The Solana token accounts table is useful for: * Tracking token balances for specific wallets * Analyzing the distribution of token holdings * Identifying associated token accounts for wallets * Understanding the relationship between token mints and token accounts This table can be joined with other Solana tables to provide rich insights into token ownership and transfers on the Solana blockchain. ## Table Schema | Column | Type | Description | | - | - | - | | `address` | `VARCHAR` | Token account address | | `address_prefix` | `VARCHAR` | Address prefix for indexing | | `token_mint_address` | `VARCHAR` | Mint address of the token held | | `token_balance_owner` | `VARCHAR` | Owner of the token balance (wallet address) | | `account_type` | `VARCHAR` | Type of token account (associated, regular) | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana_utils\&table_name_t6f0df=token_accounts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana_utils\&table_name_t6f0df=token_accounts) ## Sample Query **Query token accounts for a specific wallet** This query returns all token accounts associated with a specific wallet address: ```sql theme={null} SELECT address AS token_account_address, token_balance_owner AS wallet_address, token_mint_address, account_type FROM solana_utils.token_accounts WHERE token_balance_owner = 'FG4Y3yX4AAchp1HvNZ7LfzFTewF2f6nDoMDCohTFrdpk' LIMIT 10 ``` This query will show you the token accounts owned by the specified wallet, including the specific token mint addresses and account types. # Token Metadata Source: https://docs.dune.com/data-catalog/curated/token-metadata/solana/token-metadata Metadata for fungible tokens on the Solana blockchain. The `tokens_solana.fungible` table contains metadata for fungible tokens on the Solana blockchain indexed on Dune. This dataset provides essential information about Solana tokens, including: * The token mint address * The token name and symbol * The number of decimals used by the token * Additional metadata such as token URI and creation details ### Utility The Solana fungible token metadata table offers valuable information for token analysis and integration, allowing you to: * Identify tokens on the Solana blockchain * Retrieve essential token information for calculations and display * Access additional metadata for more comprehensive token analysis ## Table Schema | Column | Type | Description | | - | - | - | | `token_mint_address` | `VARCHAR` | Fungible token mint address | | `address_prefix` | `VARCHAR` | Address prefix for indexing | | `decimals` | `BIGINT` | Number of decimal places for the token | | `name` | `VARCHAR` | Token name | | `symbol` | `VARCHAR` | Token symbol | | `token_uri` | `VARCHAR` | Token metadata URI | | `metadata_program` | `VARCHAR` | Program used for creating token metadata | | `token_version` | `VARCHAR` | Token program version (spl_token, token2022) | | `init_tx` | `VARCHAR` | Transaction that initialized the mint | | `created_at` | `TIMESTAMP` | When the token mint was created | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_solana\&table_name_t6f0df=fungible](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_solana\&table_name_t6f0df=fungible) ### Network Coverage This table covers fungible token metadata for the Solana blockchain. ## Sample Queries **Query Solana fungible tokens** This query returns fungible tokens on the Solana blockchain: ```sql theme={null} SELECT token_mint_address, symbol, name, decimals FROM tokens_solana.fungible LIMIT 100 ``` **Find tokens with a specific symbol** This query finds all tokens with the symbol "USDC" on Solana: ```sql theme={null} SELECT token_mint_address, symbol, name, decimals, created_at FROM tokens_solana.fungible WHERE symbol = 'USDC' ``` **List tokens with non-standard decimal places** This query lists tokens that don't use the standard 9 decimal places on Solana: ```sql theme={null} SELECT token_mint_address, symbol, name, decimals FROM tokens_solana.fungible WHERE decimals != 9 ORDER BY decimals DESC LIMIT 50 ``` # Aptos Token Transfers Source: https://docs.dune.com/data-catalog/curated/token-transfers/aptos/aptos-token-transfers Curated and enriched fungible token transfer activity on the Aptos blockchain. The `tokens_aptos.transfers` table contains curated fungible token transfer activity for Aptos assets indexed on Dune. It normalizes balance-changing activity across Aptos' legacy Coin standard and the newer Fungible Asset (FA) standard into one transfer table. This dataset includes: * Standard transfers reconstructed from paired debit and credit activity within the same transaction * Residual mint and burn rows when only one side of the balance change exists * Metadata enrichment for symbol and decimals * USD valuation when an hourly USD price is available for the token > [!NOTE] > > The table aims to capture standard Aptos fungible token transfers. Some non-standard token implementations or custom transfer hooks may not map cleanly into sender and receiver semantics for every transaction. ### Utility The Aptos transfers table provides a consistent view of fungible token movement on Aptos, enabling you to: * Track token flows between accounts * Analyze transfer volume by token, wallet, and day * Separate regular transfers from mint and burn activity * Investigate issuer, exchange, and protocol-related fund movement ### Methodology Aptos token movement is modeled differently than EVM token transfers. According to the official Aptos docs, the legacy Coin standard emits `0x1::coin::DepositEvent` and `0x1::coin::WithdrawEvent`, while the Fungible Asset standard emits `0x1::fungible_asset::Deposit` and `0x1::fungible_asset::Withdraw` events from primary stores. Dune's Aptos transfers model aligns to that event model and reconstructs transfer rows from those balance-changing activities. The `tokens_aptos.transfers` table is built as follows: * It starts from Aptos fungible asset activity rows for supported Coin and FA deposit/withdraw event types. * Debit and credit events are paired within the same transaction and `asset_type` using FIFO-style overlap logic to reconstruct transfer rows. * Unpaired residual activity is emitted as `mint` or `burn` in `transfer_type`. * Symbol and decimals are enriched from Aptos asset metadata, while `tx_from` is sourced from `aptos.user_transactions`. * When multiple assets share overlapping symbols, the model keeps canonical asset types for key stablecoins to avoid duplicate symbol-level rows. * `amount_usd` is calculated from `prices_external.hour` for Aptos when hourly pricing is available. ### Pricing Methodology The `price_usd` and `amount_usd` columns come from Dune's external hourly price feed for Aptos tokens. If a token has a price for that hour, the transfer row gets a USD price and value. If not, both columns stay `NULL`. This approach is meant to keep transfer valuations stable and avoid obvious outliers from thin or noisy onchain pricing. For tokens outside Dune's trusted token set, very large computed USD values are set to `NULL` instead of being shown. For more details on Dune's pricing methodology, see the [Prices documentation](/data-catalog/curated/prices/overview). ## Table Schema | Column | Type | Description | | - | - | - | | `unique_key` | `VARCHAR` | Surrogate key to identify a unique transfer row | | `blockchain` | `VARCHAR` | Blockchain identifier (`aptos`) | | `block_month` | `DATE` | Month bucket derived from `block_time` | | `block_date` | `DATE` | Block date | | `block_time` | `TIMESTAMP` | Block timestamp | | `tx_version` | `UINT256` | Aptos transaction version | | `tx_hash` | `VARBINARY` | Transaction hash | | `event_index` | `INTEGER` | Primary event index used for the transfer row | | `counterpart_event_index` | `INTEGER` | Matched opposite-side event index for paired transfers | | `token_standard` | `VARCHAR` | Aptos token standard label used for the activity | | `tx_from` | `VARBINARY` | Transaction sender | | `tx_to` | `VARBINARY` | Transaction receiver field reserved for future enrichment; currently `NULL` | | `from` | `VARBINARY` | Transfer sender owner address | | `to` | `VARBINARY` | Transfer receiver owner address | | `contract_address` | `VARBINARY` | Package address parsed from `asset_type` | | `asset_type` | `VARCHAR` | Fully qualified Aptos asset type | | `from_storage_id` | `VARBINARY` | Sender-side fungible store identifier | | `to_storage_id` | `VARBINARY` | Receiver-side fungible store identifier | | `symbol` | `VARCHAR` | Token symbol from Aptos asset metadata | | `decimals` | `INTEGER` | Display decimals from Aptos asset metadata | | `tx_index` | `INTEGER` | Transaction index within the block | | `amount_raw` | `UINT256` | Raw token amount before decimal adjustment | | `amount` | `DOUBLE` | Transfer amount in display units | | `price_usd` | `DOUBLE` | Hourly USD price used to calculate `amount_usd` | | `amount_usd` | `DOUBLE` | USD value of the transfer | | `transfer_type` | `VARCHAR` | Transfer classification (`transfer`, `mint`, or `burn`) | | `_updated_at` | `TIMESTAMP` | Timestamp when this row was last written | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_aptos\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_aptos\&table_name_t6f0df=transfers) ## Sample Queries **Query recent token transfers for a specific Aptos address** This query returns the most recent incoming and outgoing token transfers for a wallet: ```sql theme={null} SELECT block_time, tx_version, symbol, transfer_type, CASE WHEN "from" = 0x8fc24635538e870786e8444e89ed1458449a1f0788ad21f27c4f8188333138f9 THEN 'Outgoing' WHEN "to" = 0x8fc24635538e870786e8444e89ed1458449a1f0788ad21f27c4f8188333138f9 THEN 'Incoming' END AS direction, amount, amount_usd FROM tokens_aptos.transfers WHERE ( "from" = 0x8fc24635538e870786e8444e89ed1458449a1f0788ad21f27c4f8188333138f9 OR "to" = 0x8fc24635538e870786e8444e89ed1458449a1f0788ad21f27c4f8188333138f9 ) AND block_time > now() - interval '30' day ORDER BY block_time DESC LIMIT 100 ``` **Calculate daily transfer volume for a specific Aptos asset** This query aggregates daily transfer activity for a single Aptos asset: ```sql theme={null} SELECT block_date, symbol, COUNT(*) AS num_rows, SUM(amount) AS total_amount, SUM(amount_usd) AS total_amount_usd FROM tokens_aptos.transfers WHERE contract_address = 0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b AND transfer_type = 'transfer' AND block_date >= current_date - interval '30' day GROUP BY 1, 2 ORDER BY 1 DESC ``` **Split transfer activity into transfers, mints, and burns** This query helps distinguish normal transfers from supply-changing events: ```sql theme={null} SELECT block_date, transfer_type, COUNT(*) AS num_rows, SUM(amount) AS total_amount, SUM(amount_usd) AS total_amount_usd FROM tokens_aptos.transfers WHERE block_date >= current_date - interval '30' day AND symbol = 'APT' GROUP BY 1, 2 ORDER BY 1 DESC, 2 ``` # Arc Token Transfers Source: https://docs.dune.com/data-catalog/curated/token-transfers/arc/arc-token-transfers Unified token transfer activity for native USDC and ERC-20 assets on Arc. The `tokens_arc.transfers` table contains token movement data for assets on [Arc](https://www.arc.io), Circle's Layer-1 built for stablecoin payments. It brings native USDC movement and ERC-20 transfers into one table with a shared schema, prices, and normalized amounts. This dataset includes: * Native USDC movement, captured from Arc's EIP-7708 transfer logs * ERC-20 transfer events for every other token on the chain * Normalized amounts alongside raw base units * USD valuation where a price is available for the token > [!NOTE] > > Arc's gas token **is** USDC, so "native" rows on Arc are USDC movements rather than a separate gas asset. Native rows carry the zero address (`0x0000...0000`) in `contract_address`, following the same convention used across Dune's EVM balance and transfer tables. ### Utility The Arc transfers table gives you a single view of token movement on Arc, letting you: * Track USDC flows between wallets and contracts, including gas-token movement * Analyze transfer activity by token, counterparty, and day * Measure USD volume for priced tokens * Join to `tokens_arc.erc20` for token metadata, or to `prices_arc.minute` for pricing ### Methodology Arc implements [EIP-7708](https://eips.ethereum.org/EIPS/eip-7708), which makes native value transfers emit a log rather than being visible only in traces. On Arc these logs are emitted by the system address `0xfffffffffffffffffffffffffffffffffffffffe` using the standard ERC-20 `Transfer` topic, with the amount in 18-decimal base units. This table is built around that: * **Native USDC** comes from the EIP-7708 system emitter at **18 decimals**, in place of the traces leg used on other EVM chains. * **All other tokens** come from their own ERC-20 `Transfer` events. * The **6-decimal USDC ERC-20 interface** at `0x3600000000000000000000000000000000000000` is **deliberately excluded**, because the EIP-7708 emitter already records the movements made through it. Including both would double-count the same transfer. #### The two views of USDC Arc exposes USDC two ways over the **same** pool of funds, and the distinction matters when you compare amounts: | View | Decimals | Address | | - | - | - | | Native (`eth_getBalance`, `msg.value`, EIP-7708 logs) | 18 | `0x0000000000000000000000000000000000000000` | | USDC ERC-20 interface | 6 | `0x3600000000000000000000000000000000000000` | The two differ by exactly 1012: `eth_getBalance(addr) / 1e12 == balanceOf(addr)`. There is no wrapped USDC on Arc — the native asset satisfies `IERC20` directly. Because this table sources native movement from the EIP-7708 emitter, amounts for native USDC rows are normalized from the 18-decimal view. > [!WARNING] > > Some tokens on Arc use the ticker of a well-known asset without being that asset. Match on `contract_address`, not on `symbol`, when you care about which token you are measuring. ## Table Schema | Column | Type | Description | | - | - | - | | `unique_key` | `VARCHAR` | Surrogate key identifying a unique transfer row | | `blockchain` | `VARCHAR` | Blockchain name; always `arc` | | `block_month` | `DATE` | Month bucket derived from `block_date`; partition key | | `block_date` | `DATE` | Date of the block | | `block_time` | `TIMESTAMP WITH TIME ZONE` | Timestamp of the block | | `block_number` | `BIGINT` | Block height | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `INTEGER` | Log index of the transfer event within the block | | `trace_address` | `ARRAY(BIGINT)` | Trace address for the transfer when applicable | | `token_standard` | `VARCHAR` | Token standard label: `native` or `erc20` | | `tx_from` | `VARBINARY` | Sender of the transaction containing the transfer | | `tx_to` | `VARBINARY` | Recipient of the transaction containing the transfer | | `tx_index` | `BIGINT` | Index of the transaction within the block | | `from` | `VARBINARY` | Source address of the token movement | | `to` | `VARBINARY` | Destination address of the token movement | | `contract_address` | `VARBINARY` | Token contract address; the zero address for native USDC | | `symbol` | `VARCHAR` | Token symbol, from `tokens_arc.erc20` | | `amount_raw` | `UINT256` | Raw token amount in base units | | `amount` | `DOUBLE` | Amount normalized by the token's decimals | | `price_usd` | `DOUBLE` | USD price used to compute `amount_usd`, when available | | `amount_usd` | `DOUBLE` | USD value of the transfer, when a price is available | | `_updated_at` | `TIMESTAMP WITH TIME ZONE` | Timestamp when the curated row was last written | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_arc\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_arc\&table_name_t6f0df=transfers) ## Sample Queries **Daily USDC transfer volume** Native USDC movement per day, with USD value: ```sql theme={null} select block_date, count(*) as transfers, sum(amount) as usdc_volume, sum(amount_usd) as volume_usd from tokens_arc.transfers where token_standard = 'native' and block_date >= current_date - interval '30' day group by 1 order by 1 desc ``` **Most active tokens by transfers and unique wallets** Ranking tokens by activity, counting each address once whether it sent or received: ```sql theme={null} with counts as ( select contract_address, max(symbol) as symbol, count(*) as transfers from tokens_arc.transfers where block_date >= current_date - interval '7' day group by 1 ), movements as ( select contract_address, "from" as wallet from tokens_arc.transfers where block_date >= current_date - interval '7' day union all select contract_address, "to" as wallet from tokens_arc.transfers where block_date >= current_date - interval '7' day ), wallets as ( select contract_address, count(distinct wallet) as wallets from movements -- exclude the zero address so mints and burns do not count as a participant where wallet != 0x0000000000000000000000000000000000000000 group by 1 ) select c.contract_address, c.symbol, c.transfers, w.wallets from counts c left join wallets w on w.contract_address = c.contract_address order by c.transfers desc limit 25 ``` **Transfer history for a single wallet** Incoming and outgoing movement for one address: ```sql theme={null} select block_time, symbol, contract_address, case when "to" = {{wallet}} then 'in' else 'out' end as direction, amount, amount_usd from tokens_arc.transfers where ("from" = {{wallet}} or "to" = {{wallet}}) and block_date >= current_date - interval '90' day order by block_time desc ``` # Token Transfers Source: https://docs.dune.com/data-catalog/curated/token-transfers/evm/token-transfers Curated and enriched token transfer events across all EVM networks for fungible tokens. The `tokens_evm.transfers` table contains token transfer events across ERC20 tokens and native tokens for all EVM-compatible networks indexed on Dune. This dataset encompasses: * Transfer events for ERC20 tokens * ERC4626 fallback mint and burn transfers for supported vaults * WETH deposits and withdrawals * Native currency transfers * Transaction value transfers * Trace value transfers * Gas used transfers > [!NOTE] > > Some ERC20 tokens and native currencies have non-standard ways of being transferred and might not be included in the transfers table. > You can check the logic for the transfers table [here](https://github.com/duneanalytics/spellbook/tree/main/dbt_subprojects/tokens/models/transfers_and_balances). The level of detail of the transfers table will vary by chain. ### Utility The transfers table provides a comprehensive view of token movement across networks, enabling you to: * Track token flows between addresses * Analyze transaction volumes and patterns * Identify significant token movements * Monitor exchange and DeFi protocol activity ### Pricing Methodology > [!WARNING] > > **Important**: The USD values in `tokens_evm.transfers` are calculated using `prices_external.hour`, **not** the hybrid `prices.hour` table. The `amount_usd` column in the transfers table uses Coinpaprika-sourced pricing data exclusively, which provides: * **Stable, externally-validated pricing** from centralized exchange aggregation * **Protection against outliers** that can occur in DEX-derived pricing algorithms * **Consistent valuation** across major tokens (\~2,000 tokens with Coinpaprika coverage) This approach prevents pricing anomalies from DEX trading activity that could negatively impact aggregations and analysis on the transfers table. Tokens without Coinpaprika coverage will not have USD values populated. For more details on Dune's pricing methodology and the differences between pricing sources, see the [Prices documentation](/data-catalog/curated/prices/overview). ## Table Schema | Column | Type | Description | | - | - | - | | `unique_key` | `VARCHAR` | Surrogate key to identify unique row | | `blockchain` | `VARCHAR` | Blockchain of the transfer | | `block_month` | `DATE` | Block month (partition key) | | `block_date` | `DATE` | Block date | | `block_time` | `TIMESTAMP` | Block timestamp | | `block_number` | `BIGINT` | Block number | | `tx_hash` | `VARBINARY` | Transaction hash | | `evt_index` | `BIGINT` | Log event index of the transfer | | `trace_address` | `ARRAY(BIGINT)` | Trace address of the transfer | | `token_standard` | `VARCHAR` | Token standard (ERC20, native) | | `tx_from` | `VARBINARY` | Transaction sender | | `tx_to` | `VARBINARY` | Transaction receiver | | `tx_index` | `BIGINT` | Transaction index within the block | | `from` | `VARBINARY` | Sender of the transfer | | `to` | `VARBINARY` | Receiver of the transfer | | `contract_address` | `VARBINARY` | Token contract address | | `symbol` | `VARCHAR` | Token symbol | | `amount_raw` | `UINT256` | Raw transfer amount before decimal adjustment | | `amount` | `DOUBLE` | Transfer amount in display units | | `price_usd` | `DOUBLE` | USD price used to calculate amount_usd (from Coinpaprika) | | `amount_usd` | `DOUBLE` | USD value of the transfer | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_evm\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_evm\&table_name_t6f0df=transfers) ### Network Coverage Transfer data is available for the following EVM-compatible networks: [https://dune.com/embeds/3695907/6218008](https://dune.com/embeds/3695907/6218008) ## Sample Queries **Query recent token transfers for a specific address** This query returns the most recent token transfers (both incoming and outgoing) for a specified address: ```sql theme={null} SELECT block_time, symbol, CASE WHEN "from" = 0x5DD596C901987A2b28C38A9C1DfBf86fFFc15d77 THEN 'Outgoing' WHEN "to" = 0x5DD596C901987A2b28C38A9C1DfBf86fFFc15d77 THEN 'Incoming' END AS direction, amount, amount_usd FROM tokens_evm.transfers WHERE ("from" = 0x5DD596C901987A2b28C38A9C1DfBf86fFFc15d77 OR "to" = 0x5DD596C901987A2b28C38A9C1DfBf86fFFc15d77) AND block_time > now() - interval '30' day ORDER BY block_time DESC LIMIT 100 ``` [https://dune.com/embeds/3999506/6732340](https://dune.com/embeds/3999506/6732340) **Calculate daily transfer volume for a specific token** This query calculates the daily transfer volume for a specific ERC20 token. Please be aware that token volumes are not necessarily indicative of anything. These metrics can be misleading if the token is not well-known or if there are a lot of small transfers. Token transfers can be mints, burns, transfers, flash loans and anything in between, trying to read into the data can lead to misleading results. Note: The `amount_usd` values are calculated using Coinpaprika pricing data (`prices_external.hour`) for stable, exchange-validated pricing. ```sql theme={null} SELECT block_date, COUNT(*) AS num_transfers, SUM(amount) AS total_amount, SUM(amount_usd) AS total_amount_usd FROM tokens_evm.transfers WHERE contract_address = 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984 AND block_time > now() - interval '30' day and blockchain = 'ethereum' GROUP BY 1 ORDER BY 1 DESC ``` [https://dune.com/embeds/3999595/6732454](https://dune.com/embeds/3999595/6732454) **Identify largest transfers in the last 24 hours** This query finds the largest token transfers by USD value in the last 24 hours: Note: USD values are sourced from Coinpaprika pricing data for reliable valuation. ```sql theme={null} SELECT block_time, token_symbol, "from", "to", amount, amount_usd FROM tokens_evm.transfers WHERE block_time > now() - interval '1' day AND amount_usd IS NOT NULL ORDER BY amount_usd DESC LIMIT 50 ``` **Find the circulating supply of a token over time** This query calculates the circulating supply of a token over time by summing the amount of tokens in circulation at each time interval. Please be aware that this won't work for all tokens with non-standard transfer or minting/burning mechanisms. `tokens_evm.transfers` includes fallback ERC4626 share mint and burn rows for supported vaults, but other custom token mechanics may still require token-specific logic. ```sql theme={null} WITH tx AS ( SELECT DATE_TRUNC('hour', evt_block_time) AS event_hour, value / 1e18 AS tokens_delta FROM erc20_ethereum.evt_transfer WHERE contract_address = 0x5bae9a5d67d1ca5b09b14c91935f635cfbf3b685 AND "from" = 0x0000000000000000000000000000000000000000 UNION ALL SELECT DATE_TRUNC('hour', evt_block_time) AS event_hour, -value / 1e18 AS tokens_delta FROM erc20_ethereum.evt_transfer WHERE contract_address = 0x5bae9a5d67d1ca5b09b14c91935f635cfbf3b685 AND "to" = 0x0000000000000000000000000000000000000000 ), tx_hourly AS ( SELECT event_hour, SUM(tokens_delta) AS net_tokens FROM tx GROUP BY event_hour ORDER BY event_hour DESC ) SELECT event_hour, SUM(net_tokens) OVER (ORDER BY event_hour) AS circulating_supply FROM tx_hourly ORDER BY event_hour DESC; ``` # Multichain Token Transfers Source: https://docs.dune.com/data-catalog/curated/token-transfers/multichain/multichain-token-transfers Unified fungible token transfer activity across EVM, Solana, Aptos, Sui, Stellar, Tron, and XRPL. The `tokens_multichain.transfers` table provides a chain-agnostic view of fungible token transfer activity across EVM-compatible chains, Solana, Aptos, Sui, Stellar, Tron, and XRPL. It normalizes the most commonly used transfer fields into one schema, so you can analyze token movement across ecosystems without writing your own `UNION ALL` query over chain-specific tables. This dataset includes: * Transfer activity from EVM, Solana, Aptos, Sui, Stellar, Tron, and XRPL source models * String-based addresses and transaction identifiers for cross-ecosystem compatibility * Chain-native token identifiers through `token_address` and `token_id` * Normalized amount fields and USD values where source pricing is available > [!NOTE] > > Use this table for broad cross-chain transfer analysis. Use the chain-specific transfer tables when you need source-specific details that are not part of the normalized multichain schema. ### Utility The multichain transfers table provides a consistent view of fungible token movement across ecosystems, enabling you to: * Compare transfer volume and activity across chains * Build cross-chain wallet activity views * Track token movement by symbol, token identifier, or blockchain * Analyze transfers across EVM and non-EVM ecosystems with one query ### Methodology The `tokens_multichain.transfers` table is built as a normalized union of Dune's chain-level token transfer models: * EVM transfers from `tokens_evm.transfers` * Solana transfers from `tokens_solana.transfers` * Aptos transfers from `tokens_aptos.transfers` * Sui transfers from `tokens_sui.transfers` * Stellar transfers from `tokens_stellar.transfers` * Tron transfers from `tokens_tron.transfers` (base58 address columns) * XRPL transfers from `tokens_xrpl.transfers` Each source model keeps its own chain-specific reconstruction logic. Tron rows are sourced from `tokens_tron.transfers` rather than the EVM union so multichain addresses use Tron base58 format instead of 0x hex literals. The multichain table maps those outputs into shared columns for time, transaction identity, sender, receiver, token identity, amount, pricing, and transfer classification. Some chain-specific fields are nullable because not every ecosystem has the same concepts. For example, EVM has transaction indexes and event indexes, Solana has instruction indexes, Aptos has transaction versions, Sui has checkpoints, Stellar has ledger sequences and operation IDs, and XRPL has ledger indexes. ### Pricing Methodology The `amount_usd` column is carried through from the chain-specific source models when pricing is available. Availability varies by ecosystem and token. If a token does not have a usable USD price at the transfer time, `amount_usd` stays `NULL`. The `price_usd` column is also source-dependent. Some source models provide an hourly token price, while others only expose the final USD value. For more details on Dune's pricing methodology, see the [Prices documentation](/data-catalog/curated/prices/overview). ## Table Schema | Column | Type | Description | | - | - | - | | `unique_key` | `VARCHAR` | Surrogate key to identify a unique transfer row | | `blockchain` | `VARCHAR` | Blockchain identifier for the transfer | | `block_time` | `TIMESTAMP WITH TIME ZONE` | Block, slot, checkpoint, ledger, or transaction timestamp | | `block_date` | `DATE` | Date derived from `block_time` | | `block_month` | `DATE` | Month bucket derived from `block_time` | | `block_number` | `BIGINT` | Chain-native block or ledger number, such as EVM block number, Solana slot, Sui checkpoint, Stellar ledger sequence, or XRPL ledger index | | `tx_id` | `VARCHAR` | Chain-native transaction identifier | | `tx_sequence` | `BIGINT` | Nullable chain-native transaction sequence, such as Aptos transaction version or Stellar transaction ID | | `tx_index` | `BIGINT` | Nullable transaction index within the block or ledger unit | | `event_index` | `BIGINT` | Nullable primary event, instruction, or operation index | | `sub_event_index` | `BIGINT` | Nullable secondary event, instruction, or matched-counterpart index | | `from_address` | `VARCHAR` | Sender owner or account address | | `to_address` | `VARCHAR` | Receiver owner or account address | | `tx_signer` | `VARCHAR` | Transaction signer or sender when available | | `token_address` | `VARCHAR` | Address-like token identifier, such as an EVM contract, Solana mint, Aptos package address, Sui package address, Stellar contract ID, or XRPL issuer | | `token_id` | `VARCHAR` | Full chain-native token identifier when richer than `token_address`, such as Aptos asset type, Sui coin type, Stellar asset ID, or XRPL asset ID | | `token_symbol` | `VARCHAR` | Token symbol | | `token_standard` | `VARCHAR` | Source token standard or program label | | `amount_raw` | `UINT256` | Raw token amount before decimal adjustment | | `amount` | `DOUBLE` | Transfer amount in display units | | `price_usd` | `DOUBLE` | USD price used to calculate `amount_usd`, when provided by the source model | | `amount_usd` | `DOUBLE` | USD value of the transfer when pricing is available | | `transfer_type` | `VARCHAR` | Nullable chain-native transfer classification or action | | `_updated_at` | `TIMESTAMP` | Timestamp when this row was last written, when provided by the source model | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_multichain\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_multichain\&table_name_t6f0df=transfers) ## Sample Queries **Compare transfer activity across ecosystems** This query aggregates recent priced transfer volume by blockchain and token symbol: ```sql theme={null} SELECT block_date, blockchain, token_symbol, COUNT(*) AS num_transfers, SUM(amount_usd) AS transfer_volume_usd FROM tokens_multichain.transfers WHERE block_date >= current_date - interval '30' day AND amount_usd IS NOT NULL GROUP BY 1, 2, 3 ORDER BY block_date DESC, transfer_volume_usd DESC LIMIT 100 ``` **Query recent transfers for one address on one chain** Because addresses are stored as strings, include `blockchain` when querying a specific address so the value is interpreted in the right ecosystem: ```sql theme={null} SELECT block_time, blockchain, tx_id, token_symbol, token_id, CASE WHEN from_address = '9SUrE3EPBoXVjNywEDHSJKJdxebs8H8sLgEWdueEvnKX' THEN 'Outgoing' WHEN to_address = '9SUrE3EPBoXVjNywEDHSJKJdxebs8H8sLgEWdueEvnKX' THEN 'Incoming' END AS direction, amount, amount_usd FROM tokens_multichain.transfers WHERE blockchain = 'solana' AND ( from_address = '9SUrE3EPBoXVjNywEDHSJKJdxebs8H8sLgEWdueEvnKX' OR to_address = '9SUrE3EPBoXVjNywEDHSJKJdxebs8H8sLgEWdueEvnKX' ) AND block_date >= current_date - interval '30' day ORDER BY block_time DESC LIMIT 100 ``` **Analyze transfer categories by chain** This query compares source transfer classifications where they are available: ```sql theme={null} SELECT blockchain, COALESCE(transfer_type, 'not_applicable') AS transfer_type, COUNT(*) AS num_rows, SUM(amount_usd) AS total_amount_usd FROM tokens_multichain.transfers WHERE block_date >= current_date - interval '30' day GROUP BY 1, 2 ORDER BY num_rows DESC LIMIT 100 ``` # Token Transfers Source: https://docs.dune.com/data-catalog/curated/token-transfers/overview Comprehensive token and asset tracking across multiple blockchain networks Blockchain networks have become popular platforms for creating, managing, and trading digital assets. These assets are often represented as tokens, which can be transferred between addresses and owned by users. Dune provides comprehensive token transfer tracking capabilities across multiple blockchain networks through curated tables that simplify the process of monitoring and analyzing token transfers across EVM, Solana, Aptos, Stellar, Sui, Tron, and XRPL ecosystems. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** \~1 hour · **Chains:** All EVM chains, Solana, Aptos, Stellar, Sui, Tron, XRPL > [!NOTE] > > **Access:** the per-chain **EVM**, **Solana**, and **Tron** transfer tables are 🟢 **Public** — queryable on every Dune plan. The **multichain view** and the **non-EVM** transfer tables (Aptos, Stellar, Sui, XRPL) are 🔒 **Gated** and require an entitlement on your workspace. > > * 🟢 Public: `tokens_evm.transfers`, `tokens_solana.transfers`, `tokens_tron.transfers` > * 🔒 Gated: `tokens_multichain.transfers`, `tokens_aptos.transfers`, `tokens_stellar.transfers`, `tokens_sui.transfers`, `tokens_xrpl.transfers` > > See the [access tiers overview](/data-catalog/overview#access-tiers-public-vs-gated-datasets) or [contact the Dune team](https://dune.com/enterprise#contact-form) to enable gated access. Explore this dataset on the [token transfers data page](https://dune.com/data/transfers). > [card] [Get This Data](https://dune.com/enterprise?dataset=tokens.transfers) > > Access token transfer data via API, Datashare, or the Dune App. ## Cross-Chain Token Transfer Coverage Our token transfer data covers multiple blockchain ecosystems: * **EVM Networks**: Ethereum, Arbitrum, Polygon, Base, Optimism, and 40+ other EVM chains * **Solana**: Comprehensive coverage of SPL tokens and native SOL transfers * **Aptos**: Curated fungible asset transfers across Coin and Fungible Asset standards * **Stellar**: Unified token movement across classic Stellar operations and contract token events * **Sui**: Curated fungible token transfers reconstructed from Coin object activity and supply events * **Tron**: Curated TRC20 and native TRX transfer activity with base58 and hex address columns * **XRPL**: Unified token movement for native XRP, issued currencies, and AMM-related activity ## Available Datasets Use the chain-specific tables when you need source-level details, or the multichain view when you want one normalized schema across ecosystems. > [card] [EVM Token Transfers](/data-catalog/curated/token-transfers/evm/token-transfers) > > Transfer events for ERC20 tokens and native currencies on EVM networks > [card] [Solana Token Transfers](/data-catalog/curated/token-transfers/solana/solana-token-transfers) > > Transfer events for SPL tokens and native SOL on Solana > [card] [Aptos Token Transfers](/data-catalog/curated/token-transfers/aptos/aptos-token-transfers) > > Curated fungible token transfers across Aptos Coin and Fungible Asset standards > [card] [Stellar Token Transfers](/data-catalog/curated/token-transfers/stellar/stellar-token-transfers) > > Unified token movement across Stellar payments, issued assets, and contract token events > [card] [Sui Token Transfers](/data-catalog/curated/token-transfers/sui/sui-token-transfers) > > Curated fungible token transfers across Sui Coin object activity and supply events > [card] [XRPL Token Transfers](/data-catalog/curated/token-transfers/xrpl/xrpl-token-transfers) > > Unified token movement for native XRP, issued currencies, checks, escrows, payment channels, and AMM activity > [card] [Tron Token Transfers](/data-catalog/curated/token-transfers/tron/tron-token-transfers) > > Curated TRC20 and native TRX transfer activity on Tron ### Unified View > [card] [Multichain Transfers](/data-catalog/curated/token-transfers/multichain/multichain-token-transfers) > > Unified fungible token transfers across EVM, Solana, Aptos, Sui, Stellar, Tron, and XRPL > [!NOTE] > > Looking for token balances or metadata? See the [Balances](/data-catalog/curated/balances/overview) and [Token Metadata](/data-catalog/curated/token-metadata/overview) sections. ## Key Features * **Multi-Chain Coverage**: Track token transfers across EVM, Solana, Aptos, Stellar, Sui, Tron, and XRPL ecosystems * **Standardized Schema**: Consistent data structure for cross-chain analysis * **Transfer Analytics**: Detailed transfer events with sender, receiver, and amounts * **Real-time Updates**: Data is updated continuously as new blocks are processed ## Sample Cross-Chain Analysis Compare token transfer activity across different blockchain networks: ```sql theme={null} SELECT blockchain, DATE_TRUNC('day', block_time) AS date, COUNT(*) AS num_transfers, COUNT(DISTINCT from_address) AS unique_senders, SUM(amount_usd) AS transfer_volume_usd FROM tokens_multichain.transfers WHERE block_date >= CURRENT_DATE - INTERVAL '30' day GROUP BY 1, 2 ORDER BY date DESC, num_transfers DESC ``` These datasets enable users to perform a wide range of analyses across multiple blockchain networks, providing valuable insights into the dynamics of digital assets across various blockchain ecosystems. ## When to Use These Tables * Track token flows between wallets, contracts, and exchanges * Build wallet activity feeds and transaction history views * Monitor large transfers ("whale alerts") for market intelligence * Analyze token distribution and holder concentration over time * Power compliance workflows — identify counterparties and trace fund flows ## Query Performance **Partition keys for `tokens.transfers`:** `blockchain`, `block_date` Always include `blockchain` and `block_date` (or a `block_time` range) in your WHERE clause. For cross-ecosystem queries against `tokens_multichain.transfers`, include `blockchain` and a date filter whenever possible so filters can be pushed down to the source models. ```sql theme={null} -- ✅ Good: chain + date filter SELECT * FROM tokens.transfers WHERE blockchain = 'ethereum' AND block_date = CURRENT_DATE AND contract_address = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 -- USDC -- ❌ Slow: no partition filters SELECT * FROM tokens.transfers WHERE "from" = 0x... ``` ## Methodology Token transfer tables are maintained by Dune. Each ecosystem has its own source table and normalization logic: * **EVM**: Decodes ERC-20 `Transfer` events and native token transfers into `tokens.transfers`. * **Solana**: Handles SPL token and native SOL transfers in `tokens_solana.transfers`. * **Aptos**: Reconstructs transfers from Coin and Fungible Asset deposit/withdraw activity in `tokens_aptos.transfers`. * **Stellar**: Exposes a unified event stream for transfers, mints, burns, clawbacks, and fees across classic and contract-based activity in `tokens_stellar.transfers`. * **Sui**: Reconstructs fungible token movement from Coin object activity and treasury supply events in `tokens_sui.transfers`. * **XRPL**: Normalizes native XRP, issued currency, and AMM-related token movement in `tokens_xrpl.transfers`. * **Tron**: Combines TRC20 `Transfer` events and native TRX transaction value in `tokens_tron.transfers`. The `tokens_multichain.transfers` view combines EVM, Solana, Aptos, Sui, Stellar, Tron, and XRPL transfers into one cross-ecosystem schema for broad analysis. ## Example Queries **Top tokens by transfer volume on Ethereum (today):** ```sql theme={null} SELECT contract_address, symbol, SUM(amount_usd) AS total_volume_usd, COUNT(*) AS num_transfers FROM tokens.transfers WHERE blockchain = 'ethereum' AND block_date = CURRENT_DATE GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 20 ``` **Large USDC transfers (>\$1M) in the last 24 hours:** ```sql theme={null} SELECT block_time, "from", "to", amount, amount_usd FROM tokens.transfers WHERE blockchain = 'ethereum' AND block_date >= CURRENT_DATE - INTERVAL '1' DAY AND contract_address = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 AND amount_usd > 1000000 ORDER BY amount_usd DESC ``` > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom transfer datasets or dedicated support? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private token flow analytics with the dbt Connector. # Solana Token Transfers Source: https://docs.dune.com/data-catalog/curated/token-transfers/solana/solana-token-transfers Token transfer events on the Solana blockchain. The `tokens_solana.transfers` table contains token transfer events for tokens on the Solana blockchain indexed by Dune. This dataset encompasses: * SPL token transfers * token2022 token transfers * native SOL transfers (excluding staking-related transfers) > [!NOTE] > > The transfers table aims to capture standard Solana token transfers. Some tokens may use non-standard transfer methods that might not be included. ### Utility The Solana transfers table provides a comprehensive view of token movement on Solana, enabling you to: * Track token flows between addresses * Analyze transaction volumes and patterns * Identify significant token movements * Monitor exchange and DeFi protocol activity on Solana The table contains columns for block information, transfer details, token addresses, account addresses, and transaction metadata. ## Table Schema | Column | Type | Description | | - | - | - | | `block_time` | `TIMESTAMP` | Block timestamp | | `action` | `VARCHAR` | Transfer action type (transfer, mintTo, burn, etc.) | | `amount` | `UINT256` | Raw transfer amount | | `from_token_account` | `VARCHAR` | Source token account address | | `to_token_account` | `VARCHAR` | Destination token account address | | `token_mint_address` | `VARCHAR` | Token mint address | | `symbol` | `VARCHAR` | Token symbol | | `amount_display` | `DOUBLE` | Transfer amount in display units | | `amount_usd` | `DOUBLE` | USD value of the transfer | | `from_owner` | `VARCHAR` | Owner of the source token account | | `to_owner` | `VARCHAR` | Owner of the destination token account | | `token_version` | `VARCHAR` | Token program version (spl_token, token2022) | | `tx_id` | `VARCHAR` | Transaction ID | | `tx_signer` | `VARCHAR` | Transaction signer | | `outer_executing_account` | `VARCHAR` | Outer executing program account | | `block_date` | `DATE` | Block date | | `block_slot` | `BIGINT` | Block slot number | | `tx_index` | `INTEGER` | Transaction index within the block | | `outer_instruction_index` | `INTEGER` | Outer instruction index | | `inner_instruction_index` | `INTEGER` | Inner instruction index | | `unique_instruction_key` | `DECIMAL` | Unique instruction identifier | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_solana\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_solana\&table_name_t6f0df=transfers) ## Sample Queries **Query recent token transfers for a specific address** This query returns the most recent token transfers (both incoming and outgoing) for a specified address: ```sql theme={null} SELECT block_time, action, CASE WHEN from_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' THEN 'Outgoing' WHEN to_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' THEN 'Incoming' END AS direction, amount, amount_usd, token_mint_address, token_version FROM tokens_solana.transfers WHERE (from_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ' OR to_owner = '7F9KJm6rcW2PAgUkRmqXhzMmUpxWcQcLFjarE4bwniqZ') AND block_time > now() - interval '30' day ORDER BY block_time DESC LIMIT 100 ``` # Stellar Token Transfers Source: https://docs.dune.com/data-catalog/curated/token-transfers/stellar/stellar-token-transfers Unified token transfer activity for native, issued, and contract-based assets on Stellar. The `tokens_stellar.transfers` table contains token movement data for Stellar assets indexed on Dune. It brings native XLM, issued assets, and contract token activity into one table using a unified event model. This dataset includes: * Standard transfers between accounts, contracts, and other Stellar entities * Mint, burn, clawback, and fee events in the same token-movement stream * Coverage across classic Stellar operations and contract token activity * Asset identifiers for native, issued, and contract-linked assets > [!NOTE] > > This table represents unified token movement on Stellar, not just payment operations. It also includes system-level activity such as fees, mints, burns, and clawbacks, so exclude those if you want to focus only on regular user-to-user transfers. ### Utility The Stellar transfers table provides a consistent view of token movement on Stellar, enabling you to: * Track token flows between wallets, issuers, and contracts * Analyze transfer activity by asset, operation type, and day * Separate regular transfers from mint, burn, clawback, and fee activity * Compare classic Stellar operations with contract token events ### Methodology According to the official Stellar docs, token transfers are standardized through [CAP-67](https://stellar.org/protocol/cap-67) unified events and the [Token Transfer Processor (TTP)](https://developers.stellar.org/docs/data/indexers/build-your-own/processors/token-transfer-processor), which derives token movement from ledger data across both classic operations and contract-based activity. The `tokens_stellar.transfers` table is built around that event model: * It standardizes token movement into a shared set of event topics: `transfer`, `mint`, `burn`, `clawback`, and `fee`. * It captures activity from classic Stellar operations such as payments, path payments, DEX offer execution, claimable balances, liquidity pool actions, account merges, and clawbacks. * It also includes contract token events, where `is_soroban = true` and `event_type` is commonly `invoke_host_function`. * `event_type` shows the originating operation or execution path, while `event_topic` shows the normalized token-movement category. * `contract_id` is populated on every event as the standardized asset identifier used across native, issued, and contract tokens. Because fee events are part of the same stream, not every row has both a sender and receiver. For example, fee rows usually have a `from` account but no `to` account. The `from` and `to` columns can contain multiple Stellar address types. The prefix identifies the entity type, so you may see `G...` accounts, `C...` contracts, `B...` claimable balances, and `L...` liquidity pools. ## Table Schema | Column | Type | Description | | - | - | - | | `unique_key` | `VARCHAR` | Surrogate key to identify a unique transfer row | | `blockchain` | `VARCHAR` | Blockchain name; always `stellar` | | `block_month` | `DATE` | Month of the ledger close time | | `block_date` | `DATE` | Date of the ledger close time | | `block_time` | `TIMESTAMP` | Ledger close timestamp | | `ledger_sequence` | `BIGINT` | Ledger sequence number | | `transaction_hash` | `VARBINARY` | Hex-encoded transaction hash | | `transaction_id` | `BIGINT` | Unique transaction identifier | | `operation_id` | `BIGINT` | Operation identifier; `NULL` for Soroban events | | `token_standard` | `VARCHAR` | Token standard label: `native`, `classic`, or `soroban` | | `from` | `VARCHAR` | Source address for the token movement; may be an account, contract, claimable balance, or liquidity pool | | `to` | `VARCHAR` | Destination address for the token movement; may be an account, contract, claimable balance, or liquidity pool | | `to_muxed` | `VARCHAR` | Multiplexed destination account when present | | `to_muxed_id` | `VARCHAR` | Multiplexed destination account ID when present | | `contract_id` | `VARCHAR` | Standardized contract identifier for the asset on every event | | `asset` | `VARCHAR` | Asset identifier; for issued assets this is typically `asset_code:asset_issuer` | | `asset_type` | `VARCHAR` | Stellar asset type such as `native`, `credit_alphanum4`, `credit_alphanum12`, or `soroban` | | `asset_code` | `VARCHAR` | Asset code for protocol-issued, non-contract assets when applicable | | `asset_issuer` | `VARCHAR` | Issuer address for protocol-issued, non-contract assets when applicable | | `symbol` | `VARCHAR` | Token symbol | | `decimals` | `INTEGER` | Number of decimals used to scale `amount_raw` | | `amount_raw` | `DOUBLE` | Raw token amount in base units | | `amount` | `DOUBLE` | Normalized token amount | | `price_usd` | `DOUBLE` | USD price used to calculate `amount_usd`; populated for native XLM pricing | | `amount_usd` | `DOUBLE` | USD value of the transfer; populated for native XLM pricing | | `event_topic` | `VARCHAR` | Normalized token event category: `transfer`, `mint`, `burn`, `clawback`, or `fee` | | `event_type` | `VARCHAR` | Underlying Stellar operation or execution type that produced the event | | `is_soroban` | `BOOLEAN` | Whether the event came from contract token activity | | `_updated_at` | `TIMESTAMP WITH TIME ZONE` | Timestamp when the curated row was last written | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_stellar\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_stellar\&table_name_t6f0df=transfers) ## Sample Queries **Query token movement for a specific Stellar address** This query returns incoming and outgoing token events with populated normalized amounts for a wallet during a historical window: ```sql theme={null} SELECT block_time, transaction_hash, asset, event_topic, event_type, CASE WHEN "from" = 'GAUA7XL5K54CC2DDGP77FJ2YBHRJLT36CPZDXWPM6MP7MANOGG77PNJU' THEN 'Outgoing' WHEN "to" = 'GAUA7XL5K54CC2DDGP77FJ2YBHRJLT36CPZDXWPM6MP7MANOGG77PNJU' THEN 'Incoming' END AS direction, amount FROM tokens_stellar.transfers WHERE ( "from" = 'GAUA7XL5K54CC2DDGP77FJ2YBHRJLT36CPZDXWPM6MP7MANOGG77PNJU' OR "to" = 'GAUA7XL5K54CC2DDGP77FJ2YBHRJLT36CPZDXWPM6MP7MANOGG77PNJU' ) AND event_topic <> 'fee' AND block_time >= TIMESTAMP '2025-11-24 00:00:00 UTC' AND block_time < TIMESTAMP '2025-12-01 00:00:00 UTC' ORDER BY block_time DESC LIMIT 100 ``` **Calculate daily transfer volume for a specific Stellar asset** This query aggregates daily transfer activity for issued USDC during a historical window: ```sql theme={null} SELECT date_trunc('day', block_time) AS day, asset, COUNT(*) AS num_rows, SUM(amount) AS total_amount FROM tokens_stellar.transfers WHERE asset = 'USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN' AND event_topic = 'transfer' AND block_time >= TIMESTAMP '2025-11-01 00:00:00 UTC' AND block_time < TIMESTAMP '2025-12-01 00:00:00 UTC' GROUP BY 1, 2 ORDER BY 1 DESC ``` **Split Stellar token activity by event category and source** This query helps distinguish transfers from mints, burns, clawbacks, and fees, while also separating classic and contract-based activity during a historical window with populated normalized amounts: ```sql theme={null} SELECT date_trunc('day', block_time) AS day, event_topic, COALESCE(CAST(is_soroban AS VARCHAR), 'false') AS soroban_flag, COUNT(*) AS num_rows, SUM(amount) AS total_amount FROM tokens_stellar.transfers WHERE block_time >= TIMESTAMP '2025-11-01 00:00:00 UTC' AND block_time < TIMESTAMP '2025-12-01 00:00:00 UTC' AND asset = 'native' GROUP BY 1, 2, 3 ORDER BY 1 DESC, 2, 3 ``` # Sui Token Transfers Source: https://docs.dune.com/data-catalog/curated/token-transfers/sui/sui-token-transfers Curated and enriched fungible token transfer activity on the Sui blockchain. The `tokens_sui.transfers` table contains curated fungible token transfer activity for Sui `Coin` assets indexed on Dune. Because Sui is object-based, the table reconstructs token movement from coin-object ownership and balance changes, then combines that with explicit mint and burn supply events. This dataset includes: * Cross-address transfer rows derived from `Coin` object ownership and balance deltas * Event-native mint and burn rows derived from Sui treasury events * Metadata enrichment for symbol and decimals * USD valuation when an hourly USD price is available for the token > [!NOTE] > > The table aims to capture standard Sui `Coin` transfer activity. Because Sui transfers are object-based, some rows represent balance adjustments caused by coin object ownership changes rather than a direct transfer between two addresses. ### Utility The Sui transfers table provides a consistent view of fungible token movement on Sui, enabling you to: * Track wallet-to-wallet coin movement across Sui addresses * Analyze transfer volume by coin, wallet, and day * Separate regular transfers from mint and burn activity * Investigate object-based balance changes and supply updates in one table ### Methodology Sui token movement is modeled differently than EVM and Aptos transfers. The official Sui docs describe Sui as an object-based chain, and fungible assets using the Coin standard are represented as `Coin` objects. The same docs also note that minting and burning require the token's `TreasuryCap`. Dune's Sui transfers model aligns to that design and reconstructs transfer rows from `Coin` object history plus treasury supply events. The `tokens_sui.transfers` table is built as follows: * It starts from Sui `Coin` object lifecycle and owner-net transfer models, keeping non-zero balance changes and ownership changes. * Cross-address transfers are reconstructed from object ownership changes and balance deltas, including transfers with and without balance changes. * Event-native treasury mint and burn rows are added from supply events, and overlapping legacy object rows are removed when those event-native supply rows exist. * Symbol and decimals are enriched from Sui coin metadata in `sui_coin_info`. * `amount_usd` is calculated from hourly Sui token pricing when a price is available for that hour. ### Pricing Methodology The `price_usd` and `amount_usd` columns come from Dune's external hourly price feed for Sui tokens. If a token has a price for that hour, the transfer row gets a USD price and value. If not, both columns stay `NULL`. This approach is meant to keep transfer valuations stable and avoid obvious outliers from thin or noisy onchain pricing. For tokens outside Dune's trusted token set, very large computed USD values are set to `NULL` instead of being shown. For more details on Dune's pricing methodology, see the [Prices documentation](/data-catalog/curated/prices/overview). ## Table Schema | Column | Type | Description | | - | - | - | | `unique_key` | `VARCHAR` | Surrogate key to identify a unique transfer row | | `blockchain` | `VARCHAR` | Blockchain identifier (`sui`) | | `block_month` | `DATE` | Month bucket derived from `block_time` | | `block_date` | `DATE` | Block date | | `block_time` | `TIMESTAMP` | Block timestamp | | `checkpoint` | `DECIMAL(20,0)` | Sui checkpoint number | | `tx_digest` | `VARCHAR` | Sui transaction digest | | `token_standard` | `VARCHAR` | Token standard label for the transfer record | | `from` | `VARBINARY` | Transfer sender address | | `to` | `VARBINARY` | Transfer receiver address | | `contract_address` | `VARBINARY` | Package address extracted from `coin_type` | | `coin_type` | `VARCHAR` | Full Sui coin type | | `symbol` | `VARCHAR` | Token symbol from Sui coin metadata | | `decimals` | `INTEGER` | Display decimals from Sui coin metadata | | `amount_raw` | `DECIMAL(38,0)` | Raw token amount before decimal adjustment | | `amount` | `DOUBLE` | Transfer amount in display units | | `price_usd` | `DOUBLE` | Hourly USD price used to calculate `amount_usd` | | `amount_usd` | `DOUBLE` | USD value of the transfer | | `balance_delta` | `DECIMAL(38,0)` | Signed balance change associated with the transfer row | | `object_id` | `VARBINARY` | Sui coin object identifier when applicable | | `version` | `DECIMAL(20,0)` | Coin object version when applicable | | `object_status` | `VARCHAR` | Object lifecycle status for the coin object row | | `owner_type` | `VARCHAR` | Sui owner type associated with the row | | `coin_balance` | `DECIMAL(38,0)` | Coin object balance at this version | | `prev_balance` | `DECIMAL(38,0)` | Previous observed balance for the same object | | `prev_owner` | `VARBINARY` | Previous observed owner for the same object | | `has_ownership_change` | `BOOLEAN` | Whether ownership changed between consecutive object versions | | `transfer_type` | `VARCHAR` | Transfer label describing the row's reconstruction path | | `is_supply_event` | `BOOLEAN` | True for event-native mint/burn rows | | `supply_event_type` | `VARCHAR` | Mint/burn label for supply-event rows | | `transfer_direction` | `VARCHAR` | Direction label derived from the balance movement | | `_updated_at` | `TIMESTAMP` | Timestamp when this row was last written | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_sui\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_sui\&table_name_t6f0df=transfers) ## Sample Queries **Query recent priced token transfers for a specific Sui address** This query returns the most recent incoming and outgoing token transfers for a wallet where USD pricing is available: ```sql theme={null} SELECT block_time, tx_digest, symbol, transfer_type, CASE WHEN "from" = 0xd3ae6e1c897c97a5a50c696227dfea5719ddaaa5450cb70e35ff78339a173445 THEN 'Outgoing' WHEN "to" = 0xd3ae6e1c897c97a5a50c696227dfea5719ddaaa5450cb70e35ff78339a173445 THEN 'Incoming' END AS direction, amount, amount_usd FROM tokens_sui.transfers WHERE ( "from" = 0xd3ae6e1c897c97a5a50c696227dfea5719ddaaa5450cb70e35ff78339a173445 OR "to" = 0xd3ae6e1c897c97a5a50c696227dfea5719ddaaa5450cb70e35ff78339a173445 ) AND amount_usd IS NOT NULL AND block_time > now() - interval '30' day ORDER BY block_time DESC LIMIT 100 ``` **Calculate daily transfer volume for a specific Sui coin** This query aggregates daily transfer activity for one Sui coin type: ```sql theme={null} SELECT block_date, symbol, COUNT(*) AS num_rows, SUM(amount) AS total_amount, SUM(amount_usd) AS total_amount_usd FROM tokens_sui.transfers WHERE coin_type = '0x2::sui::SUI' AND is_supply_event = false AND block_date >= current_date - interval '30' day GROUP BY 1, 2 ORDER BY 1 DESC ``` **Query recent mint and burn events for a Sui coin** This query returns recent supply-changing events for a Sui coin with active mint and burn activity: ```sql theme={null} SELECT block_time, tx_digest, symbol, supply_event_type AS flow_type, amount, amount_usd FROM tokens_sui.transfers WHERE coin_type = '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::usdc' AND is_supply_event = true AND block_time > now() - interval '30' day ORDER BY block_time DESC LIMIT 100 ``` # Tron Token Transfers Source: https://docs.dune.com/data-catalog/curated/token-transfers/tron/tron-token-transfers Curated and enriched fungible token transfer activity on the Tron blockchain. The `tokens_tron.transfers` table contains curated fungible token transfer activity for Tron assets indexed on Dune. This dataset encompasses: * TRC20 token transfers decoded from `Transfer` event logs * Native TRX transfers from successful transactions with non-zero value > [!NOTE] > > The table aims to capture standard Tron fungible token movement. Some TRC20 tokens use non-standard transfer patterns that may not appear here. For raw TRC20 event logs without enrichment, see [TRC20 Transfers](/data-catalog/tron/tokens/transfers/erc20-transfers). ### Utility The Tron transfers table provides a consistent view of fungible token movement on Tron, enabling you to: * Track token flows between wallets, contracts, and exchanges * Analyze transfer volume by token, address, and day * Monitor large stablecoin movements such as USDT * Build wallet activity feeds with both base58 and hex address columns ### Methodology The `tokens_tron.transfers` table is built from two source paths: * **TRC20 transfers** — decoded from `erc20_tron.evt_Transfer` and joined to `tron.transactions` for transaction context * **Native TRX transfers** — successful `tron.transactions` rows with `value > 0` Each row is enriched with token symbol and decimals from `tokens.erc20`, then priced from `prices_external.hour`. The table exposes both `VARBINARY` (0x) and `VARCHAR` (base58) representations for addresses and transaction hashes via the `*_varchar` columns. > [!NOTE] > > In `tokens_multichain.transfers`, Tron rows use the base58 `*_varchar` address columns from this table rather than 0x hex casts from the EVM union. ### Pricing Methodology The `price_usd` and `amount_usd` columns come from Dune's external hourly price feed (`prices_external.hour`). If a token has a price for that hour, the transfer row gets a USD price and value. If not, both columns stay `NULL`. For tokens outside Dune's trusted token set, very large computed USD values are set to `NULL` to avoid inflated outlier prices. For more details on Dune's pricing methodology, see the [Prices documentation](/data-catalog/curated/prices/overview). ## Table Schema | Column | Type | Description | | - | - | - | | `unique_key` | `VARCHAR` | Surrogate key to identify a unique transfer row | | `blockchain` | `VARCHAR` | Blockchain identifier (`tron`) | | `block_month` | `DATE` | Month bucket derived from `block_time` (partition key) | | `block_date` | `DATE` | Block date | | `block_time` | `TIMESTAMP` | Block timestamp | | `block_number` | `BIGINT` | Block number | | `tx_hash` | `VARBINARY` | Transaction hash (0x) | | `evt_index` | `BIGINT` | Log event index for TRC20 transfers; `NULL` for native TRX | | `trace_address` | `ARRAY(BIGINT)` | Trace address; currently `NULL` for Tron transfers | | `token_standard` | `VARCHAR` | Token standard (`trc20` or `native`) | | `tx_from` | `VARBINARY` | Transaction sender (0x) | | `tx_to` | `VARBINARY` | Transaction receiver (0x) | | `tx_index` | `BIGINT` | Transaction index within the block | | `from` | `VARBINARY` | Transfer sender (0x) | | `to` | `VARBINARY` | Transfer receiver (0x) | | `contract_address` | `VARBINARY` | Token contract address for TRC20; native TRX token address for TRX rows (0x) | | `tx_hash_varchar` | `VARCHAR` | Transaction hash (base58) | | `contract_address_varchar` | `VARCHAR` | Token contract address (base58) | | `from_varchar` | `VARCHAR` | Transfer sender (base58) | | `to_varchar` | `VARCHAR` | Transfer receiver (base58) | | `tx_from_varchar` | `VARCHAR` | Transaction sender (base58) | | `tx_to_varchar` | `VARCHAR` | Transaction receiver (base58) | | `symbol` | `VARCHAR` | Token symbol | | `amount_raw` | `UINT256` | Raw transfer amount before decimal adjustment | | `amount` | `DOUBLE` | Transfer amount in display units | | `price_usd` | `DOUBLE` | Hourly USD price used to calculate `amount_usd` | | `amount_usd` | `DOUBLE` | USD value of the transfer | | `_updated_at` | `TIMESTAMP` | Timestamp when this row was last written | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_tron\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_tron\&table_name_t6f0df=transfers) ## Query Performance **Partition key:** `block_month` Always include `block_date` or `block_month` in your `WHERE` clause for partition pruning. ```sql theme={null} -- ✅ Good: date filter on partition column SELECT * FROM tokens_tron.transfers WHERE block_date >= CURRENT_DATE - INTERVAL '7' DAY AND contract_address_varchar = 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t' -- USDT -- ❌ Slow: no partition filters SELECT * FROM tokens_tron.transfers WHERE from_varchar = 'T...' ``` ## Sample Queries **Query recent token transfers for a specific Tron address** This query returns the most recent incoming and outgoing transfers for a wallet using base58 address columns: ```sql theme={null} SELECT block_time, token_standard, symbol, CASE WHEN from_varchar = 'TYPF789fwTYPSbkahd51QbPkY3N3n9XHm' THEN 'Outgoing' WHEN to_varchar = 'TYPF789fwTYPSbkahd51QbPkY3N3n9XHm' THEN 'Incoming' END AS direction, amount, amount_usd, contract_address_varchar FROM tokens_tron.transfers WHERE ( from_varchar = 'TYPF789fwTYPSbkahd51QbPkY3N3n9XHm' OR to_varchar = 'TYPF789fwTYPSbkahd51QbPkY3N3n9XHm' ) AND block_date >= CURRENT_DATE - INTERVAL '30' DAY ORDER BY block_time DESC LIMIT 100 ``` **Calculate daily USDT transfer volume on Tron** This query aggregates daily transfer activity for USDT, the dominant Tron token: ```sql theme={null} SELECT block_date, COUNT(*) AS num_transfers, COUNT(DISTINCT from_varchar) AS unique_senders, SUM(amount_usd) AS transfer_volume_usd FROM tokens_tron.transfers WHERE contract_address_varchar = 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t' AND block_date >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY 1 ORDER BY 1 DESC ``` **Split TRC20 and native TRX transfer activity** This query compares transfer counts and volume by token standard: ```sql theme={null} SELECT block_date, token_standard, COUNT(*) AS num_transfers, SUM(amount_usd) AS transfer_volume_usd FROM tokens_tron.transfers WHERE block_date >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY 1, 2 ORDER BY 1 DESC, 2 ``` ## Related Tables * [TRC20 Transfers](/data-catalog/tron/tokens/transfers/erc20-transfers) — raw TRC20 `Transfer` event logs * [USDT on Tron](/data-catalog/tron/tether) — decoded Tether contract events * [Stablecoin Transfers (Tron)](/data-catalog/curated/stablecoins/transfers/stablecoins-tron-transfers) — stablecoin-only subset with issuer metadata # XRPL Token Transfers Source: https://docs.dune.com/data-catalog/curated/token-transfers/xrpl/xrpl-token-transfers Unified token transfer activity for native XRP, issued currencies, and AMM-related token movement on XRP Ledger. The `tokens_xrpl.transfers` table contains token movement data for XRP Ledger assets indexed on Dune. It brings native XRP transfers, issued currency payments, checks, escrows, payment channel claims, and AMM-related token movement into one curated table. This dataset includes: * Native XRP and issued currency transfer rows * Payment, check, escrow, payment channel, AMM deposit, and AMM withdraw activity * Asset identifiers using `xrpl_asset_id`, issuer, currency, and currency hex fields * USD valuation when an hourly USD price is available for the asset > [!NOTE] > > This table represents token movement on XRP Ledger, not just simple `Payment` transactions. It also includes AMM liquidity movements and other transaction types that move XRP or issued currencies, so filter by `transfer_type` or `transaction_type` when you need a narrower view. ### Utility The XRPL transfers table provides a consistent view of token movement on XRP Ledger, enabling you to: * Track flows of XRP and issued currencies between XRPL accounts * Analyze transfer activity by asset, issuer, transaction type, and day * Separate regular payments from checks, escrows, payment channels, and AMM liquidity activity * Monitor partial payments and transaction results alongside the normalized transfer amount ### Methodology According to the official XRP Ledger docs, [fungible assets](https://xrpl.org/docs/concepts/tokens/fungible-tokens) include native XRP and issued currencies held through trust lines, while [`Payment`](https://xrpl.org/docs/references/protocol/transactions/types/payment) transactions can deliver XRP or issued currencies and may also use partial payment semantics. XRPL also has protocol-native checks, escrows, payment channels, and AMM deposit and withdraw transactions that can move assets. The `tokens_xrpl.transfers` table is built around those XRPL transaction semantics: * It keeps successful XRPL transactions that produce token movement, including `Payment`, `CheckCash`, `EscrowFinish`, `PaymentChannelClaim`, `AMMDeposit`, and `AMMWithdraw`. * It normalizes native XRP and issued currencies into a shared transfer schema with `from`, `to`, `issuer`, `currency`, `symbol`, and `xrpl_asset_id`. * It labels each row with both the underlying `transaction_type` and a normalized `transfer_type`, such as `payment`, `check_cash`, `escrow_finish`, `payment_channel_claim`, `amm_deposit`, `amm_withdraw`, `amm_lp_mint`, and `amm_lp_burn`. * It carries `partial_payment_flag` for XRPL `Payment` rows where partial payment semantics apply. * Native XRP uses 6 decimals; issued currencies may not have a decimal value populated because XRPL issued currencies use their own decimal representation. ### Pricing Methodology The `price_usd` and `amount_usd` columns come from Dune's external hourly price feed for XRPL assets. If an asset has a price for that hour, the transfer row gets a USD price and value. If not, both columns stay `NULL`. For more details on Dune's pricing methodology, see the [Prices documentation](/data-catalog/curated/prices/overview). ## Table Schema | Column | Type | Description | | - | - | - | | `unique_key` | `VARCHAR` | Surrogate key to identify a unique transfer row | | `blockchain` | `VARCHAR` | Blockchain name; always `xrpl` | | `block_month` | `DATE` | Month of the ledger close time | | `block_date` | `DATE` | Date of the ledger close time | | `block_time` | `TIMESTAMP WITH TIME ZONE` | Ledger close timestamp | | `block_number` | `BIGINT` | XRPL ledger index | | `tx_hash` | `VARCHAR` | Transaction hash | | `token_standard` | `VARCHAR` | Token standard label, such as `native` or `issued` | | `tx_from` | `VARCHAR` | Account that submitted the transaction | | `tx_to` | `VARCHAR` | Destination account from the transaction when available | | `tx_index` | `BIGINT` | Transaction index within the ledger | | `from` | `VARCHAR` | Source account for the token movement | | `to` | `VARCHAR` | Destination account for the token movement | | `xrpl_asset_id` | `VARCHAR` | Dune asset identifier for the XRPL asset | | `issuer` | `VARCHAR` | Issuer account for issued currencies; native XRP uses the native XRP identifier | | `currency` | `VARCHAR` | XRPL currency code or native XRP symbol | | `currency_hex` | `VARCHAR` | Hex-encoded currency code when applicable | | `symbol` | `VARCHAR` | Display symbol for the asset | | `decimals` | `INTEGER` | Number of decimals used to scale `amount_raw` when available | | `amount_raw` | `DOUBLE` | Raw amount from the XRPL transfer representation | | `amount` | `DOUBLE` | Normalized transfer amount | | `price_usd` | `DOUBLE` | Hourly USD price used to calculate `amount_usd` | | `amount_usd` | `DOUBLE` | USD value of the transfer | | `transfer_type` | `VARCHAR` | Normalized transfer category | | `transaction_type` | `VARCHAR` | Underlying XRPL transaction type | | `transaction_result` | `VARCHAR` | XRPL transaction result code | | `partial_payment_flag` | `BOOLEAN` | Whether the transaction used XRPL partial payment semantics | | `_updated_at` | `TIMESTAMP WITH TIME ZONE` | Timestamp when the curated row was last written | [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_xrpl\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tokens_xrpl\&table_name_t6f0df=transfers) ## Sample Queries **Query token movement for a specific XRPL account** This query returns recent incoming and outgoing token transfers for an XRPL account: ```sql theme={null} SELECT block_time, tx_hash, symbol, transfer_type, transaction_type, CASE WHEN "from" = 'r3CUuqXukpx393PvgP6Cn2z3kx5vPmesWf' THEN 'Outgoing' WHEN "to" = 'r3CUuqXukpx393PvgP6Cn2z3kx5vPmesWf' THEN 'Incoming' END AS direction, amount, amount_usd FROM tokens_xrpl.transfers WHERE ( "from" = 'r3CUuqXukpx393PvgP6Cn2z3kx5vPmesWf' OR "to" = 'r3CUuqXukpx393PvgP6Cn2z3kx5vPmesWf' ) AND block_date >= current_date - interval '30' day ORDER BY block_time DESC LIMIT 100 ``` **Calculate daily transfer volume for native XRP** This query aggregates recent native XRP transfer activity: ```sql theme={null} SELECT block_date, symbol, COUNT(*) AS num_rows, SUM(amount) AS total_amount, SUM(amount_usd) AS total_amount_usd FROM tokens_xrpl.transfers WHERE xrpl_asset_id = 'xrp' AND block_date >= current_date - interval '30' day GROUP BY 1, 2 ORDER BY 1 DESC ``` **Split XRPL activity by transfer type** This query separates regular payments from checks, escrows, payment channels, and AMM activity: ```sql theme={null} SELECT block_date, transfer_type, transaction_type, COUNT(*) AS num_rows, SUM(amount) AS total_amount, SUM(amount_usd) AS total_amount_usd FROM tokens_xrpl.transfers WHERE block_date >= current_date - interval '30' day GROUP BY 1, 2, 3 ORDER BY 1 DESC, 4 DESC ``` # utils.days Source: https://docs.dune.com/data-catalog/curated/utilities/days Calendar date scaffold — one row per day for time-series joins and aggregation windows. The `utils.days` table contains one row per day from January 3, 2009 (Bitcoin genesis) to the current date. Use it to fill gaps in daily time-series data. ## Table Schema | Column | Type | Description | | - | - | - | | `timestamp` | `TIMESTAMP` | Day timestamp (one row per day from Bitcoin genesis to today) | ## Table sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=utils\&table_name_t6f0df=days](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=utils\&table_name_t6f0df=days) # Utilities Source: https://docs.dune.com/data-catalog/curated/utilities/overview Time-series scaffolding tables for blockchain analytics on Dune Dune's utility tables provide time-series scaffolding — pre-built tables of timestamps at different granularities from Bitcoin genesis (January 3, 2009) to the current date. They are essential for creating continuous time axes in queries and dashboards. > [!NOTE] > > **Maintained by:** Dune · **Refresh:** N/A · **Coverage:** Universal (no chain-specific data) > [card] [Get This Data](https://dune.com/enterprise?dataset=utilities) > > Access utility tables via API, Datashare, or the Dune App. ## Available Tables | Table | Granularity | | - | - | | `utils.days` | One row per day | | `utils.hours` | One row per hour | | `utils.minutes` | One row per minute | | `utils.weeks` | One row per week | | `utils.months` | One row per month | | `utils.quarters` | One row per quarter | | `utils.years` | One row per year | All tables have a single column: `timestamp` (type: `timestamp(3) with time zone`), spanning from January 3, 2009 (Bitcoin genesis) to the current date. ## When to Use These Tables * Fill gaps in time-series data (ensure every day/hour has a row, even with zero activity) * Generate date ranges for analysis windows * Build continuous time axes for dashboard charts * Create calendar-based aggregations ## Example Queries **Fill gaps in daily DEX volume (ensures every day appears):** ```sql theme={null} SELECT d.timestamp AS day, COALESCE(SUM(t.amount_usd), 0) AS daily_volume FROM utils.days d LEFT JOIN dex.trades t ON date_trunc('day', t.block_time) = d.timestamp AND t.blockchain = 'ethereum' WHERE d.timestamp >= DATE '2025-01-01' AND d.timestamp < CURRENT_DATE GROUP BY 1 ORDER BY 1 ``` **Hourly gas fee analysis with no gaps:** ```sql theme={null} SELECT h.timestamp AS hour, COALESCE(AVG(g.tx_fee_usd), 0) AS avg_fee_usd, COALESCE(COUNT(g.tx_hash), 0) AS num_transactions FROM utils.hours h LEFT JOIN gas.fees g ON date_trunc('hour', g.block_time) = h.timestamp AND g.blockchain = 'ethereum' WHERE h.timestamp >= NOW() - INTERVAL '48' HOUR GROUP BY 1 ORDER BY 1 ``` > [card] [Enterprise Data Solutions](https://dune.com/enterprise) > > Need custom time-series utilities? Talk to our enterprise team. > [card] [Build Custom Models](/api-reference/connectors/overview) > > Build private analytics pipelines with the dbt Connector. # Vaults Source: https://docs.dune.com/data-catalog/curated/vaults/overview Vault protocol data across lending, liquid staking, and DeFi yield strategies Vault protocols enable users to deposit assets into strategies that dynamically allocate capital across lending markets, staking, and yield opportunities. Dune provides access to decoded on-chain event data for vault-level activity including deposits, withdrawals, interest accrual, reallocation, and liquidations. > [card] [Get This Data](https://dune.com/enterprise?dataset=vaults) > > Access decoded vault tables via SQL in the Dune App, API, or Datashare. | | | | - | - | | **Protocols** | Morpho, Euler (v1 & v2), Aave v3, Fluid, Kamino (Solana), Lido (liquid staking) | | **Chains** | Ethereum, Base, Arbitrum, Polygon, BNB, Solana, and others (coverage varies by protocol) | | **Data available** | Deposits & withdrawals · Interest accrual & yield signals · Liquidations & risk events · Vault reallocation / strategy activity · User-level interactions | | **Data format** | ABI-decoded event & call tables (protocol-specific schemas) · Accessible via SQL, API, or Datashare | | **Best for** | Vault flows & TVL estimation · Yield strategy analysis · Cross-protocol comparisons (with custom logic) · Risk / liquidation monitoring | > [!NOTE] > > **No unified dataset yet.** Vault analysis currently requires protocol-specific logic using decoded event tables. A curated `vaults.*` dataset is on the roadmap. [Contact our enterprise team](https://dune.com/enterprise) to request priority access or share your use case. > [!NOTE] > > For curated lending data (supply, borrow, flash loans, liquidations) that covers Aave and other lending protocols in a normalized schema, see the [Lending](/data-catalog/curated/lending/overview) section. *** ## Protocol Coverage ### Morpho #### MetaMorpho Vaults (Vault-Level Activity) Primary dataset for vault-level analysis. MetaMorpho vaults are curated lending strategies that allocate deposits across Morpho Blue markets. **Namespace:** `metamorpho_vaults_multichain.*` **Chains:** Ethereum, Base **Chain-specific tables also available:** `metamorpho_vaults_ethereum.*`, `metamorpho_vaults_base.*` | Table | Description | | - | - | | [`metamorpho_vaults_multichain.metamorpho_evt_deposit`](https://dune.com/data/metamorpho_vaults_multichain.metamorpho_evt_deposit) | Deposit events (assets deposited, shares minted) | | [`metamorpho_vaults_multichain.metamorpho_evt_withdraw`](https://dune.com/data/metamorpho_vaults_multichain.metamorpho_evt_withdraw) | Withdrawal events (shares burned, assets returned) | | [`metamorpho_vaults_multichain.metamorpho_evt_transfer`](https://dune.com/data/metamorpho_vaults_multichain.metamorpho_evt_transfer) | Vault share transfers between addresses | | [`metamorpho_vaults_multichain.metamorpho_evt_accrueinterest`](https://dune.com/data/metamorpho_vaults_multichain.metamorpho_evt_accrueinterest) | Interest accrual events for yield tracking | | [`metamorpho_vaults_multichain.metamorpho_evt_reallocatesupply`](https://dune.com/data/metamorpho_vaults_multichain.metamorpho_evt_reallocatesupply) | Supply reallocation across underlying markets | | [`metamorpho_vaults_multichain.metamorpho_evt_setwithdrawqueue`](https://dune.com/data/metamorpho_vaults_multichain.metamorpho_evt_setwithdrawqueue) | Withdraw queue configuration updates | | [`metamorpho_vaults_multichain.metamorpho_evt_setcap`](https://dune.com/data/metamorpho_vaults_multichain.metamorpho_evt_setcap) | Market cap limit updates | **Example — Daily Deposits by Vault:** ```sql theme={null} SELECT block_date, contract_address AS vault_address, COUNT(*) AS num_deposits, COUNT(DISTINCT sender) AS unique_depositors FROM metamorpho_vaults_ethereum.metamorpho_evt_deposit WHERE block_date >= CURRENT_DATE - INTERVAL '30' DAY GROUP BY 1, 2 ORDER BY 1 DESC ``` #### Morpho Core (Market-Level Activity) Underlying lending market activity used by MetaMorpho vaults. Useful for understanding where vault capital is deployed. **Namespace:** `morpho_multichain.*` **Chains:** Arbitrum, Corn, Sonic, Unichain, Flare, Plume | Table | Description | | - | - | | [`morpho_multichain.morpho_evt_supply`](https://dune.com/data/morpho_multichain.morpho_evt_supply) | Supply events to lending markets | | [`morpho_multichain.morpho_evt_borrow`](https://dune.com/data/morpho_multichain.morpho_evt_borrow) | Borrow events from lending markets | | [`morpho_multichain.morpho_evt_repay`](https://dune.com/data/morpho_multichain.morpho_evt_repay) | Loan repayment events | | [`morpho_multichain.morpho_evt_withdraw`](https://dune.com/data/morpho_multichain.morpho_evt_withdraw) | Withdrawal events from lending markets | | [`morpho_multichain.morpho_evt_supplycollateral`](https://dune.com/data/morpho_multichain.morpho_evt_supplycollateral) | Collateral supply events | | [`morpho_multichain.morpho_evt_withdrawcollateral`](https://dune.com/data/morpho_multichain.morpho_evt_withdrawcollateral) | Collateral withdrawal events | | [`morpho_multichain.morpho_evt_liquidate`](https://dune.com/data/morpho_multichain.morpho_evt_liquidate) | Liquidation events | | [`morpho_multichain.morpho_evt_createmarket`](https://dune.com/data/morpho_multichain.morpho_evt_createmarket) | New market creation events | | [`morpho_multichain.morpho_evt_accrueinterest`](https://dune.com/data/morpho_multichain.morpho_evt_accrueinterest) | Interest accrual at the market level | *** ### Euler #### Euler v2 (EVaults) Primary dataset for Euler's vault-style lending markets across multiple chains. **Namespace:** `euler_v2_.*` (e.g., `euler_v2_ethereum.*`, `euler_v2_base.*`) **Chains:** Ethereum, Arbitrum, Base, Berachain, Unichain, Bob, TAC **Event Tables:** | Table | Description | | - | - | | [`euler_v2_.evault_evt_deposit`](https://dune.com/data/euler_v2_ethereum.evault_evt_deposit) | Vault deposit events | | [`euler_v2_.evault_evt_liquidate`](https://dune.com/data/euler_v2_ethereum.evault_evt_liquidate) | Liquidation events | **Call Tables:** | Table | Description | | - | - | | [`euler_v2_.evault_call_deposit`](https://dune.com/data/euler_v2_ethereum.evault_call_deposit) | Deposit function calls | | [`euler_v2_.evault_call_withdraw`](https://dune.com/data/euler_v2_ethereum.evault_call_withdraw) | Withdrawal function calls | | [`euler_v2_.evault_call_liquidate`](https://dune.com/data/euler_v2_ethereum.evault_call_liquidate) | Liquidation function calls | **Example — Euler v2 Deposits Across Chains (30d):** ```sql theme={null} SELECT 'ethereum' AS chain, date_trunc('day', evt_block_time) AS day, COUNT(*) AS num_deposits FROM euler_v2_ethereum.evault_evt_deposit WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 UNION ALL SELECT 'base' AS chain, date_trunc('day', evt_block_time) AS day, COUNT(*) AS num_deposits FROM euler_v2_base.evault_evt_deposit WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 UNION ALL SELECT 'arbitrum' AS chain, date_trunc('day', evt_block_time) AS day, COUNT(*) AS num_deposits FROM euler_v2_arbitrum.evault_evt_deposit WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 ORDER BY day DESC, chain ``` #### Euler v1 (Legacy — Ethereum Only) **Namespace:** `euler_ethereum.*` | Table | Description | | - | - | | [`euler_ethereum.euler_evt_deposit`](https://dune.com/data/euler_ethereum.euler_evt_deposit) | Deposit events | | [`euler_ethereum.euler_evt_withdraw`](https://dune.com/data/euler_ethereum.euler_evt_withdraw) | Withdrawal events | | [`euler_ethereum.euler_evt_borrow`](https://dune.com/data/euler_ethereum.euler_evt_borrow) | Borrow events | | [`euler_ethereum.euler_evt_repay`](https://dune.com/data/euler_ethereum.euler_evt_repay) | Repayment events | | [`euler_ethereum.euler_evt_liquidation`](https://dune.com/data/euler_ethereum.euler_evt_liquidation) | Liquidation events | | [`euler_ethereum.euler_evt_marketactivated`](https://dune.com/data/euler_ethereum.euler_evt_marketactivated) | New market activation events | | [`euler_ethereum.euler_evt_assetstatus`](https://dune.com/data/euler_ethereum.euler_evt_assetstatus) | Asset status updates | #### Euler Plasma (Vault Framework) Advanced vault infrastructure with \~20+ tables covering controller status, account checks, operator management, and batch operations. **Namespace:** `euler_plasma.*` **Key Event Tables:** | Table | Description | | - | - | | [`euler_plasma.vault_evt_controllerstatus`](https://dune.com/data/euler_plasma.vault_evt_controllerstatus) | Controller status changes | | [`euler_plasma.vault_evt_accountstatuscheck`](https://dune.com/data/euler_plasma.vault_evt_accountstatuscheck) | Account status verification events | | [`euler_plasma.vault_evt_vaultstatuscheck`](https://dune.com/data/euler_plasma.vault_evt_vaultstatuscheck) | Vault status verification events | | [`euler_plasma.vault_evt_operatorstatus`](https://dune.com/data/euler_plasma.vault_evt_operatorstatus) | Operator permission changes | | [`euler_plasma.vault_evt_ownerregistered`](https://dune.com/data/euler_plasma.vault_evt_ownerregistered) | Owner registration events | **Key Call Tables:** | Table | Description | | - | - | | [`euler_plasma.vault_call_enablecollateral` / `disablecollateral`](https://dune.com/data/euler_plasma.vault_call_enablecollateral) | Collateral management | | [`euler_plasma.vault_call_enablecontroller` / `disablecontroller`](https://dune.com/data/euler_plasma.vault_call_enablecontroller) | Controller management | | [`euler_plasma.vault_call_setoperator` / `setaccountoperator`](https://dune.com/data/euler_plasma.vault_call_setoperator) | Operator permissions | | [`euler_plasma.vault_call_batch` / `batchrevert`](https://dune.com/data/euler_plasma.vault_call_batch) | Batch operations | | [`euler_plasma.vault_call_controlcollateral`](https://dune.com/data/euler_plasma.vault_call_controlcollateral) | Collateral control | *** ### Aave v3 Aave v3 is a lending protocol where each reserve acts as a pool accepting deposits and issuing borrows. While not a "vault" protocol in the MetaMorpho sense, Aave pools function similarly for deposit/withdraw tracking and are commonly analyzed alongside vault protocols. **Namespace:** `aave_v3_multichain.*` **Chains:** Ethereum, Base, Arbitrum, Avalanche, BNB, Celo, Fantom, Gnosis, Mantle, MegaETH, Optimism, Polygon, Sonic, zkSync **L2-specific tables:** `aave_v3_multichain.l2pool_*` for Arbitrum, Base, Ink, Linea, Mantle, Scroll | Table | Description | | - | - | | [`aave_v3_multichain.pool_evt_supply`](https://dune.com/data/aave_v3_multichain.pool_evt_supply) | Deposit/supply events | | [`aave_v3_multichain.pool_evt_withdraw`](https://dune.com/data/aave_v3_multichain.pool_evt_withdraw) | Withdrawal events | | [`aave_v3_multichain.pool_evt_borrow`](https://dune.com/data/aave_v3_multichain.pool_evt_borrow) | Borrow events | | [`aave_v3_multichain.pool_evt_repay`](https://dune.com/data/aave_v3_multichain.pool_evt_repay) | Repayment events | | [`aave_v3_multichain.pool_evt_liquidationcall`](https://dune.com/data/aave_v3_multichain.pool_evt_liquidationcall) | Liquidation events | | [`aave_v3_multichain.pool_evt_flashloan`](https://dune.com/data/aave_v3_multichain.pool_evt_flashloan) | Flash loan events | | [`aave_v3_multichain.pool_evt_reservedataupdated`](https://dune.com/data/aave_v3_multichain.pool_evt_reservedataupdated) | Reserve data updates (rates, indices) | **Example — Supply Events by Chain (30d):** ```sql theme={null} SELECT chain, COUNT(*) AS num_supplies, COUNT(DISTINCT "user") AS unique_suppliers FROM aave_v3_multichain.pool_evt_supply WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1 ORDER BY num_supplies DESC ``` > [!NOTE] > > For normalized lending data across Aave and other protocols, see the [Lending](/data-catalog/curated/lending/overview) curated tables which provide a unified schema. *** ### Fluid Fluid uses a tiered vault architecture (T1–T4) for borrowing with different collateral and debt configurations. **Namespace:** `fluid_multichain.*` **Chains:** Arbitrum, Base, BNB, Ethereum, Plasma, Polygon #### Vault Operations | Table | Description | | - | - | | [`fluid_multichain.fluidvaultt1_evt_logoperate`](https://dune.com/data/fluid_multichain.fluidvaultt1_evt_logoperate) | T1 vault operations (single collateral, single debt) | | [`fluid_multichain.fluidvaultt2_evt_logoperate`](https://dune.com/data/fluid_multichain.fluidvaultt2_evt_logoperate) | T2 vault operations (single collateral, multi debt) | | [`fluid_multichain.fluidvaultt3_evt_logoperate`](https://dune.com/data/fluid_multichain.fluidvaultt3_evt_logoperate) | T3 vault operations (multi collateral, single debt) | | [`fluid_multichain.fluidvaultt4_evt_logoperate`](https://dune.com/data/fluid_multichain.fluidvaultt4_evt_logoperate) | T4 vault operations (multi collateral, multi debt) | #### Liquidations | Table | Description | | - | - | | [`fluid_multichain.fluidvaultt1_evt_logliquidate`](https://dune.com/data/fluid_multichain.fluidvaultt1_evt_logliquidate) | T1 liquidations | | [`fluid_multichain.fluidvaultt2_evt_logliquidate`](https://dune.com/data/fluid_multichain.fluidvaultt2_evt_logliquidate) | T2 liquidations | | [`fluid_multichain.fluidvaultt3_evt_logliquidate`](https://dune.com/data/fluid_multichain.fluidvaultt3_evt_logliquidate) | T3 liquidations | | [`fluid_multichain.fluidvaultt4_evt_logliquidate`](https://dune.com/data/fluid_multichain.fluidvaultt4_evt_logliquidate) | T4 liquidations | #### Other Events | Table | Description | | - | - | | [`fluid_multichain.fluidvaultt1_evt_logabsorb`](https://dune.com/data/fluid_multichain.fluidvaultt1_evt_logabsorb) | T1 bad debt absorptions | | [`fluid_multichain.fluidvaultt4_evt_logupdateexchangeprice`](https://dune.com/data/fluid_multichain.fluidvaultt4_evt_logupdateexchangeprice) | Exchange price updates | | [`fluid_multichain.fluidvaultfactory_evt_vaultdeployed`](https://dune.com/data/fluid_multichain.fluidvaultfactory_evt_vaultdeployed) | Vault deployment events | **Example — Vault Operations by Type (30d):** ```sql theme={null} SELECT 'T1' AS vault_type, date_trunc('day', evt_block_time) AS day, COUNT(*) AS num_operations FROM fluid_multichain.fluidvaultt1_evt_logoperate WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 UNION ALL SELECT 'T2' AS vault_type, date_trunc('day', evt_block_time) AS day, COUNT(*) AS num_operations FROM fluid_multichain.fluidvaultt2_evt_logoperate WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 UNION ALL SELECT 'T3' AS vault_type, date_trunc('day', evt_block_time) AS day, COUNT(*) AS num_operations FROM fluid_multichain.fluidvaultt3_evt_logoperate WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 UNION ALL SELECT 'T4' AS vault_type, date_trunc('day', evt_block_time) AS day, COUNT(*) AS num_operations FROM fluid_multichain.fluidvaultt4_evt_logoperate WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1, 2 ORDER BY day DESC, vault_type ``` *** ### Kamino (Solana) Kamino vaults on Solana allocate deposits into lending reserves with automated strategy management. **Namespace:** `kamino_vault_solana.*` **Chain:** Solana #### Event Tables | Table | Description | | - | - | | [`kamino_vault_solana.kamino_vault_evt_depositresultevent`](https://dune.com/data/kamino_vault_solana.kamino_vault_evt_depositresultevent) | Deposit results (shares minted, tokens deposited) | | [`kamino_vault_solana.kamino_vault_evt_withdrawresultevent`](https://dune.com/data/kamino_vault_solana.kamino_vault_evt_withdrawresultevent) | Withdraw results (shares burned, tokens returned) | | [`kamino_vault_solana.kamino_vault_evt_deposituseratabalanceevent`](https://dune.com/data/kamino_vault_solana.kamino_vault_evt_deposituseratabalanceevent) | User ATA balance after deposit | | [`kamino_vault_solana.kamino_vault_evt_sharestowithdrawevent`](https://dune.com/data/kamino_vault_solana.kamino_vault_evt_sharestowithdrawevent) | Shares available for withdrawal | #### Call Tables | Table | Description | | - | - | | [`kamino_vault_solana.kamino_vault_call_deposit`](https://dune.com/data/kamino_vault_solana.kamino_vault_call_deposit) | Deposit into vault | | [`kamino_vault_solana.kamino_vault_call_withdraw`](https://dune.com/data/kamino_vault_solana.kamino_vault_call_withdraw) | Withdraw from vault | | [`kamino_vault_solana.kamino_vault_call_withdrawfromavailable`](https://dune.com/data/kamino_vault_solana.kamino_vault_call_withdrawfromavailable) | Withdraw from available liquidity | | [`kamino_vault_solana.kamino_vault_call_buy`](https://dune.com/data/kamino_vault_solana.kamino_vault_call_buy) | Buy vault shares | | [`kamino_vault_solana.kamino_vault_call_sell`](https://dune.com/data/kamino_vault_solana.kamino_vault_call_sell) | Sell vault shares | | [`kamino_vault_solana.kamino_vault_call_invest`](https://dune.com/data/kamino_vault_solana.kamino_vault_call_invest) | Invest vault funds into reserve | | [`kamino_vault_solana.kamino_vault_call_initvault`](https://dune.com/data/kamino_vault_solana.kamino_vault_call_initvault) | Initialize new vault | | [`kamino_vault_solana.kamino_vault_call_updatereserveallocation`](https://dune.com/data/kamino_vault_solana.kamino_vault_call_updatereserveallocation) | Update reserve allocation weights | | [`kamino_vault_solana.kamino_vault_call_removeallocation`](https://dune.com/data/kamino_vault_solana.kamino_vault_call_removeallocation) | Remove a reserve allocation | | [`kamino_vault_solana.kamino_vault_call_withdrawpendingfees`](https://dune.com/data/kamino_vault_solana.kamino_vault_call_withdrawpendingfees) | Withdraw pending fees | **Example — Kamino Vault Deposits on Solana (30d):** ```sql theme={null} SELECT date_trunc('day', call_block_time) AS day, COUNT(*) AS num_deposits, COUNT(DISTINCT tx_signer) AS unique_depositors FROM kamino_vault_solana.kamino_vault_call_deposit WHERE call_block_time >= NOW() - INTERVAL '30' DAY AND call_success = true GROUP BY 1 ORDER BY 1 DESC ``` *** ### Lido (Liquid Staking) Lido provides liquid staking for ETH via stETH. While primarily a staking protocol, Lido's architecture includes vault-related components (VaultFactory, VaultHub, StakingVault) under the `lido_ethereum` namespace. **Namespace:** `lido_ethereum.*` **Chain:** Ethereum #### stETH Core (Staking Activity) | Table | Description | | - | - | | [`lido_ethereum.steth_evt_submitted`](https://dune.com/data/lido_ethereum.steth_evt_submitted) | ETH staking deposits (stETH minted) | | [`lido_ethereum.steth_evt_transfer`](https://dune.com/data/lido_ethereum.steth_evt_transfer) | stETH token transfers | | [`lido_ethereum.steth_evt_transfershares`](https://dune.com/data/lido_ethereum.steth_evt_transfershares) | Share-based transfers | | [`lido_ethereum.steth_evt_ethdistributed`](https://dune.com/data/lido_ethereum.steth_evt_ethdistributed) | ETH rewards distribution | | [`lido_ethereum.steth_evt_tokenrebased`](https://dune.com/data/lido_ethereum.steth_evt_tokenrebased) | Rebase events (balance updates) | | [`lido_ethereum.steth_evt_elrewardsreceived`](https://dune.com/data/lido_ethereum.steth_evt_elrewardsreceived) | Execution layer rewards | #### Withdrawal Queue | Table | Description | | - | - | | [`lido_ethereum.withdrawalqueueerc721_evt_withdrawalrequested`](https://dune.com/data/lido_ethereum.withdrawalqueueerc721_evt_withdrawalrequested) | Withdrawal request events | | [`lido_ethereum.withdrawalqueueerc721_evt_withdrawalclaimed`](https://dune.com/data/lido_ethereum.withdrawalqueueerc721_evt_withdrawalclaimed) | Claimed withdrawal events | | [`lido_ethereum.withdrawalqueueerc721_evt_withdrawalsfinalized`](https://dune.com/data/lido_ethereum.withdrawalqueueerc721_evt_withdrawalsfinalized) | Finalized withdrawal batches | #### Vault Infrastructure | Table | Description | | - | - | | [`lido_ethereum.vaultfactory_evt_vaultcreated`](https://dune.com/data/lido_ethereum.vaultfactory_evt_vaultcreated) | New vault creation events | | [`lido_ethereum.vaulthub_evt_vaultconnected`](https://dune.com/data/lido_ethereum.vaulthub_evt_vaultconnected) | Vault connected to hub | | [`lido_ethereum.vaulthub_evt_vaultrebalanced`](https://dune.com/data/lido_ethereum.vaulthub_evt_vaultrebalanced) | Vault rebalancing events | | [`lido_ethereum.vaulthub_evt_vaultreportapplied`](https://dune.com/data/lido_ethereum.vaulthub_evt_vaultreportapplied) | Vault performance reports | | [`lido_ethereum.vaulthub_evt_mintedsharesonvault`](https://dune.com/data/lido_ethereum.vaulthub_evt_mintedsharesonvault) | Shares minted on vault | | [`lido_ethereum.vaulthub_evt_burnedsharesonvault`](https://dune.com/data/lido_ethereum.vaulthub_evt_burnedsharesonvault) | Shares burned on vault | | [`lido_ethereum.vaulthub_evt_vaultfeesupdated`](https://dune.com/data/lido_ethereum.vaulthub_evt_vaultfeesupdated) | Fee configuration updates | | [`lido_ethereum.stakingvault_evt_etherfunded`](https://dune.com/data/lido_ethereum.stakingvault_evt_etherfunded) | ETH funded to staking vault | | [`lido_ethereum.stakingvault_evt_etherwithdrawn`](https://dune.com/data/lido_ethereum.stakingvault_evt_etherwithdrawn) | ETH withdrawn from staking vault | | [`lido_ethereum.stakingvault_evt_etherstaged`](https://dune.com/data/lido_ethereum.stakingvault_evt_etherstaged) | ETH staged for operations | **Example — Lido stETH Deposits vs Withdrawal Requests (30d):** ```sql theme={null} WITH deposits AS ( SELECT date_trunc('day', evt_block_time) AS day, SUM(CAST(amount AS DOUBLE)) / 1e18 AS eth_deposited FROM lido_ethereum.steth_evt_submitted WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1 ), withdrawals AS ( SELECT date_trunc('day', evt_block_time) AS day, SUM(CAST(amountOfStETH AS DOUBLE)) / 1e18 AS steth_withdrawal_requested FROM lido_ethereum.withdrawalqueueerc721_evt_withdrawalrequested WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1 ) SELECT COALESCE(d.day, w.day) AS day, COALESCE(d.eth_deposited, 0) AS eth_deposited, COALESCE(w.steth_withdrawal_requested, 0) AS steth_withdrawal_requested, COALESCE(d.eth_deposited, 0) - COALESCE(w.steth_withdrawal_requested, 0) AS net_flow FROM deposits d FULL OUTER JOIN withdrawals w ON d.day = w.day ORDER BY day DESC ``` *** ## Common Analysis Patterns ### Deposits & Withdrawals Track capital inflows and outflows per vault or protocol. Most protocols emit separate deposit and withdraw events with amount fields. ### TVL Estimation Aggregate deposits minus withdrawals over time. For USD denomination, join with `prices.day`, `prices.hour`, or `prices.minute` depending on the granularity needed. Accurate point-in-time TVL will improve once the [Balances](/data-catalog/curated/balances/overview) tables are fully available. ### Volume Tracking Sum deposit and withdrawal amounts over time intervals to measure vault activity and capital velocity. ### Unique Depositors Count distinct wallet addresses interacting with vault deposit events to track user adoption. ### Reallocation Analysis For protocols like Morpho (MetaMorpho), track how vaults shift capital across underlying markets using reallocation events. ### Liquidations Monitor liquidation events across protocols to assess vault health and risk. *** ## Cross-Protocol Starter Query **Daily Deposit Events Across Protocols (30d):** ```sql theme={null} WITH morpho AS ( SELECT date_trunc('day', evt_block_time) AS day, 'Morpho (MetaMorpho)' AS protocol, COUNT(*) AS deposit_events FROM metamorpho_vaults_multichain.metamorpho_evt_deposit WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1 ), aave AS ( SELECT date_trunc('day', evt_block_time) AS day, 'Aave v3' AS protocol, COUNT(*) AS deposit_events FROM aave_v3_multichain.pool_evt_supply WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1 ), lido AS ( SELECT date_trunc('day', evt_block_time) AS day, 'Lido' AS protocol, COUNT(*) AS deposit_events FROM lido_ethereum.steth_evt_submitted WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1 ), fluid AS ( SELECT date_trunc('day', evt_block_time) AS day, 'Fluid' AS protocol, COUNT(*) AS deposit_events FROM fluid_multichain.fluidvaultt1_evt_logoperate WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1 ), euler AS ( SELECT date_trunc('day', evt_block_time) AS day, 'Euler v2' AS protocol, COUNT(*) AS deposit_events FROM euler_v2_ethereum.evault_evt_deposit WHERE evt_block_time >= NOW() - INTERVAL '30' DAY GROUP BY 1 ) SELECT * FROM morpho UNION ALL SELECT * FROM aave UNION ALL SELECT * FROM lido UNION ALL SELECT * FROM fluid UNION ALL SELECT * FROM euler ORDER BY day DESC, protocol ``` *** ## Notes & Limitations * **No unified dataset**: Analysis requires protocol-specific logic. Each protocol has its own event schema and naming conventions. * **Coverage varies**: Not all protocols are decoded on all chains. Check the data explorer for the latest availability. * **TVL is approximate**: Deposit-minus-withdrawal tracking provides a proxy. For precise TVL, combine with balance snapshots and pricing data from `prices.day` or `prices.hour`. * **APY data not available**: On-chain yield/APY calculation requires combining interest accrual events with token pricing and time-weighted math. This is complex and protocol-specific. * **Holder counts deferred**: Accurate holder tracking requires the [Balances](/data-catalog/curated/balances/overview) tables, which are in open beta. * **Some protocols overlap with Lending**: Aave v3 data is also covered in the [Lending](/data-catalog/curated/lending/overview) curated tables in a normalized schema. Use the curated lending tables for cross-protocol comparisons, and decoded tables here for vault-specific or protocol-specific analysis. * **Token decimals vary per vault**: MetaMorpho vault `assets` values are denominated in the underlying token's smallest unit (e.g., 6 decimals for USDC, 18 for WETH). Always join with `tokens.erc20` for decimal normalization before computing USD values via `prices.day`. * **Event counts ≠ volume**: Cross-protocol event count comparisons are directional only. Some protocols (e.g., Fluid) emit a single event per operation that covers supply + borrow + repay, while others have separate events. * **Automated activity**: Some chains (e.g., Gnosis on Aave v3) show high event counts driven by automated/bot activity rather than organic user deposits. *** ## Related Tables > [card] [Lending](/data-catalog/curated/lending/overview) > > Curated supply, borrow, flash loan, and liquidation data across lending protocols > [card] [Balances](/data-catalog/curated/balances/overview) > > Token balance snapshots for holder analysis > [card] [Prices](/data-catalog/curated/prices/overview) > > Token pricing for USD denomination > [card] [Token Transfers](/data-catalog/curated/token-transfers/overview) > > Raw transfer events for flow analysis > [card] [DEX Trades](/data-catalog/curated/dex-trades/overview) > > DEX activity for vault token trading *** ## Enterprise Data Solutions Need a unified vaults dataset, custom vault analytics, or dedicated support? [Talk to our enterprise team](https://dune.com/enterprise). # Data Freshness Source: https://docs.dune.com/data-catalog/data-freshness Understand the frequency of updates for various data types on Dune. At Dune, data is continually refreshed through a multi-stage process to ensure accuracy and reliability. The three main stages of data updates are: **Raw Data**, **Decoded Data**, and **Curated Data**. The update frequency for each type of data varies based on several factors. ## Raw Data Raw data consists of tables such as `ethereum.blocks` or `ethereum.transactions` that are directly ingested from the blockchain. The frequency of raw data updates is primarily influenced by the blockchain's frequency of producing blocks and its likelihood of a reorg. ### Blockchain Dependence * **Chains like Optimism, Arbitrum, and Avalanche**: These blockchains exhibit lower chances of undergoing reorgs. As a result, data ingestion occurs more swiftly since the stability of these chains allows for quicker validation of block data. * **Chains like Polygon and Ethereum**: Given their higher propensity for reorgs, there is a deliberate delay in data ingestion. This delay ensures that only stable and reorg-resistant blocks are considered, preventing the ingestion of potentially unstable or reversible transactions. We do our best to ensure that the data is as fresh as possible while maintaining the integrity of the data. You can find the data freshness of the raw data in the table below. [https://dune.com/embeds/3674011/6192854](https://dune.com/embeds/3674011/6192854) ## Decoded Data Decoded data refers to tables such as `uniswap_v3_ethereum.Factory_evt_PoolCreated` or `tokens_ethereum.erc20` that are derived from the raw data. This stage of data processing involves transforming raw blockchain data into more accessible and interpretable formats. The decoding of data is performed in real-time and is contingent on the volume of data being processed. The typical timeline for decoding is as follows: * **Time Frame**: Decoding generally occurs within 15 to 60 seconds following the ingestion of raw data. * **Dependency on Data Volume**: The specific duration within this range depends on the current data throughput and the complexity of the decoding operations required. You can find the data freshness of the decoded data in the table below. [https://dune.com/embeds/3674011/6191881](https://dune.com/embeds/3674011/6191881) ## Curated Data Curated data tables on Dune are tables like `dex.trades` or `nft.trades` that are derived from raw and decoded data. They take away the complexity of working with raw or even decoded data and are ready to be used for analysis. The data pipelines are open-source and documented in this [GitHub repository](https://github.com/duneanalytics/spellbook). Curated tables are usually scheduled to run once every hour. The runtime of the data models can vary depending on the volume of transactions on any given day, therefore curated datasets are sometimes slower than the usual 1-hour target to update. Solana datasets such as `dex_solana.trades` and `tokens_solana.transfers` are an exception — they run on a 6-hour schedule, so data freshness for these tables is typically 6–7 hours. [https://dune.com/embeds/3675008/6180554](https://dune.com/embeds/3675008/6180554) ## Community Data Several notable 3rd party data providers are uploading their data into Dune. These data providers have their own update schedules and are not controlled by Dune. The data freshness of these providers can be found in the table below. [https://dune.com/embeds/3675124/6180730](https://dune.com/embeds/3675124/6180730) # Data Trust & Reliability Source: https://docs.dune.com/data-catalog/data-quality How Dune validates blockchain data as it is ingested, monitors it for completeness, and what our quality controls cover. ## Quality Controls Across the Pipeline Dune is committed to delivering high-fidelity blockchain data that teams can trust for critical analytics, applications, and business decisions. This page describes the automated controls we run on that data, and what each one covers. Data quality isn't a one-off test. Blocks are validated as they are ingested, core blockchain tables are monitored on a schedule, and curated datasets are tested whenever their code changes. > [!NOTE] > > **Monitoring:** [Status Page](https://status.dune.com/) · [Data Freshness](/data-catalog/data-freshness) ## Trusted at Scale Dune has been indexing and serving blockchain data longer than any other onchain data platform. Our infrastructure processes millions of queries per day across 100+ blockchains, powering analytics for leading exchanges, DeFi protocols, investment firms, and blockchain foundations worldwide. Years of production operation have exposed us to a wide range of chain-specific edge cases, and the controls described on this page reflect that experience. > *"Huge credit to the Dune team for their speed, precision, and commitment to making onchain data accessible and actionable."* > **Luke Judges**, Director at Ripple *** ## How Our Pipeline Works Dune's data pipeline processes blockchain data through three stages: **1. Ingestion**: We ingest raw block, transaction, log, and trace data from blockchain nodes. Blocks are validated against a schema for their blockchain before they are stored, and a block that fails validation is retried rather than stored. **2. Monitoring**: Scheduled checks scan the blocks tables of our most widely used blockchains for missing and duplicate blocks, and alert our engineers when they find one. **3. Output**: Raw data keeps the block and transaction hashes as received from the node, so any record can be compared against a node or block explorer. Decoded data is produced by applying contract interface definitions (ABIs) to raw data. Curated datasets like `dex.trades` and `tokens.transfers` apply standardized schemas and business logic to make blockchain data easily accessible for all your use cases. *** ## Our Data Quality Framework ### Block Validation Before a block is stored, it is checked against a schema defined for its blockchain and against internal-consistency rules, for example that each transaction receipt belongs to the block and that the block's transactions and receipts correspond to one another. A block that fails is retried, and our engineers are alerted if it cannot be retrieved and validated. We keep each block's hash and parent hash, and each transaction's hash, as received from the node rather than recomputing them. Because these identifiers are published by the network, you can compare any record in Dune against the same record from a node or block explorer of your choice. ### Gap Detection Every 30 minutes, automated checks scan the blocks tables of our most widely used blockchains, including Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain, Avalanche, Bitcoin, Tron and Solana, for missing block numbers. Any gap found alerts our engineers so it can be investigated and, where the data is available, backfilled. ### Duplicate Detection For most of those blockchains, the same checks also detect duplicate block records and alert our engineers. ### Re-org Handling Blockchain reorganizations can replace recently produced blocks. For most chains, Dune limits exposure to them by indexing a block only once it is a set number of blocks behind the chain tip, or once the node reports it as safe or finalized. The margin is set per chain based on how that chain reaches finality. ### Token Metadata Token metadata (names, symbols, decimals) for ERC-20 tokens is maintained in `tokens.erc20`, part of [Spellbook](https://github.com/duneanalytics/spellbook), Dune's open-source transformation layer. It is updated as contributions are reviewed and merged. ### Dataset Tests Curated datasets carry automated tests on their key columns, such as not-null and uniqueness checks. These tests run whenever a dataset's code changes, so a change that breaks them is caught before it ships. ## Monitoring & Transparency Real-time visibility into data health: > [card] [Data Freshness](/data-catalog/data-freshness) > > Check current ingestion latency for all supported chains and curated datasets. > [card] [Status Page](https://status.dune.com/) > > Subscribe to alerts for any incidents affecting data availability or quality. If you discover a data quality issue, [let our team know](mailto:support@dune.com). We investigate every report and prioritize fixes based on impact. > *"Dune has by far the largest and most comprehensive dataset on the market."* > **Dan Smith**, Senior Research at Blockworks *** ## Next Steps > [card] [Enterprise Data Quality Guarantees](https://dune.com/enterprise) > > For custom SLAs, dedicated support, and priority issue resolution, talk to our enterprise team. > [card] [Build Validated Pipelines on Dune](/api-reference/connectors/dbt/overview) > > Run your own dbt projects on Dune's data warehouse. Full incremental model support, automated testing, and CI/CD. # Transaction Fees Source: https://docs.dune.com/data-catalog/dune-index/gas-fees Understanding transaction fees and their relationship to transaction costs in blockchain networks > [!WARNING] > > **The Dune Index has been sunset.** The underlying methodology and queries remain accessible. See the [introduction page](/data-catalog/dune-index/introduction) for details on how to continue using this data. ## Overview Transaction fees represent the dollar costs of executing operations on blockchain networks. By measuring transaction fees, we can understand the demand for resources on the network and the incentives that drive user behavior. Gas fee calculations are more complex than they may seem at first glance. This is because different networks have different fee structures, and some even have multiple components to their fees. We are aggregating the data from multiple sources to provide a comprehensive view of the fees paid for each network. You can explore the daily gas fee data via `metrics.gas_fees_daily` [https://dune.com/embeds/4096073/7114131](https://dune.com/embeds/4096073/7114131) [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=metrics\&table_name_t6f0df=gas_fees_daily](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=metrics\&table_name_t6f0df=gas_fees_daily) ### EVM Networks For EVM networks, we have developed a unified model to calculate transaction fees consistently across different types of chains. The data is accessible through the `gas.fees` table, which standardizes the fee components into `l1_fee`, `base_fee`, and `priority_fee`. This model elegantly unifies the fee structures of rollups, L1s, and L2s, providing a coherent view of gas costs across the EVM ecosystem. However, it's important to note that the specific fee components and their calculations may vary depending on the unique characteristics and design choices of each network. You can find the fee components for each network below. > [tab] Arbitrum > > Arbitrum uses a custom L1/L2 fee model that ignores priority fees (tips) in calculations and uses effective_gas_price instead of standard gas_price. This helps account for the actual costs of posting data to the L1 chain. > > ```sql theme={null} > -- Two component fee structure > l1_fee = gas_used_for_l1 * effective_gas_price > base_fee = (gas_used - gas_used_for_l1) * effective_gas_price > ``` > [tab] Avalanche C-Chain > > Avalanche C-Chain uses a standard fee structure with a base fee and an optional priority fee. This allows users to tip validators for faster transaction inclusion. > > ```sql theme={null} > -- Two component fee structure (if priority fee exists) > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Single component fee structure (if no priority fee) > base_fee = gas_price * gas_used > ``` > [tab] Base > > Base employs a custom L1/L2 fee model with additional L1 data fields. This helps track the costs associated with posting data to the L1 chain for security. > > ```sql theme={null} > -- Three component fee structure > l1_fee = l1_fee > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Two component fee structure (if no priority fee) > l1_fee = l1_fee > base_fee = gas_price * gas_used > ``` > [tab] Blast > > Blast uses a custom L1/L2 fee model with additional L1 data fields. This allows tracking the L1 data posting costs separately from the L2 execution fees. > > ```sql theme={null} > -- Three component fee structure > l1_fee = l1_fee > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Two component fee structure (if no priority fee) > l1_fee = l1_fee > base_fee = gas_price * gas_used > ``` > [tab] BNB Chain > > BNB Chain uses a standard fee structure with a base fee and an optional priority fee. This allows users to incentivize faster transaction processing through tips. > > ```sql theme={null} > -- Two component fee structure (if priority fee exists) > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Single component fee structure (if no priority fee) > base_fee = gas_price * gas_used > ``` > [tab] Celo > > Celo is excluded due to incorrect raw data. If included, it would use a > standard fee structure with a base fee and an optional priority fee. > [tab] Ethereum > > Ethereum uses a custom fee model with additional blob fee data. This helps > account for the costs associated with storing large data blobs on the network. > Fee components: > > ```sql theme={null} > -- Four component fee structure > blob_fee = blob_base_fee * blob_gas_used > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Three component fee structure (if no priority fee) > blob_fee = blob_base_fee * blob_gas_used > base_fee = gas_price * gas_used > ``` > [tab] Fantom > > Fantom uses a standard fee structure with a base fee and an optional priority fee. This allows users to tip validators for faster transaction inclusion. > > ```sql theme={null} > -- Two component fee structure (if priority fee exists) > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Single component fee structure (if no priority fee) > base_fee = gas_price * gas_used > ``` > [tab] Gnosis > > Gnosis uses a standard fee structure with a base fee and an optional priority fee. This allows users to incentivize faster transaction processing through tips. > > ```sql theme={null} > -- Two component fee structure (if priority fee exists) > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Single component fee structure (if no priority fee) > base_fee = gas_price * gas_used > ``` > [tab] Linea > > Linea uses a standard fee structure with a base fee and an optional priority fee. This allows users to tip validators for faster transaction inclusion. > > ```sql theme={null} > -- Two component fee structure (if priority fee exists) > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Single component fee structure (if no priority fee) > base_fee = gas_price * gas_used > ``` > [tab] Mantle > > Mantle employs a custom L1/L2 fee model with additional L1 data fields. This helps track the costs associated with posting data to the L1 chain for security. > > ```sql theme={null} > -- Three component fee structure > l1_fee = l1_fee > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Two component fee structure (if no priority fee) > l1_fee = l1_fee > base_fee = gas_price * gas_used > ``` > [tab] Optimism > > Optimism uses a custom L1/L2 fee model with additional L1 data fields. This allows tracking the L1 data posting costs separately from the L2 execution fees. > > ```sql theme={null} > -- Three component fee structure > l1_fee = l1_fee > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Two component fee structure (if no priority fee) > l1_fee = l1_fee > base_fee = gas_price * gas_used > ``` > [tab] Polygon > > Polygon uses a standard fee structure with a base fee and an optional priority fee. This allows users to incentivize faster transaction processing through tips. > > ```sql theme={null} > -- Two component fee structure (if priority fee exists) > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Single component fee structure (if no priority fee) > base_fee = gas_price * gas_used > ``` > [tab] Scroll > > Scroll uses a custom L1/L2 fee model with additional L1 data fields. This helps track the costs associated with posting data to the L1 chain for security. > > ```sql theme={null} > -- Three component fee structure > l1_fee = l1_fee > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Two component fee structure (if no priority fee) > l1_fee = l1_fee > base_fee = gas_price * gas_used > ``` > [tab] Sei > > Sei uses a standard fee structure with a base fee and an optional priority fee. This allows users to tip validators for faster transaction inclusion. > > ```sql theme={null} > -- Two component fee structure (if priority fee exists) > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Single component fee structure (if no priority fee) > base_fee = gas_price * gas_used > ``` > [tab] Tron > > Tron uses a simplified fee structure using only gas price and gas used. This > provides a straightforward way to calculate transaction fees. Tron also > subsidizes the fees for transactions, so the fee paid is not necessarily the > actual cost of the transaction. We are correcting for this in the > `metrics.gas_fees_daily` table, but not in gas.fees yet. > > ```sql theme={null} > tx_fee_raw = gas_used * gas_price > ``` > [tab] zkEVM > > zkEVM uses a standard fee structure with a base fee and an optional priority fee. This allows users to incentivize faster transaction processing through tips. > > ```sql theme={null} > -- Two component fee structure (if priority fee exists) > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Single component fee structure (if no priority fee) > base_fee = gas_price * gas_used > ``` > [tab] zkSync > > zkSync uses a simplified fee structure using only gas price and gas used. This provides a straightforward way to calculate transaction fees on the zkSync network. > > ```sql theme={null} > base_fee = gas_price * gas_used > ``` > [tab] Zora > > Zora uses a custom L1/L2 fee model with additional L1 data fields. This helps track the costs associated with posting data to the L1 chain for security. > > ```sql theme={null} > -- Three component fee structure > l1_fee = l1_fee > base_fee = base_fee_per_gas * gas_used > priority_fee = priority_fee_per_gas * gas_used > -- Two component fee structure (if no priority fee) > l1_fee = l1_fee > base_fee = gas_price * gas_used > ``` > [card] [Fee Metrics Code](https://github.com/duneanalytics/spellbook/tree/main/dbt_subprojects/daily_spellbook/models/_metrics/fees) > > View the source code for the fees metrics implementation. ### Non-EVM Networks For non-EVM networks we haven't yet found a consistent way to model the fee structure, so we are not yet able to provide a unified model for non-EVM networks. However, all the data is included in the `metrics.gas_fees_daily` table. #### Solana Solana has two "types" of transactions: *transactions* and *votes*. We track the fees for each type separately in `gas_solana.tx_fees` and `gas_solana.vote_fees`. > [tab] Solana Transactions > > Solana uses a custom fee structure with a base fee and an optional prioritization fee for transactions. The base fee is calculated based on the number of signatures required for the transaction, while the prioritization fee depends on the compute unit price and compute budget limit. > > ```sql theme={null} > -- Two component fee structure > base_fee = # of signatures * 0.000005 > priority_fee = compute_unit_price * compute_budget_limit > ``` > > This data is standardized in `gas_solana.tx_fees`. > [tab] Solana Votes > > In Solana, votes that help the network reach consensus are also considered transactions. The fees are always 0.000005 SOL per vote, which is the base fee for a transaction with one signature. > > ```sql theme={null} > -- single component fee structure > fee = 0.000005 > ``` > > Vote fees are not included in `gas_solana.tx_fees` and are instead included in `gas_solana.vote_fees`. We consider both `gas_solana.tx_fees` and `gas_solana.vote_fees` when calculating the total transaction fees for Solana in `metrics.gas_fees_daily`. #### Bitcoin Bitcoin uses a simple fee structure where each transaction has a fee paid to the miner. Miners pick the transactions with the highest fees to include in the next block. ```sql theme={null} -- Single component fee structure fee = fee ``` # Dune Index Source: https://docs.dune.com/data-catalog/dune-index/introduction The Dune Index is a comprehensive indicator of blockchain adoption across the industry. > [!WARNING] > > **The Dune Index has been sunset.** > > While we are no longer actively maintaining this product, the underlying methodology and queries remain fully accessible. You can still: > > * **Query the underlying data** using the metrics tables referenced in this documentation (e.g., `metrics.gas_fees_daily`) > * **Use our methodology** by referencing the [open-source code](https://github.com/duneanalytics/spellbook/tree/main/dbt_subprojects/daily_spellbook/models/_metrics/dune_index) > * **Build your own analysis** based on the component metrics described below ## What is the Dune Index? The Dune Index serves as a comprehensive measurement framework for blockchain adoption, designed to capture meaningful usage while filtering out speculative activity. By combining multiple standardized metrics, it provides an objective view of how blockchain technology is being utilized across different networks and use cases. ## Why the Dune Index? Traditional blockchain metrics often fall short of measuring genuine adoption. Market capitalization and token prices primarily reflect speculative sentiment, while metrics like Total Value Locked (TVL) can be manipulated by large holders. The Dune Index addresses these limitations by focusing on actual network usage and economic activity. The index was specifically designed to track meaningful adoption that indicates real-world utility. This approach helps stakeholders distinguish between speculative bubbles and sustainable growth in blockchain usage. ## Components The Dune Index aggregates three fundamental metrics, each normalized to a baseline value of 10 to enable meaningful comparison: > [card] [Transaction Fees](/data-catalog/dune-index/gas-fees) > > Measures real demand for blockspace > [card] [Net USD Transferred](/data-catalog/dune-index/net-transfers) > > Tracks genuine value movement > [card] [Transactions](/data-catalog/dune-index/transactions) > > Indicates breadth of usage ### Component Selection Rationale These metrics were carefully chosen to provide a comprehensive view of blockchain usage. Transaction fees demonstrate users' willingness to pay for block space, serving as a market-driven indicator of demand. Net transfers capture actual economic activity while filtering out artificial volume. Transaction count provides context about the breadth of network usage. Together, these metrics create a robust framework that resists artificial inflation and captures different aspects of blockchain utility. > [card] [Dune Index Metrics Code](https://github.com/duneanalytics/spellbook/tree/main/dbt_subprojects/daily_spellbook/models/_metrics/dune_index) > > View the source code for the Dune Index metrics implementation. ## Implementation Guide The Dune Index can be utilized in several ways: * Track industry trends by monitoring long-term adoption patterns and growth trajectories across the blockchain space. * Enable detailed blockchain breakdowns to compare adoption metrics between different networks. * Through component analysis, users can evaluate the relative impact of each metric on overall adoption. * The index methodology can also be extended for specialized research and custom analysis needs. ## Excluded Metrics The index intentionally excludes several common blockchain metrics due to their limitations: ### Price and Market Capitalization Market-based metrics were excluded as they primarily reflect speculative activity rather than actual usage. Price movements often diverge significantly from underlying adoption patterns and can be heavily influenced by market sentiment rather than utility. ### Total Value Locked (TVL) While TVL provides insight into DeFi activity, it has significant limitations as an adoption metric. The metric can be manipulated by large holders, doesn't account for capital efficiency, and automatically increases with asset prices regardless of actual usage. ### Active Addresses Address-based metrics prove problematic due to the ease of address creation and the common practice of users maintaining multiple addresses. These metrics fail to distinguish between meaningful activity and artificial inflation through address generation. # Net USD Transferred Source: https://docs.dune.com/data-catalog/dune-index/net-transfers Understanding net USD transferred as a component of the Dune Index > [!WARNING] > > **The Dune Index has been sunset.** The underlying methodology and queries remain accessible. See the [introduction page](/data-catalog/dune-index/introduction) for details on how to continue using this data. ## Overview Net USD transferred provides a measure of genuine economic activity across blockchain networks by tracking the actual movement of value between distinct entities. This metric implements sophisticated filtering mechanisms to distinguish meaningful transfers from artificial activity, offering insight into real economic impact. ## Technical Significance Net transfers serve as a crucial indicator of blockchain utility by measuring actual value movement while filtering out noise. Unlike gross transfer volumes, which can be inflated through wash trading or circular transactions, net transfers focus on the ultimate economic impact of blockchain activity. The metric is particularly valuable because it requires significant economic resources to manipulate, making it a more reliable indicator of genuine activity compared to metrics like transaction count or total volume. ## Calculation Methodology The computation of net transfers follows a rigorous process: 1. Address-Level Aggregation * Track all value movements between addresses * Calculate daily net position changes per address (inflows minus outflows) 2. Filtering Criteria * Minimum threshold of \$1 to exclude dust transactions * Removal of internal transactions from known contracts and protocols * Exclusion of identified wash trading patterns * Filtering of exploit-related transfers and known scam addresses 3. Standardization * Conversion to USD equivalent values using time-weighted average prices * Normalization against baseline metrics for cross-chain comparison > [card] [Transfers Metrics Code](https://github.com/duneanalytics/spellbook/tree/main/dbt_subprojects/daily_spellbook/models/_metrics/transfers) > > See the transfers metrics code for the technical implementation details. ## Analytical Framework When interpreting net transfer data, consider several key aspects: 1. Volume Patterns * Analyze sustained periods of high net transfer volume * Identify unusual spikes that may indicate large-scale events or anomalies 2. Comparative Analysis * Compare net transfers against gross transfer volume to detect wash trading * Evaluate relationships with transaction counts and fee levels * Monitor distribution patterns across different blockchain networks 3. Network Effects * Consider how network upgrades or protocol changes impact transfer patterns * Analyze the impact of new DeFi protocols or applications on transfer volumes This metric provides valuable insight into blockchain adoption when analyzed alongside other components of the Dune Index, offering a more complete picture of meaningful network usage. # Transactions Source: https://docs.dune.com/data-catalog/dune-index/transactions Understanding transactions as a foundational component of the Dune Index > [!WARNING] > > **The Dune Index has been sunset.** The underlying methodology and queries remain accessible. See the [introduction page](/data-catalog/dune-index/introduction) for details on how to continue using this data. ## Overview The transaction component of the Dune Index measures blockchain activity by counting transactions that transfer at least 1 USD in value. This filtered approach helps focus on meaningful economic activity while maintaining a simple, verifiable methodology. ## Methodology The transaction metric employs a straightforward filtering approach: 1. Base Criteria * Count only transactions with transfers of \$1 or more * Convert all token transfers to USD value at time of transaction * Include both native token and token contract transfers 2. Rationale * \$1 threshold excludes dust transactions and spam * Low threshold maintains inclusivity of meaningful activity * Simple criteria enables consistent cross-chain comparison 3. Implementation * Track successful transfers only * Calculate USD value at transaction time * Aggregate across all supported token types > [card] [Transactions Metrics Code](https://github.com/duneanalytics/spellbook/tree/main/dbt_subprojects/daily_spellbook/models/_metrics/transactions) > > View the source code for the transactions metrics implementation. ## Technical Considerations Several factors influence transaction counting: 1. Value Calculation * Use time-weighted token prices * Account for token decimals and precision * Handle cases of missing price data 2. Cross-Chain Standardization * Apply consistent \$1 threshold across networks * Account for different token value representations * Handle multi-token transactions appropriately ## Limitations Understanding the metric's limitations is crucial: 1. Threshold Effects * May exclude some meaningful sub-\$1 activity * Still includes some non-meaningful activity above \$1 * Value threshold is nominal, not inflation-adjusted 2. Technical Constraints * Requires reliable price data for all tokens * Must handle complex transaction types consistently * Network upgrades may affect transaction classification ## Usage Guidelines When analyzing transaction data: 1. Trend Analysis * Focus on directional changes over time * Compare across similar time periods * Consider seasonal and cyclical patterns 2. Context * Use alongside other Dune Index components * Consider network-specific factors * Account for major protocol changes The transaction count provides a foundational measure of blockchain adoption while the \$1 threshold helps filter out noise, making it a valuable component of the Dune Index despite its inherent limitations. # Block Events Source: https://docs.dune.com/data-catalog/echelon/block_events Echelon blockchain block events data # Table Description This table contains data about block-level events and attributes in the Echelon blockchain, including event types, sources, and associated metadata. The schema is modeled after Cosmos block events. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the event occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the block belongs. | | **event_index** | bigint | A unique index for events within the block. | | **event_type** | varchar | The type of event that was triggered. | | **event_source** | varchar | The source of the event. | | **attribute_key** | varchar | The key of the event attribute. | | **attribute_value** | varchar | The value of the event attribute. | | **attribute_index** | bigint | A unique index for attributes within the event. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=echelon\&table_name_t6f0df=block_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=echelon\&table_name_t6f0df=block_events) # Blocks Source: https://docs.dune.com/data-catalog/echelon/blocks Echelon blockchain blocks data # Table Description This table contains data about blocks in the Echelon blockchain, including block headers, consensus data, and transaction information. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block, a unique identifier for each block. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the block belongs. | | **proposer_address** | varchar | The address of the validator proposing the block. | | **validators_hash** | varchar | The hash of the validators set for the block. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=echelon\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=echelon\&table_name_t6f0df=blocks) # Message Events Source: https://docs.dune.com/data-catalog/echelon/message_events Echelon blockchain message events data # Table Description This table contains data about message-related events in the Echelon blockchain, including message types, attributes, and associated metadata. Because block events run on initia, this table is empty by design at this point. ## Table Schema | Column name | Description | Type | | - | - | - | | **block_date** | The date of the block. | date | | **block_height** | The height of the block where the event occurred. | bigint | | **block_timestamp** | Timestamp when the block was validated. | timestamp(3) with time zone | | **chain_id** | The ID of the chain where the block belongs. | varchar | | **tx_id** | The hash of the transaction where the event occurred. | varchar | | **tx_index** | The index of the transaction in the block. | bigint | | **message_index** | The index of the message in the transaction. | bigint | | **event_index** | A unique index for events within the message. | bigint | | **event_type** | The type of event that was triggered. | varchar | | **attribute_key** | The key of the event attribute. | varchar | | **attribute_value** | The value of the event attribute. | varchar | | **attribute_index** | A unique index for attributes within the event. | bigint | | **updated_at** | Timestamp of when the record was last updated. | timestamp(3) with time zone | | **ingested_at** | Timestamp of when the record was ingested into Dune. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=echelon\&table_name_t6f0df=message_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=echelon\&table_name_t6f0df=message_events) # Echelon Data Source: https://docs.dune.com/data-catalog/echelon/overview Echelon blockchain data on Dune ## What is Echelon? Echelon is a public Cosmos and EVM compatible blockchain protocol running as L2 on Initia. The Echelon consensus and layer protocols deliver unparalleled speed, scalability, and security. Echelon equally serves as an application-agnostic chain fully interoperable with the Ethereum mainnet, all EVM compatible environments, and other BFT chains via IBC. Expectedly, it eases cross-chain transferrals of value for both developers and end-users. ## Key Features * **Dual Compatibility**: Cosmos and EVM compatible blockchain protocol * **High Performance**: Unparalleled speed, scalability, and security through advanced consensus and layer protocols * **Cross-Chain Interoperability**: Fully interoperable with Ethereum mainnet, all EVM compatible environments, and other BFT chains via IBC * **Application-Agnostic**: Flexible platform for various decentralized applications * **DeFi Focus**: Bridges DeFi and mass adoption ## Echelon Data on Dune Echelon blockchain data is organized into several key tables that capture different aspects of on-chain activity: > [card] [Blocks](/data-catalog/echelon/blocks) > > Contains each validated block in the chain > [card] [Block Events](/data-catalog/echelon/block_events) > > Contains all block-level events and attributes in the chain, partitioned by event_index > [card] [Message Events](/data-catalog/echelon/message_events) > > Contains all events and their corresponding attributes partitioned by message_index > [card] [Transactions](/data-catalog/echelon/transactions) > > Contains relevant data associated with each transaction > [card] [Transaction Messages](/data-catalog/echelon/tx_messages) > > Contains all messages submitted to the blockchain # Transactions Source: https://docs.dune.com/data-catalog/echelon/transactions Echelon blockchain transactions data # Table Description This table contains data about transactions in the Echelon blockchain, including transaction details, gas usage, and execution status. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_height** | bigint | The height of the block where the transaction occurred. | | **chain_id** | varchar | The ID of the chain where the transaction occurred. | | **tx_id** | varchar | The unique ID of the transaction. | | **tx_info** | varchar | Information related to the transaction. | | **tx_log_message** | varchar | The log message associated with the transaction. | | **memo** | varchar | A memo associated with the transaction. | | **fee** | varchar | The fee associated with the transaction. | | **tx_code** | bigint | The result code of the transaction. | | **tx_index** | bigint | The index of the transaction within the block. | | **gas_used** | bigint | The amount of gas used by the transaction. | | **gas_wanted** | bigint | The amount of gas requested by the transaction. | | **schema_version** | bigint | The schema version for the transaction data. | | **fee_coins** | varchar | The coins used to pay the transaction fee. | | **fee_granter** | varchar | The address granting the fee for the transaction. | | **fee_payer** | varchar | The address paying the fee for the transaction. | | **gas_limit** | bigint | The gas limit set for the transaction. | | **single_sign_mode** | bigint | The signing mode for single-signature transactions. | | **multi_sign_json** | varchar | JSON structure for multi-signature transactions. | | **timeout_height** | varchar | The timeout height set for the transaction. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=echelon\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=echelon\&table_name_t6f0df=transactions) # Transaction Messages Source: https://docs.dune.com/data-catalog/echelon/tx_messages Echelon blockchain transaction messages data # Table Description This table contains data about messages contained within transactions in the Echelon blockchain, including message types, content, and associated metadata. > [!TIP] > > On execution, transactions from Cosmos emit data in two formats: > > * Messages (`echelon.tx_messages`): These provide a high-level, readable summary of actions, such as "send money" or "execute contract." They are easier to understand and track transaction types. > * Events (`echelon.message_events`): These capture detailed, low-level changes at the chain level, including underlying blockchain modifications that may not always be directly related to state changes. > * Use Messages for a general overview and Events when you need detailed insights. The two tables are complementary. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the message occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the message belongs. | | **tx_id** | varchar | The hash of the transaction containing the message. | | **tx_index** | bigint | The index of the transaction in the block. | | **message_index** | bigint | The index of the message in the transaction. | | **message_type** | varchar | The type of message. | | **message** | varchar | The value/content of the message. | | **schema_version** | bigint | The version of the schema in provider database. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=echelon\&table_name_t6f0df=tx_messages](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=echelon\&table_name_t6f0df=tx_messages) # dex.trades on abstract Source: https://docs.dune.com/data-catalog/evm/abstract/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on abstract. > [!NOTE] > > This is a cross-chain table but can be filtered for abstract transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on abstract. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=abstract](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=abstract) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=abstract\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=abstract\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on abstract Source: https://docs.dune.com/data-catalog/evm/abstract/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on abstract. > [!NOTE] > > This is a cross-chain table but can be filtered for abstract transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on abstract. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=abstract](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=abstract) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=abstract\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=abstract\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Abstract Call Tables Source: https://docs.dune.com/data-catalog/evm/abstract/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Abstract network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # abstract.contracts Source: https://docs.dune.com/data-catalog/evm/abstract/decoded/contracts Verified contract registry on Abstract — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the abstract blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=contracts) # Event Logs - Abstract Source: https://docs.dune.com/data-catalog/evm/abstract/decoded/event-logs Smart contracts on Abstract emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # abstract.logs_decoded Source: https://docs.dune.com/data-catalog/evm/abstract/decoded/logs-decoded ABI-decoded event logs on Abstract — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from abstract transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/abstract/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on abstract?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for abstract on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=logs_decoded) # Abstract Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/abstract/decoded/overview Simplifying Abstract Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/abstract/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/abstract/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/abstract/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # abstract.traces_decoded Source: https://docs.dune.com/data-catalog/evm/abstract/decoded/traces-decoded ABI-decoded function calls on Abstract — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from abstract transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/abstract/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=traces_decoded) # Abstract Chain Overview Source: https://docs.dune.com/data-catalog/evm/abstract/overview Abstract blockchain data on Dune ## What is Abstract? Abstract is a Layer 2 (L2) network built on top of Ethereum, designed to securely support consumer-facing blockchain applications at scale. Utilizing zero-knowledge (ZK) rollup technology, Abstract achieves low fees and fast transaction speeds by processing transactions off-chain, then batching and verifying them on Ethereum using ZK proofs. With EVM compatibility, Abstract allows developers to port existing Ethereum applications with minimal adjustments, providing an Ethereum-like environment but with optimized scalability and reduced costs. ## Key Features of Abstract Abstract's infrastructure is built with a focus on scalability, security, and developer accessibility, offering several powerful features: ### **Layer 2 ZK Rollup Architecture** Abstract batches transactions off-chain and posts them to Ethereum for security, inheriting Ethereum’s security properties while enabling faster, more cost-effective transactions. This ZK rollup structure ensures that all state transitions are verified without executing transactions on Ethereum. ### **EVM Compatibility with Optimized VM** Abstract maintains compatibility with the Ethereum ecosystem, allowing developers to use familiar tools. However, Abstract's ZKsync VM utilizes optimized bytecode and opcodes to facilitate efficient ZK proof generation, offering unique ways for developers to build scalable applications. ### **Lower Gas Fees and Higher Throughput** Gas fees on Abstract are significantly lower than on Ethereum, thanks to batch processing and ZK proofing. This reduction in transaction costs, coupled with high throughput, makes Abstract ideal for high-demand applications. ## Transaction Lifecycle Each transaction on Abstract undergoes a lifecycle that includes four key stages: 1. **Processing on Abstract**: Transactions are executed on Abstract, and soft confirmation is provided to the user. 2. **Batch Submission to Ethereum**: Transactions are batched and committed to Ethereum in optimized submissions. 3. **Proof Validation**: A ZK proof validating the batch is generated off-chain and verified by Ethereum. 4. **State Finalization**: Once verified, the state is finalized, ensuring transaction accuracy on Ethereum. ## EVM Differences While compatible with Ethereum’s development environment, Abstract’s ZKsync VM introduces specific changes for optimized performance: * **Opcode Adjustments**: Certain opcodes are modified or supplemented by system contracts. * **Gas Fee Management**: Fees and refunds are handled differently via Abstract’s bootloader. * **Nonces and Libraries**: Nonces are stored within smart contract accounts, and library handling is adapted for efficiency. ## Why Abstract? Abstract combines Ethereum’s security with the scalability of ZK rollups, making it ideal for applications requiring high throughput and low transaction costs. This enables developers to build consumer-ready dApps without sacrificing speed, cost-efficiency, or security. > [card] [Abstract documentation](https://docs.abs.xyz/overview) > > Access full documentation for Abstract, including architecture, EVM differences, and best practices. ## Data Catalog > [card] [Logs](./raw/logs) > > Smart contract event logs with insights into Abstract’s ZK rollup dynamics. > [card] [Blocks](./raw/blocks) > > Information on processed blocks, highlighting Abstract’s throughput. > [card] [Transactions](./raw/transactions) > > Data on transactions, illustrating Abstract's cost-effective operation. > [card] [Decoded](./decoded/overview) > > Decoded transaction data for in-depth analysis of contract executions. # abstract.blocks Source: https://docs.dune.com/data-catalog/evm/abstract/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Abstract. ## Table description The `abstract.blocks` table contains information about blocks in the abstract blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM abstract.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM abstract.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM abstract.blocks
  GROUP BY 1 
  LIMIT 10`
# abstract.creation_traces Source: https://docs.dune.com/data-catalog/evm/abstract/raw/creation-traces Contract deployment records on Abstract — deployer address, factory context, and deployed bytecode. ## Table Description The `abstract.creation_traces` table contains information about the creation of smart contracts on the abstract blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the abstract blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the abstract blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM abstract.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM abstract.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM abstract.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# abstract.logs Source: https://docs.dune.com/data-catalog/evm/abstract/raw/logs Smart contract event logs on Abstract — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `abstract.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/abstract/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM abstract.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM abstract.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM abstract.logs
WHERE evt_block_number = 1000000`
# abstract.traces Source: https://docs.dune.com/data-catalog/evm/abstract/raw/traces Internal transaction traces on Abstract — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `abstract.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/abstract/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM abstract.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# abstract.transactions Source: https://docs.dune.com/data-catalog/evm/abstract/raw/transactions Every transaction on Abstract — from, to, value, gas, calldata, and receipt status. ## Table Description The `abstract.transactions` table contains information about all transactions on the abstract blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the abstract blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/abstract/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=abstract\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM abstract.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM abstract.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM abstract.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on apechain Source: https://docs.dune.com/data-catalog/evm/apechain/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on ApeChain — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for apechain transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on apechain. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=apechain](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=apechain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=apechain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=apechain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on apechain Source: https://docs.dune.com/data-catalog/evm/apechain/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on apechain. > [!NOTE] > > This is a cross-chain table but can be filtered for apechain transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on apechain. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=apechain](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=apechain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=apechain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=apechain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on apechain Source: https://docs.dune.com/data-catalog/evm/apechain/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on apechain. > [!NOTE] > > This is a cross-chain table but can be filtered for apechain transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on apechain. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=apechain](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=apechain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=apechain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=apechain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # ApeChain Call Tables Source: https://docs.dune.com/data-catalog/evm/apechain/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the ApeChain network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # apechain.contracts Source: https://docs.dune.com/data-catalog/evm/apechain/decoded/contracts Verified contract registry on ApeChain — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the apechain blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=contracts) # Event Logs - Apechain Source: https://docs.dune.com/data-catalog/evm/apechain/decoded/event-logs Smart contracts on Apechain emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # apechain.logs_decoded Source: https://docs.dune.com/data-catalog/evm/apechain/decoded/logs-decoded ABI-decoded event logs on ApeChain — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from apechain transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/apechain/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on apechain?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for apechain on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=logs_decoded) # ApeChain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/apechain/decoded/overview Simplifying ApeChain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/apechain/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/apechain/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/apechain/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # apechain.traces_decoded Source: https://docs.dune.com/data-catalog/evm/apechain/decoded/traces-decoded ABI-decoded function calls on ApeChain — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from apechain transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/apechain/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=traces_decoded) # ApeChain Overview Source: https://docs.dune.com/data-catalog/evm/apechain/overview ApeChain data on Dune ## What is ApeChain? ApeChain is a dedicated infrastructure layer designed to power the ApeCoin ecosystem. Built on Arbitrum Orbit, it provides developers and users with the best possible experience on the blockchain by focusing on ecosystem discovery, unique web3 rails, and top of funnel exposure. ## Key Features * **Native Gas Token**: Uses \$APE as its native gas token * **Arbitrum Orbit**: Built as an Arbitrum Orbit chain for scalability and efficiency * **Enhanced Utility**: Significantly enhances \$APE's utility * **Ecosystem Focus**: Powers the ApeCoin ecosystem with dedicated infrastructure ## Why ApeChain? ApeChain positions itself as a premier platform for the ApeCoin ecosystem by: * Fostering a robust and dynamic economy driven by \$APE * Providing dedicated infrastructure for ecosystem growth * Enhancing the utility and value proposition of \$APE ## Technical Architecture Built on Arbitrum Orbit, ApeChain inherits Arbitrum's robust technical foundation while adding ApeCoin-specific optimizations: ### Development Features * **Arbitrum Technology**: Leverages Arbitrum's proven Layer 2 scaling solution * **APE Integration**: Native support for APE token operations * **Ecosystem Tools**: Comprehensive development and analytics tools ### Network Economics * **Gas Token**: \$APE * **Economic Model**: Designed to enhance \$APE utility and ecosystem value > [card] [ApeChain Documentation](https://docs.apechain.com) > > Official documentation for developers building on ApeChain ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through event logs > [card] [Blocks](./raw/blocks) > > Information on blocks processed on ApeChain, reflecting network activity and capacity > [card] [Transactions](./raw/transactions) > > Detailed data on transactions, showcasing efficiency and operational execution > [card] [decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis and understanding of smart contract executions # apechain.blocks Source: https://docs.dune.com/data-catalog/evm/apechain/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for ApeChain. ## Table description The `apechain.blocks` table contains information about blocks in the apechain blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM apechain.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM apechain.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM apechain.blocks
  GROUP BY 1 
  LIMIT 10`
# apechain.creation_traces Source: https://docs.dune.com/data-catalog/evm/apechain/raw/creation-traces Contract deployment records on ApeChain — deployer address, factory context, and deployed bytecode. ## Table Description The `apechain.creation_traces` table contains information about the creation of smart contracts on the apechain blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the apechain blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the apechain blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM apechain.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM apechain.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM apechain.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# apechain.logs Source: https://docs.dune.com/data-catalog/evm/apechain/raw/logs Smart contract event logs on ApeChain — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `apechain.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/apechain/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM apechain.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM apechain.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM apechain.logs
WHERE evt_block_number = 1000000`
# apechain.traces Source: https://docs.dune.com/data-catalog/evm/apechain/raw/traces Internal transaction traces on ApeChain — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `apechain.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/apechain/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM apechain.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# apechain.transactions Source: https://docs.dune.com/data-catalog/evm/apechain/raw/transactions Every transaction on ApeChain — from, to, value, gas, calldata, and receipt status. ## Table Description The `apechain.transactions` table contains information about all transactions on the apechain blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the apechain blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/apechain/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=apechain\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM apechain.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM apechain.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM apechain.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on Arbitrum Nova Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Arbitrum Nova — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for nova transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on nova. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=nova](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=nova) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=nova\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=nova\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on nova Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on nova. > [!NOTE] > > This is a cross-chain table but can be filtered for nova transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on nova. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=nova](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=nova) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=nova\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=nova\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on Nova Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on Nova. > [!NOTE] > > This is a cross-chain table but can be filtered for nova transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on nova. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=nova](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=nova) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=nova\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=nova\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Arbitrum Nova Call Tables Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Arbitrum Nova network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # nova.contracts Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/decoded/contracts Verified contract registry on Arbitrum Nova — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the nova blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=contracts) # Event Logs - Arbitrum Nova Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/decoded/event-logs Smart contracts on Arbitrum Nova emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # nova.logs_decoded Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/decoded/logs-decoded ABI-decoded event logs on Arbitrum Nova — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from nova transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/nova/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on nova?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for nova on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=logs_decoded) # Arbitrum Nova Decoded Overview Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/decoded/overview Simplifying Arbitrum Nova smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/nova/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/nova/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/nova/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # nova.traces_decoded Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/decoded/traces-decoded ABI-decoded function calls on Arbitrum Nova — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from nova transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/nova/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=traces_decoded) # Arbitrum Nova Overview Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/overview Arbitrum Nova data on Dune ## What is Arbitrum Nova? Arbitrum Nova is a Layer 2 scaling solution on Ethereum that leverages the AnyTrust technology to provide efficient, low-cost transactions while maintaining high security and compatibility with the Ethereum ecosystem. As part of the Arbitrum family, Nova complements Arbitrum One by offering a different balance of security and transaction cost options for users and developers. ## Why Arbitrum Nova? Arbitrum Nova is designed to handle high transaction volumes at a lower cost, making it ideal for applications such as gaming, social networks, and other scenarios where frequent, low-cost transactions are essential. It uses the AnyTrust protocol, which optimizes security and efficiency, ensuring that transactions are both economical and secure. ## Arbitrum Nova Architecture Arbitrum Nova's architecture is built to maximize scalability and minimize transaction costs through its unique AnyTrust solution: ### AnyTrust Technology At the core of Arbitrum Nova is the AnyTrust protocol, which provides a flexible approach to transaction validation. This protocol batches transactions and uses a committee of trusted validators to ensure the integrity and security of the data. ### Rollup Mechanism Similar to Arbitrum One, Nova batches multiple transactions into a single rollup block. This rollup mechanism significantly increases throughput and reduces transaction costs by spreading the computational load across multiple transactions. ### Compatibility with Ethereum Arbitrum Nova maintains full compatibility with the Ethereum Virtual Machine (EVM), allowing developers to deploy their existing Solidity smart contracts on Nova without modifications. This seamless integration with Ethereum ensures that Nova can support a wide range of decentralized applications (dApps) with ease. ## Arbitrum Ecosystem Arbitrum offers two main chains on Ethereum: Arbitrum One, an Optimistic Rollup chain, and Arbitrum Nova, an AnyTrust chain. This dual-chain strategy allows users and developers to choose the solution that best fits their needs in terms of security and transaction costs. ### Utility Token Ether (ETH) is the primary utility token on Arbitrum Nova, used for paying transaction fees. This alignment with Ethereum's native currency simplifies the user experience and enhances interoperability within the Ethereum ecosystem. > [card] [Arbitrum Nova Website](https://arbitrum.io/anytrust) > > The official page for Arbitrum Nova (an AnyTrust chain), offering comprehensive details on the platform, its architecture, and resources for developers ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through event logs > [card] [Blocks](./raw/blocks) > > Information on blocks processed on Arbitrum Nova, reflecting network activity and capacity > [card] [Transactions](./raw/transactions) > > Detailed data on transactions, showcasing efficiency and operational execution > [card] [decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis and understanding of smart contract executions # nova.blocks Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Arbitrum Nova. ## Table description The `nova.blocks` table contains information about blocks in the nova blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM nova.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM nova.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM nova.blocks
  GROUP BY 1 
  LIMIT 10`
# nova.creation_traces Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/raw/creation-traces Contract deployment records on Arbitrum Nova — deployer address, factory context, and deployed bytecode. ## Table Description The `nova.creation_traces` table contains information about the creation of smart contracts on the nova blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the nova blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the nova blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM nova.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM nova.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM nova.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# nova.logs Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/raw/logs Smart contract event logs on Arbitrum Nova — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `nova.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/nova/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM nova.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM nova.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM nova.logs
WHERE evt_block_number = 1000000`
# nova.traces Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/raw/traces Internal transaction traces on Arbitrum Nova — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `nova.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/nova/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM nova.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# nova.transactions Source: https://docs.dune.com/data-catalog/evm/arbitrum-nova/raw/transactions Every transaction on Arbitrum Nova — from, to, value, gas, calldata, and receipt status. ## Table Description The `nova.transactions` table contains information about all transactions on the nova blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the nova blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/nova/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=nova\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM nova.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM nova.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM nova.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on Arbitrum Source: https://docs.dune.com/data-catalog/evm/arbitrum/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Arbitrum — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for arbitrum transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on arbitrum. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=arbitrum](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=arbitrum) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=arbitrum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=arbitrum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on arbitrum Source: https://docs.dune.com/data-catalog/evm/arbitrum/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on arbitrum. > [!NOTE] > > This is a cross-chain table but can be filtered for arbitrum transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on arbitrum. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=arbitrum](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=arbitrum) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=arbitrum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=arbitrum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on Arbitrum Source: https://docs.dune.com/data-catalog/evm/arbitrum/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on Arbitrum. > [!NOTE] > > This is a cross-chain table but can be filtered for arbitrum transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on arbitrum. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=arbitrum](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=arbitrum) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=arbitrum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=arbitrum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Arbitrum One Call Tables Source: https://docs.dune.com/data-catalog/evm/arbitrum/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Arbitrum One network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # arbitrum.contracts Source: https://docs.dune.com/data-catalog/evm/arbitrum/decoded/contracts Verified contract registry on Arbitrum — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the arbitrum blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=contracts) # Event Logs - Arbitrum Source: https://docs.dune.com/data-catalog/evm/arbitrum/decoded/event-logs Smart contracts on Arbitrum emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # arbitrum.logs_decoded Source: https://docs.dune.com/data-catalog/evm/arbitrum/decoded/logs-decoded ABI-decoded event logs on Arbitrum — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from arbitrum transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On arbitrum, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/arbitrum/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **arbitrum.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=logs_decoded) # Arbitrum One Decoded Overview Source: https://docs.dune.com/data-catalog/evm/arbitrum/decoded/overview Simplifying Arbitrum One smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/arbitrum/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/arbitrum/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/arbitrum/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # arbitrum.traces_decoded Source: https://docs.dune.com/data-catalog/evm/arbitrum/decoded/traces-decoded ABI-decoded function calls on Arbitrum — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from arbitrum transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/arbitrum/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=traces_decoded) # Arbitrum One Overview Source: https://docs.dune.com/data-catalog/evm/arbitrum/overview Arbitrum One data on Dune Arbitrum One is a Layer 2 scaling solution built on Ethereum that utilizes optimistic rollups to enhance scalability and reduce costs while maintaining compatibility with the Ethereum Virtual Machine (EVM). This allows developers to deploy their existing Solidity smart contracts on Arbitrum without any modifications. At the heart of Arbitrum One's technology is its unique rollup solution, which batches multiple transactions into a single rollup block. This technique dramatically increases throughput and decreases the transaction costs, all while leveraging the underlying security of the Ethereum mainnet. The primary utility token of Arbitrum One is Ether, which is used for paying transaction fees. Unlike traditional Layer 1 solutions, Arbitrum One offers a seamless extension of Ethereum, enhancing its scalability and efficiency without compromising on security or decentralization. Dune provides extensive datasets for Arbitrum One, covering various aspects such as event logs, transactions, blocks, and token movements. These datasets provide valuable insights into network performance, user behavior, and smart contract functionality. > [card] [Arbitrum One docs](https://arbitrum.io/docs) > > The official documentation for Arbitrum One, offering comprehensive details on the platform, its architecture, and resources for developers ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through event logs > [card] [Blocks](./raw/blocks) > > Information on blocks processed on Arbitrum One, reflecting network activity and capacity > [card] [Transactions](./raw/transactions) > > Detailed data on transactions, showcasing efficiency and operational execution > [card] [Decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis and understanding of smart contract executions # arbitrum.blocks Source: https://docs.dune.com/data-catalog/evm/arbitrum/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Arbitrum. ## Table description The `arbitrum.blocks` table contains information about blocks in the arbitrum blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM arbitrum.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM arbitrum.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM arbitrum.blocks
  GROUP BY 1 
  LIMIT 10`
# arbitrum.creation_traces Source: https://docs.dune.com/data-catalog/evm/arbitrum/raw/creation-traces Contract deployment records on Arbitrum — deployer address, factory context, and deployed bytecode. ## Table Description The `arbitrum.creation_traces` table contains information about the creation of smart contracts on the arbitrum blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the arbitrum blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the arbitrum blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM arbitrum.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM arbitrum.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM arbitrum.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# arbitrum.logs Source: https://docs.dune.com/data-catalog/evm/arbitrum/raw/logs Smart contract event logs on Arbitrum — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `arbitrum.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/arbitrum/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM arbitrum.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM arbitrum.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM arbitrum.logs
WHERE evt_block_number = 1000000`
# arbitrum.traces Source: https://docs.dune.com/data-catalog/evm/arbitrum/raw/traces Internal transaction traces on Arbitrum — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `arbitrum.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/arbitrum/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM arbitrum.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# arbitrum.transactions Source: https://docs.dune.com/data-catalog/evm/arbitrum/raw/transactions Every transaction on Arbitrum — from, to, value, gas, calldata, and receipt status. ## Table Description The `arbitrum.transactions` table contains information about all transactions on the arbitrum blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the arbitrum blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/arbitrum/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arbitrum\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM arbitrum.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM arbitrum.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM arbitrum.transactions
ORDER BY gas_price DESC
LIMIT 10`
# Arc Call Tables Source: https://docs.dune.com/data-catalog/evm/arc/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Arc network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # arc.contracts Source: https://docs.dune.com/data-catalog/evm/arc/decoded/contracts Verified contract registry on Arc — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the arc blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=contracts) # Event Logs - Arc Source: https://docs.dune.com/data-catalog/evm/arc/decoded/event-logs Smart contracts on Arc emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # arc.logs_decoded Source: https://docs.dune.com/data-catalog/evm/arc/decoded/logs-decoded ABI-decoded event logs on Arc — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from arc transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/arc/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on arc?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for arc on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=logs_decoded) # Arc Decoded Overview Source: https://docs.dune.com/data-catalog/evm/arc/decoded/overview Simplifying Arc smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/arc/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/arc/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/arc/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # arc.traces_decoded Source: https://docs.dune.com/data-catalog/evm/arc/decoded/traces-decoded ABI-decoded function calls on Arc — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from arc transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/arc/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=traces_decoded) # Arc Overview Source: https://docs.dune.com/data-catalog/evm/arc/overview Arc blockchain data on Dune ## What is Arc? Arc is an open EVM-compatible Layer 1 blockchain built by Circle for stablecoin-native financial applications. USDC is the native gas token, and the network targets sub-second deterministic finality for payments, FX, treasury, and onchain markets. Dune indexes Arc under the `arc` schema namespace with standard EVM raw tables and ABI-decoded contract data. ## Key Features * **USDC as gas**: Transaction fees are paid in USDC, so costs stay dollar-denominated rather than tied to a volatile native token. Native `value` fields and the ERC-20 USDC interface use different decimal scales (see below). * **EVM compatibility**: Deploy Solidity contracts with standard Ethereum tooling (Hardhat, Foundry, Viem). Arc targets the Osaka EVM baseline. * **Sub-second finality**: Malachite BFT consensus produces deterministic finality in under one second, with no probabilistic reorg window. * **Stablecoin-native design**: Native USDC, plus first-class support for assets such as EURC, underpins payments, FX, lending, and agentic settlement. ## EVM Specifics on Dune * **Schema namespace**: `arc` (query as `arc.blocks`, `arc.transactions`, etc.). * **Chain ID**: `5042` (mainnet). Transaction `chain_id` is stored as `0x13b2`. * **Native gas token**: USDC. Transaction and trace `value` fields use **18 decimals**. The ERC-20 interface at `0x3600000000000000000000000000000000000000` uses **6 decimals**. Both views share the same underlying balance — do not treat them as separate assets, and do not mix the two decimal scales. * **Raw tables**: `blocks`, `transactions`, `logs`, `traces`, `creation_traces`. * **Decoded infrastructure**: `arc.contracts`, `arc.signatures`, `arc.logs_decoded`, `arc.traces_decoded`. * **Standard token events**: `erc20_arc.evt_*`, `erc721_arc.evt_*`. ## Data on Dune > [card] [Raw Data](/data-catalog/evm/arc/raw/blocks) > > Block, transaction, log, and trace data indexed from Arc nodes. > [card] [Decoded Data](/data-catalog/evm/arc/decoded/overview) > > ABI-decoded contract interactions and events. ## Resources > [card] [Arc](https://www.arc.network/) > > Arc project home page. > [card] [Block Explorer](https://explorer.arc.io) > > Arc mainnet block explorer. # arc.blocks Source: https://docs.dune.com/data-catalog/evm/arc/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Arc. ## Table description The `arc.blocks` table contains information about blocks in the arc blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM arc.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM arc.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM arc.blocks
  GROUP BY 1 
  LIMIT 10`
# arc.creation_traces Source: https://docs.dune.com/data-catalog/evm/arc/raw/creation-traces Contract deployment records on Arc — deployer address, factory context, and deployed bytecode. ## Table Description The `arc.creation_traces` table contains information about the creation of smart contracts on the arc blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the arc blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the arc blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM arc.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM arc.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM arc.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# arc.logs Source: https://docs.dune.com/data-catalog/evm/arc/raw/logs Smart contract event logs on Arc — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `arc.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/arc/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM arc.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM arc.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM arc.logs
WHERE evt_block_number = 1000000`
# arc.traces Source: https://docs.dune.com/data-catalog/evm/arc/raw/traces Internal transaction traces on Arc — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `arc.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/arc/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM arc.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# arc.transactions Source: https://docs.dune.com/data-catalog/evm/arc/raw/transactions Every transaction on Arc — from, to, value, gas, calldata, and receipt status. ## Table Description The `arc.transactions` table contains information about all transactions on the arc blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the arc blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/arc/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=arc\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM arc.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM arc.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM arc.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on avalanche Source: https://docs.dune.com/data-catalog/evm/avalanche/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Avalanche — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for avalanche transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on avalanche. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=avalanche](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=avalanche) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=avalanche\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=avalanche\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on avalanche Source: https://docs.dune.com/data-catalog/evm/avalanche/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on avalanche. > [!NOTE] > > This is a cross-chain table but can be filtered for avalanche_c transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on avalanche_c. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=avalanche_c](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=avalanche_c) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=avalanche_c\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=avalanche_c\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT Trades on Avalanche Source: https://docs.dune.com/data-catalog/evm/avalanche/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on Avalanche. > [!NOTE] > > This is a cross-chain table but can be filtered for avalanche transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on avalanche. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=avalanche](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=avalanche) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=avalanche\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=avalanche\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Avalanche C-Chain Call Tables Source: https://docs.dune.com/data-catalog/evm/avalanche/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Avalanche C-Chain network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # avalanche_c.contracts Source: https://docs.dune.com/data-catalog/evm/avalanche/decoded/contracts Verified contract registry on Avalanche C-Chain — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the avalanche_c blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=contracts) # Event Logs - Avalanche Source: https://docs.dune.com/data-catalog/evm/avalanche/decoded/event-logs Smart contracts on Avalanche emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # avalanche_c.logs_decoded Source: https://docs.dune.com/data-catalog/evm/avalanche/decoded/logs-decoded ABI-decoded event logs on Avalanche C-Chain — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from avalanche transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On avalanche, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/avalanche/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **avalanche_c.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=logs_decoded) # Avalanche C-Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/avalanche/decoded/overview Simplifying Avalanche C-Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/avalanche/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/avalanche/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/avalanche/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # avalanche_c.traces_decoded Source: https://docs.dune.com/data-catalog/evm/avalanche/decoded/traces-decoded ABI-decoded function calls on Avalanche C-Chain — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from avalanche transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/avalanche/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche\&table_name_t6f0df=traces_decoded) # Avalanche C-Chain Overview Source: https://docs.dune.com/data-catalog/evm/avalanche/overview Avalanche C-Chain data on Dune Avalanche C-Chain is a Layer 1 blockchain that functions as part of the Avalanche network, offering high throughput and compatibility with the Ethereum Virtual Machine (EVM). This compatibility enables developers to migrate Ethereum dApps to Avalanche with minimal changes, utilizing the same Solidity programming language. The core innovation of Avalanche C-Chain is its consensus mechanism, which combines classical consensus and Nakamoto consensus techniques to deliver rapid transaction finality and robust security. This design allows the C-Chain to process transactions faster and at lower costs compared to traditional blockchain networks. \$AVAX is used as the primary utility token on the Avalanche C-Chain for transaction fees. However, the unique aspects of Avalanche's architecture provide enhanced scalability, making it a popular choice for developers seeking efficient and cost-effective blockchain solutions. Dune provides extensive datasets for Avalanche C-Chain, offering detailed insights into transactions, smart contract interactions, and overall network health. > [card] [Avalanche C-Chain docs](https://docs.avax.network) > > The official documentation for Avalanche C-Chain, with detailed guides on its technology, architecture, and developer resources ## Data Catalog > [card] [Logs](./raw/logs) > > Access detailed event logs from smart contracts to analyze contract activity and interactions > [card] [Blocks](./raw/blocks) > > Explore data on blocks processed by the C-Chain, illustrating network throughput and activity > [card] [Transactions](./raw/transactions) > > Transaction details that highlight the efficiency and speed of the Avalanche C-Chain > [card] [Decoded](./decoded/overview) > > Decoded transaction data for easier analysis and deeper understanding of contract executions # avalanche_c.blocks Source: https://docs.dune.com/data-catalog/evm/avalanche/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Avalanche C-Chain. ## Table description The `avalanche_c.blocks` table contains information about blocks in the avalanche_c blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM avalanche_c.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM avalanche_c.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM avalanche_c.blocks
  GROUP BY 1 
  LIMIT 10`
# avalanche_c.creation_traces Source: https://docs.dune.com/data-catalog/evm/avalanche/raw/creation-traces Contract deployment records on Avalanche C-Chain — deployer address, factory context, and deployed bytecode. ## Table Description The `avalanche_c.creation_traces` table contains information about the creation of smart contracts on the avalanche_c blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the avalanche_c blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the avalanche_c blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM avalanche_c.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM avalanche_c.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM avalanche_c.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# avalanche_c.logs Source: https://docs.dune.com/data-catalog/evm/avalanche/raw/logs Smart contract event logs on Avalanche C-Chain — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `avalanche_c.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/avalanche_c/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM avalanche_c.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM avalanche_c.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM avalanche_c.logs
WHERE evt_block_number = 1000000`
# avalanche_c.traces Source: https://docs.dune.com/data-catalog/evm/avalanche/raw/traces Internal transaction traces on Avalanche C-Chain — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `avalanche_c.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/avalanche_c/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM avalanche_c.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# avalanche_c.transactions Source: https://docs.dune.com/data-catalog/evm/avalanche/raw/transactions Every transaction on Avalanche C-Chain — from, to, value, gas, calldata, and receipt status. ## Table Description The `avalanche_c.transactions` table contains information about all transactions on the avalanche_c blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the avalanche_c blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/avalanche_c/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=avalanche_c\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM avalanche_c.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM avalanche_c.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM avalanche_c.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on b3 Source: https://docs.dune.com/data-catalog/evm/b3/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on B3 — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for b3 transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on b3. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=b3](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=b3) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=b3\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=b3\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on b3 Source: https://docs.dune.com/data-catalog/evm/b3/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on b3. > [!NOTE] > > This is a cross-chain table but can be filtered for b3 transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on b3. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=b3](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=b3) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=b3\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=b3\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on b3 Source: https://docs.dune.com/data-catalog/evm/b3/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on b3. > [!NOTE] > > This is a cross-chain table but can be filtered for b3 transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on b3. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=b3](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=b3) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=b3\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=b3\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # B3 Call Tables Source: https://docs.dune.com/data-catalog/evm/b3/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the B3 network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # b3.contracts Source: https://docs.dune.com/data-catalog/evm/b3/decoded/contracts Verified contract registry on B3 — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the b3 blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=contracts) # Event Logs - B3 Source: https://docs.dune.com/data-catalog/evm/b3/decoded/event-logs Smart contracts on B3 emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # b3.logs_decoded Source: https://docs.dune.com/data-catalog/evm/b3/decoded/logs-decoded ABI-decoded event logs on B3 — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from b3 transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/b3/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on b3?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for b3 on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=logs_decoded) # B3 Decoded Overview Source: https://docs.dune.com/data-catalog/evm/b3/decoded/overview Simplifying B3 smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/b3/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/b3/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/b3/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # b3.traces_decoded Source: https://docs.dune.com/data-catalog/evm/b3/decoded/traces-decoded ABI-decoded function calls on B3 — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from b3 transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/b3/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=traces_decoded) # B3 Overview Source: https://docs.dune.com/data-catalog/evm/b3/overview B3 data on Dune B3 is a fun-first gaming ecosystem designed to bring the next generation of gamers and game creators onchain. Created by a team of Base/Coinbase alumni and OG Ethereum contributors, B3 provides a seamless gaming experience without the need for wallets, bridging, or switching networks. Players can dive into games instantly—just visit [Basement.fun](https://basement.fun) to experience it yourself. **Fast, Cheap, and Scalable:** B3 is a Layer 3 (L3) solution that settles on Base, delivering lightning-fast transactions with sub-cent fees. It is purpose-built for gamers, offering dedicated blockspace that scales to meet the demands of high-throughput games. Whether you're building or playing, B3 ensures a smooth, low-cost experience. **Onchain is the New Online:** B3 envisions a future where onchain gaming becomes the new standard for online interactions, empowering game creators and rewarding creativity. B3 allows anyone to play games from anywhere, all while leveraging the security and scalability of Base. **Scalable Architecture:** B3's rollup engine offers horizontal scaling through application-layer sharding. By orchestrating dedicated sidecars for games and other computationally heavy operations, B3 can handle web2-scale games while maintaining near gasless transactions. **Built on Base:** As a secure, low-cost Layer 2 incubated by Coinbase, Base provides the ideal foundation for B3. Leveraging Base as its settlement layer, B3 is positioned to further scale the Base ecosystem and contribute to its technical and product strategy. > [card] [B3 documentation](https://docs.b3.fun/) > > Explore comprehensive documentation of B3, detailing its architecture, protocol, and resources for developers. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, providing insights into interactions within the B3 network. > [card] [Blocks](./raw/blocks) > > Information on blocks, illustrating the operational capacity and activity levels on B3. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the efficiency and execution of operations on B3. > [card] [Decoded](./decoded/overview) > > Enhanced transaction data decoded for better analysis and understanding of contract executions. # b3.blocks Source: https://docs.dune.com/data-catalog/evm/b3/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for B3. ## Table description The `b3.blocks` table contains information about blocks in the b3 blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM b3.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM b3.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM b3.blocks
  GROUP BY 1 
  LIMIT 10`
# b3.creation_traces Source: https://docs.dune.com/data-catalog/evm/b3/raw/creation-traces Contract deployment records on B3 — deployer address, factory context, and deployed bytecode. ## Table Description The `b3.creation_traces` table contains information about the creation of smart contracts on the b3 blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the b3 blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the b3 blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM b3.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM b3.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM b3.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# b3.logs Source: https://docs.dune.com/data-catalog/evm/b3/raw/logs Smart contract event logs on B3 — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `b3.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/b3/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM b3.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM b3.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM b3.logs
WHERE evt_block_number = 1000000`
# b3.traces Source: https://docs.dune.com/data-catalog/evm/b3/raw/traces Internal transaction traces on B3 — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `b3.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/b3/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM b3.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# b3.transactions Source: https://docs.dune.com/data-catalog/evm/b3/raw/transactions Every transaction on B3 — from, to, value, gas, calldata, and receipt status. ## Table Description The `b3.transactions` table contains information about all transactions on the b3 blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the b3 blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/b3/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=b3\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM b3.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM b3.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM b3.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on base Source: https://docs.dune.com/data-catalog/evm/base/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Base — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for base transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on base. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=base](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=base) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=base\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=base\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on base Source: https://docs.dune.com/data-catalog/evm/base/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on base. > [!NOTE] > > This is a cross-chain table but can be filtered for base transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on base. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=base](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=base) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=base\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=base\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on Base Source: https://docs.dune.com/data-catalog/evm/base/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on Base. > [!NOTE] > > This is a cross-chain table but can be filtered for base transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on base. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=base](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=base) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=base\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=base\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Base Call Tables Source: https://docs.dune.com/data-catalog/evm/base/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Base network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # base.contracts Source: https://docs.dune.com/data-catalog/evm/base/decoded/contracts Verified contract registry on Base — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the base blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=contracts) # Event Logs - Base Source: https://docs.dune.com/data-catalog/evm/base/decoded/event-logs Smart contracts on Base emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # base.logs_decoded Source: https://docs.dune.com/data-catalog/evm/base/decoded/logs-decoded ABI-decoded event logs on Base — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from base transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/base/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on base?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for base on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=logs_decoded) # Base Decoded Overview Source: https://docs.dune.com/data-catalog/evm/base/decoded/overview Simplifying Base smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/base/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/base/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/base/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # base.traces_decoded Source: https://docs.dune.com/data-catalog/evm/base/decoded/traces-decoded A description of the base.traces_decoded table on Dune ## Table Description The `traces_decoded` table contains decoded traces from base transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/base/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=traces_decoded) # Base Overview Source: https://docs.dune.com/data-catalog/evm/base/overview Base data on Dune Base is a secure, low-cost, builder-friendly Ethereum Layer 2 solution incubated by Coinbase. It is designed to onboard the next billion users to the blockchain, emphasizing ease of use and accessibility for a global audience. The platform aims for progressive decentralization over the years, underlining its commitment to an open, global cryptoeconomy. As an Ethereum L2, Base offers the security, stability, and scalability necessary to support your onchain applications. Developers can deploy any EVM-compatible codebase and smoothly transition users and assets from Ethereum L1, Coinbase, and other compatible chains. **Big Features, Small Fees:** Base provides an Ethereum Virtual Machine (EVM) environment at significantly lower costs. It introduces early access to new Ethereum features such as Account Abstraction (ERC4337), developer-friendly APIs for gasless transactions, and advanced smart contract wallets. **Open Source Commitment:** Built on the MIT-licensed OP Stack in collaboration with Optimism, Base contributes as the second Core Development team to ensure the OP Stack remains a public good accessible to all. **Scaled by Coinbase:** Base leverages Coinbase's robust infrastructure to offer decentralized apps enhanced product integration, straightforward fiat onramps, and access to a vast network of millions of verified users within the Coinbase ecosystem. > [card] [Base documentation](https://base.org/docs) > > Explore comprehensive documentation on Base, detailing its architecture, protocol, and resources for developers. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, providing insights into interactions within the Base network. > [card] [Blocks](./raw/blocks) > > Information on blocks, illustrating the operational capacity and activity levels on Base. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the efficiency and execution of operations on Base. > [card] [Decoded](./decoded/overview) > > Enhanced transaction data decoded for better analysis and understanding of contract executions. # base.blocks Source: https://docs.dune.com/data-catalog/evm/base/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Base. ## Table description The `base.blocks` table contains information about blocks in the base blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM base.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM base.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM base.blocks
  GROUP BY 1 
  LIMIT 10`
# base.creation_traces Source: https://docs.dune.com/data-catalog/evm/base/raw/creation-traces Contract deployment records on Base — deployer address, factory context, and deployed bytecode. ## Table Description The `base.creation_traces` table contains information about the creation of smart contracts on the base blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the base blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the base blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM base.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM base.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM base.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# base.logs Source: https://docs.dune.com/data-catalog/evm/base/raw/logs Smart contract event logs on Base — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `base.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/base/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM base.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM base.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM base.logs
WHERE evt_block_number = 1000000`
# base.traces Source: https://docs.dune.com/data-catalog/evm/base/raw/traces Internal transaction traces on Base — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `base.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/base/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM base.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# base.transactions Source: https://docs.dune.com/data-catalog/evm/base/raw/transactions Every transaction on Base — from, to, value, gas, calldata, and receipt status. ## Table Description The `base.transactions` table contains information about all transactions on the base blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the base blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/base/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=base\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM base.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM base.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM base.transactions
ORDER BY gas_price DESC
LIMIT 10`
# beacon.attestations Source: https://docs.dune.com/data-catalog/evm/beacon/attestations Beacon chain attestations — validator votes on source, target, and head checkpoints. ## Table Description The `beacon.attestations` table stores attestation data that is exchanged between validators and users on the Beacon network. This table is partitioned by block_date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_epoch** | long | Epoch number when the block containing the attestation was proposed. | | **block_slot** | long | Slot number within the epoch when the block containing the attestation was proposed. | | **block_time** | timestamp | Timestamp when the block containing the attestation was included in the chain. | | **block_date** | date | Date corresponding to the block_time. | | **signature** | binary | BLS signature verifying the attestation's authenticity. | | **aggregation_bits** | binary | Bitlist indicating participating validators in the committee. | | **beacon_block_root** | binary | Root hash of the Beacon Chain block that the attestation votes for. | | **index** | long | Committee index at the assigned slot for the attestation. | | **slot** | long | Slot number to which the attestation pertains. | | **source_epoch** | long | Epoch of the last justified checkpoint referred to as the source in the FFG vote. | | **source_root** | binary | Root hash of the Beacon Chain block at the source checkpoint epoch. | | **target_epoch** | long | Epoch that the attestation targets in its FFG vote. | | **target_root** | binary | Root hash of the Beacon Chain block at the target checkpoint epoch. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=attestations](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=attestations) # beacon.attester_slashings Source: https://docs.dune.com/data-catalog/evm/beacon/attester-slashings Beacon chain attester slashings — contradictory attestation violations. ## Table Description The `beacon.attester_slashings` table stores attester slashing data that is exchanged between validators and users on the Beacon network. This table is partitioned by `block_date`. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_epoch** | long | Epoch number when the block containing the attester slashing was proposed. | | **block_slot** | long | Slot number within the epoch when the block containing the attester slashing was proposed. | | **block_time** | timestamp | Timestamp when the block containing the attester slashing was included in the chain. | | **block_date** | date | Date corresponding to the block_time. | | **attestation_1_attesting_indices** | array | List of validator indices involved in the first conflicting attestation. | | **attestation_1_beacon_block_root** | binary | Root hash of the Beacon Chain block that the first attestation votes for. | | **attestation_1_index** | long | Committee index for the first attestation. | | **attestation_1_slot** | long | Slot number to which the first attestation pertains. | | **attestation_1_source_epoch** | long | Epoch of the last justified checkpoint referred to as the source in the first attestation. | | **attestation_1_source_root** | binary | Root hash of the Beacon Chain block at the source checkpoint epoch in the first attestation. | | **attestation_1_target_epoch** | long | Epoch that the first attestation targets in its FFG vote. | | **attestation_1_target_root** | binary | Root hash of the Beacon Chain block at the target checkpoint epoch in the first attestation. | | **attestation_1_signature** | binary | BLS signature associated with the first attestation. | | **attestation_2_attesting_indices** | array | List of validator indices involved in the second conflicting attestation. | | **attestation_2_beacon_block_root** | binary | Root hash of the Beacon Chain block that the second attestation votes for. | | **attestation_2_index** | long | Committee index for the second attestation. | | **attestation_2_slot** | long | Slot number to which the second attestation pertains. | | **attestation_2_source_epoch** | long | Epoch of the last justified checkpoint referred to as the source in the second attestation. | | **attestation_2_source_root** | binary | Root hash of the Beacon Chain block at the source checkpoint epoch in the second attestation. | | **attestation_2_target_epoch** | long | Epoch that the second attestation targets in its FFG vote. | | **attestation_2_target_root** | binary | Root hash of the Beacon Chain block at the target checkpoint epoch in the second attestation. | | **attestation_2_signature** | binary | BLS signature associated with the second attestation. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=attester_slashings](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=attester_slashings) # beacon.blobs Source: https://docs.dune.com/data-catalog/evm/beacon/blobs Beacon chain blob data — EIP-4844 blob sidecar data for rollup data availability. ## Table Description The `beacon.blobs` table stores blob sidecar data that is exchanged between validators and users on the Beacon network. This table is partitioned by block_date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_epoch** | long | Epoch number when the block containing the blob sidecar was proposed. | | **block_slot** | long | Slot number within the epoch when the block containing the blob sidecar was proposed. | | **block_time** | timestamp | Timestamp when the block containing the blob sidecar was included in the chain. | | **block_date** | date | Date corresponding to the block_time. | | **index** | long | Index of the blob sidecar within the block. | | **proposer_index** | long | Validator index of the block proposer. | | **kzg_commitment** | binary | KZG commitment for the blob, ensuring data availability and integrity. | | **kzg_commitment_inclusion_proof** | binary | Proof that the KZG commitment is included in the block, verifying its validity. | | **kzg_proof** | binary | KZG proof associated with the blob, used for data verification. | | **body_root** | binary | Root hash of the block body, representing its contents. | | **parent_root** | binary | Root hash of the parent block, linking to the previous block in the chain. | | **state_root** | binary | Root hash of the state after processing the block, reflecting the system's state. | | **signature** | binary | BLS signature of the block proposer, ensuring authenticity. | | **blob** | binary | The actual blob data associated with the sidecar, containing arbitrary data stored temporarily. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=blobs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=blobs) # beacon.blocks Source: https://docs.dune.com/data-catalog/evm/beacon/blocks Ethereum beacon chain blocks — slot, proposer, attestation count, and execution payload. ## Table Description The `beacon.blocks` table stores information about blocks in the Ethereum 2.0 Beacon Chain, including the block proposer, block metadata, and associated blob sidecars. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **epoch** | long | Epoch number when the block was proposed. | | **slot** | long | Slot number within the epoch when the block was proposed. | | **time** | timestamp | Timestamp when the block was included in the chain. | | **date** | date | Date corresponding to the time. | | **parent_root** | binary | Root hash of the parent block, linking to the previous block in the chain. | | **proposer_index** | long | Validator index of the block proposer. | | **state_root** | binary | Root hash of the state after processing the block, reflecting the system's state. | | **execution_optimistic** | boolean | Indicates if the block is considered optimistic in terms of execution. | | **finalized** | boolean | Indicates if the block has been finalized. | | **version** | string | Version of the block structure or protocol. | | **signature** | binary | BLS signature of the block proposer, ensuring authenticity. | | **graffiti** | binary | Arbitrary data included by the proposer, often used for identification or messages. | | **randao_reveal** | binary | Revealed RANDAO value used for randomness in validator selection. | | **eth1_block_hash** | binary | Hash of the latest Ethereum 1.0 block observed by the proposer. | | **eth1_deposit_count** | long | Number of deposits from Ethereum 1.0 included up to this block. | | **eth1_deposit_root** | binary | Root hash of the deposit tree containing Ethereum 1.0 deposits. | | **execution_payload_timestamp** | long | Timestamp of the execution payload within the block. | | **execution_payload_base_fee_per_gas** | long | Base fee per gas for transactions in the execution payload. | | **execution_payload_block_hash** | binary | Hash of the execution payload block. | | **execution_payload_block_number** | long | Block number of the execution payload. | | **execution_payload_extra_data** | binary | Extra data field in the execution payload, containing arbitrary data. | | **execution_payload_fee_recipient** | binary | Address of the fee recipient for transaction fees in the execution payload. | | **execution_payload_gas_limit** | long | Gas limit for the execution payload block. | | **execution_payload_gas_used** | long | Amount of gas used in the execution payload block. | | **execution_payload_logs_bloom** | binary | Bloom filter for logs in the execution payload, used for quick log searches. | | **execution_payload_parent_hash** | binary | Hash of the parent execution payload block. | | **execution_payload_prev_randao** | binary | Previous RANDAO value in the execution payload, used for randomness. | | **execution_payload_receipts_root** | binary | Root hash of the receipts trie for transactions in the execution payload. | | **execution_payload_state_root** | binary | Root hash of the state trie after applying the execution payload. | | **execution_payload_transactions** | array | List of transactions included in the execution payload. | | **sync_committee_bits** | binary | Bitfield indicating which sync committee members have signed off on the block. | | **sync_committee_signature** | binary | Aggregate signature from the sync committee members for the block. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=blocks) # beacon.bls_to_execution_changes Source: https://docs.dune.com/data-catalog/evm/beacon/bls-to-execution-changes Beacon chain BLS-to-execution credential changes — withdrawal address updates. ## Table Description The `beacon.bls_to_execution_changes` table stores information about changes in the Beacon Chain from BLS to execution, including block metadata and execution payload details. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_epoch** | long | Epoch number when the block containing the BLS to execution change was proposed. | | **block_slot** | long | Slot number within the epoch when the block containing the BLS to execution change was proposed. | | **block_time** | timestamp | Timestamp when the block containing the BLS to execution change was included in the chain. | | **block_date** | date | Date corresponding to the block_time. | | **from_bls_pubkey** | binary | BLS public key associated with the validator's original withdrawal credentials. | | **to_execution_address** | binary | Execution layer (Eth1) address to which the withdrawal credentials are being updated. | | **validator_index** | long | Index of the validator requesting the change. | | **signature** | binary | BLS signature authorizing the change from BLS to execution withdrawal credentials. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=bls_to_execution_changes](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=bls_to_execution_changes) # beacon.deposits Source: https://docs.dune.com/data-catalog/evm/beacon/deposits Beacon chain deposits — ETH staking deposits with validator pubkeys and withdrawal credentials. ## Table Description The `beacon.deposits` table stores deposit data for validators joining the Beacon network. This table is partitioned by block_date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_epoch** | long | Epoch number when the block containing the deposit was proposed. | | **block_slot** | long | Slot number within the epoch when the block containing the deposit was proposed. | | **block_time** | timestamp | Timestamp when the block containing the deposit was included in the chain. | | **block_date** | date | Date corresponding to the block_time. | | **amount** | long | Amount of ETH deposited, specified in Gwei. | | **pubkey** | binary | BLS public key of the validator making the deposit. | | **signature** | binary | BLS signature verifying the deposit data. | | **withdrawal_credentials** | binary | Credentials specifying the withdrawal address or conditions. | | **proof** | binary | Merkle proof demonstrating the inclusion of the deposit in the Ethereum 1.0 deposit contract. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=deposits](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=deposits) # beacon.epoch_summaries Source: https://docs.dune.com/data-catalog/evm/beacon/epoch-summaries Beacon chain epoch summaries — participation rates, rewards, and finality data per epoch. ## Table Description The `beacon.epoch_summaries` table is indexed from Lido. Stores summary data for each epoch on the Beacon Chain, including the number of validators, attestations, and other key metrics. This table is partitioned by block_date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_date** | date | Date corresponding to the epoch. | | **epoch** | bigint | Epoch number representing a specific period in the Beacon Chain. | | **activation_queue_length** | bigint | Number of validators awaiting activation. | | **activating_validators** | bigint | Number of validators activated during the epoch. | | **active_validators** | bigint | Total number of active validators during the epoch. | | **active_real_balance** | bigint | Total effective balance of active validators, measured in Gwei. | | **active_balance** | bigint | Total balance of active validators, measured in Gwei. | | **attesting_validators** | bigint | Number of validators who submitted attestations during the epoch. | | **attesting_balance** | bigint | Total balance of attesting validators, measured in Gwei. | | **target_correct_validators** | bigint | Number of validators whose attestations correctly identified the target block. | | **target_correct_balance** | bigint | Total balance of target-correct validators, measured in Gwei. | | **head_correct_validators** | bigint | Number of validators whose attestations correctly identified the head block. | | **head_correct_balance** | bigint | Total balance of head-correct validators, measured in Gwei. | | **attestations_for_epoch** | bigint | Number of attestations included in the epoch. | | **attestations_in_epoch** | bigint | Number of attestations referencing the epoch. | | **duplicate_attestations_for_epoch** | bigint | Number of duplicate attestations included in the epoch. | | **proposer_slashings** | bigint | Number of proposer slashing events during the epoch. | | **attester_slashings** | bigint | Number of attester slashing events during the epoch. | | **deposits** | bigint | Number of deposits processed during the epoch. | | **exiting_validators** | bigint | Number of validators exiting during the epoch. | | **canonical_blocks** | bigint | Number of canonical blocks in the epoch. | | **withdrawals** | bigint | Number of withdrawals processed during the epoch. | | **updated_at** | timestamp | Last time the record was updated. | | **ingested_at** | timestamp | Time when the record was ingested. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=epoch_summaries](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=epoch_summaries) # beacon.operators Source: https://docs.dune.com/data-catalog/evm/beacon/operators Beacon chain operators — validator groupings by known staking entity or operator. ## Table Description The `beacon.operators` table is indexed from Lido. Stores information about staking operators on the Beacon Chain, including their public keys and associated staking modules or services. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **index** | bigint | Unique identifier for the operator. | | **operator_name** | varchar | Name of the staking operator. | | **module_id** | bigint | Identifier linking the operator to a specific staking module or service. | | **public_key** | varbinary | Operator's public key used for cryptographic operations. | | **updated_at** | timestamp | Last time the record was updated. | | **ingested_at** | timestamp | Time when the record was ingested. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=operators](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=operators) # Beacon Overview Source: https://docs.dune.com/data-catalog/evm/beacon/overview Beacon Chain data on Dune The Ethereum **Beacon Chain** is the backbone of Ethereum's transition to a Proof-of-Stake (PoS) consensus mechanism. Launched on December 1, 2020, it introduced PoS to the Ethereum ecosystem, enhancing security, scalability, and energy efficiency. **Key Features:** * **Proof-of-Stake Consensus:** The Beacon Chain manages a registry of validators who propose and attest to new blocks, replacing the energy-intensive Proof-of-Work system. * **Validator Coordination:** It coordinates validators, ensuring the network's security and proper functioning by assigning responsibilities and managing rewards and penalties. * **Foundation for Sharding:** The Beacon Chain lays the groundwork for future scalability improvements, such as sharding, which will enable the network to process more transactions concurrently. **Data Catalog** Explore the following datasets to gain insights into the Beacon Chain's operations: > [card] [Attestations](./attestations) > > Records of validator attestations, which are votes for a specific block, contributing to consensus and chain finality. > [card] [Attester Slashings](./attester-slashings) > > Details of penalties imposed on validators who have violated protocol rules by signing conflicting attestations. > [card] [Blob Sidecars](./blobs) > > Data related to blob sidecars, which are auxiliary data structures associated with blocks. > [card] [Blocks](./blocks) > > Information on Beacon Chain blocks, including proposer details, parent roots, and state roots. > [card] [BLS to Execution Changes](./bls-to-execution-changes) > > Records of changes from BLS public keys to execution addresses, facilitating validator withdrawals. > [card] [Deposits](./deposits) > > Details of ETH deposits made by validators to join the Beacon Chain and participate in staking. > [card] [Epoch Summaries](./epoch-summaries) > > Summarized data for each epoch, providing insights into validator performance and network health. > [card] [Operators](./operators) > > Information about staking operators managing validator nodes on the Beacon Chain. > [card] [Proposer Slashings](./proposer-slashings) > > Details of penalties imposed on validators who have proposed conflicting blocks. > [card] [Validator Day Summaries](./validator-day-summaries) > > Daily summaries of validator activities, balances, and performance metrics. > [card] [Voluntary Exits](./voluntary-exits) > > Records of validators voluntarily exiting the active set, ceasing their participation in consensus duties. > [card] [Withdrawals](./withdrawals) > > Information on ETH withdrawals by validators from the Beacon Chain to the execution layer. These datasets provide a comprehensive view of the Beacon Chain's functionality, validator activities, and the overall health of Ethereum's PoS consensus layer. # beacon.proposer_slashings Source: https://docs.dune.com/data-catalog/evm/beacon/proposer-slashings Beacon chain proposer slashings — double-proposal violations and penalized validators. ## Table Description The `beacon.proposer_slashings` table stores information about proposer slashings on the Beacon Chain. A proposer slashing occurs when a validator proposes two conflicting blocks at the same slot. This table contains information about the conflicting blocks and the proposer responsible for the slashing. | **Column** | **Type** | **Description** | | - | - | - | | **block_epoch** | long | Epoch number when the block containing the proposer slashing was proposed. | | **block_slot** | long | Slot number within the epoch when the block containing the proposer slashing was proposed. | | **block_time** | timestamp | Timestamp when the block containing the proposer slashing was included in the chain. | | **block_date** | date | Date corresponding to the block_time. | | **signed_header_1_body_root** | binary | Root hash of the body of the first conflicting block header. | | **signed_header_1_parent_root** | binary | Root hash of the parent block referenced by the first conflicting block header. | | **signed_header_1_proposer_index** | long | Validator index of the proposer for the first conflicting block. | | **signed_header_1_slot** | long | Slot number for which the first conflicting block was proposed. | | **signed_header_1_state_root** | binary | Root hash of the state after processing the first conflicting block. | | **signed_header_1_signature** | binary | BLS signature of the proposer for the first conflicting block. | | **signed_header_2_body_root** | binary | Root hash of the body of the second conflicting block header. | | **signed_header_2_parent_root** | binary | Root hash of the parent block referenced by the second conflicting block header. | | **signed_header_2_proposer_index** | long | Validator index of the proposer for the second conflicting block. | | **signed_header_2_slot** | long | Slot number for which the second conflicting block was proposed. | | **signed_header_2_state_root** | binary | Root hash of the state after processing the second conflicting block. | | **signed_header_2_signature** | binary | BLS signature of the proposer for the second conflicting block. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=proposer_slashings](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=proposer_slashings) # beacon.raw Source: https://docs.dune.com/data-catalog/evm/beacon/raw Raw beacon chain data — unprocessed consensus layer records. ## Table Description The `beacon.raw` table stores raw data about blocks proposed on the Beacon network. This table is partitioned by block_date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **epoch** | long | Epoch number during which the block was proposed. | | **block_slot** | long | Slot number within the epoch when the block was proposed. | | **block_time** | timestamp | Timestamp indicating when the block was included in the chain. | | **block_date** | date | Date corresponding to the block_time. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=raw](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=raw) # beacon.validator_day_summaries Source: https://docs.dune.com/data-catalog/evm/beacon/validator-day-summaries Daily beacon chain validator summaries — rewards, penalties, and attestation performance. ## Table Description The `beacon.validator_day_summaries` table is indexed from Lido. Stores daily summaries of validator activity on the Beacon Chain, including balance changes, rewards, attestations, and sync committee messages. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_date** | date | Date corresponding to the summary period. | | **validator_index** | bigint | Unique identifier for the validator. | | **start_timestamp** | timestamp | Timestamp marking the beginning of the summary period. | | **start_balance** | bigint | Validator's balance at the start of the period, measured in Gwei. | | **start_effective_balance** | bigint | Validator's effective balance at the start of the period, used for reward calculations, measured in Gwei. | | **capital_change** | bigint | Net change in the validator's balance due to deposits or withdrawals during the period, measured in Gwei. | | **reward_change** | bigint | Net rewards earned by the validator during the period, measured in Gwei. | | **effective_balance_change** | bigint | Change in the validator's effective balance during the period, measured in Gwei. | | **proposals** | bigint | Number of block proposals assigned to the validator during the period. | | **proposals_included** | bigint | Number of the validator's proposed blocks that were included in the chain during the period. | | **attestations** | bigint | Number of attestations made by the validator during the period. | | **attestations_included** | bigint | Number of the validator's attestations that were included in the chain during the period. | | **attestations_source_timely** | bigint | Number of the validator's attestations that were timely for the source checkpoint during the period. | | **attestations_target_correct** | bigint | Number of the validator's attestations that correctly identified the target checkpoint during the period. | | **attestations_target_timely** | bigint | Number of the validator's attestations that were timely for the target checkpoint during the period. | | **attestations_head_correct** | bigint | Number of the validator's attestations that correctly identified the head block during the period. | | **attestations_head_timely** | bigint | Number of the validator's attestations that were timely for the head block during the period. | | **attestations_inclusion_delay** | double | Average delay (in slots) between the validator's attestation and its inclusion in the chain during the period. | | **sync_committee_messages** | bigint | Number of sync committee messages signed by the validator during the period. | | **sync_committee_messages_included** | bigint | Number of the validator's sync committee messages that were included in the chain during the period. | | **withdrawals** | bigint | Number of withdrawals made by the validator during the period. | | **updated_at** | timestamp | Last time the record was updated. | | **ingested_at** | timestamp | Time when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=validator_day_summaries](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=validator_day_summaries) # beacon.validators Source: https://docs.dune.com/data-catalog/evm/beacon/validators Beacon chain validator registry — pubkey, status, balance, and activation/exit epochs. ## Table Description The `beacon.validators` table stores data about validators on the Beacon network. This table is partitioned by block_date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **index** | bigint | Unique identifier assigned to the validator upon registration. | | **slashed** | boolean | Indicates whether the validator has been slashed for misbehavior (`true` if slashed, `false` otherwise). | | **public_key** | varbinary | Validator's BLS public key used for signing messages. | | **activation_eligibility_epoch** | bigint | Epoch when the validator became eligible for activation after meeting the minimum balance requirement. | | **activation_epoch** | bigint | Epoch when the validator was activated and began participating in the consensus process. | | **exit_epoch** | bigint | Epoch when the validator exited the active validator set. | | **withdrawable_epoch** | bigint | Epoch when the validator's funds become withdrawable after exiting. | | **effective_balance** | bigint | Validator's balance used for reward calculations, capped at a maximum value, measured in Gwei. | | **withdrawal_credentials** | varbinary | Credentials used to specify the destination for withdrawn funds. | | **updated_at** | timestamp | Last time the record was updated | | **ingested_at** | timestamp | Time when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=validators](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=validators) # beacon.voluntary_exits Source: https://docs.dune.com/data-catalog/evm/beacon/voluntary-exits Beacon chain voluntary exits — validators initiating the exit process. ## Table Description The `beacon.voluntary_exits` table stores data about voluntary exits initiated by validators on the Beacon network. This table is partitioned by block_date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_epoch** | long | Epoch number when the block containing the voluntary exit was proposed. | | **block_slot** | long | Slot number within the epoch when the block containing the voluntary exit was proposed. | | **block_time** | timestamp | Timestamp when the block containing the voluntary exit was included in the chain. | | **block_date** | date | Date corresponding to the block_time. | | **validator_index** | long | Unique identifier of the validator initiating the voluntary exit. | | **signature** | binary | BLS signature authorizing the voluntary exit, ensuring its authenticity. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=voluntary_exits](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=voluntary_exits) # beacon.withdrawals Source: https://docs.dune.com/data-catalog/evm/beacon/withdrawals Beacon chain withdrawals — validator ETH withdrawals with amounts and recipient addresses. ## Table Description The `beacon.withdrawals` table stores data about withdrawals initiated by validators on the Beacon network. This table is partitioned by block_date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_epoch** | long | Epoch number when the block containing the withdrawal was proposed. | | **block_slot** | long | Slot number within the epoch when the block containing the withdrawal was proposed. | | **block_time** | timestamp | Timestamp when the block containing the withdrawal was included in the chain. | | **block_date** | date | Date corresponding to the block_time. | | **address** | binary | Execution layer (ETH1) address receiving the withdrawn ETH. | | **amount** | long | Amount of ETH withdrawn, specified in Gwei. | | **index** | long | Unique identifier for the withdrawal operation. | | **validator_index** | long | Index of the validator initiating the withdrawal. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=withdrawals](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=beacon\&table_name_t6f0df=withdrawals) # dex_aggregator.trades on berachain Source: https://docs.dune.com/data-catalog/evm/berachain/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Berachain — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for berachain transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on berachain. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=berachain](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=berachain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=berachain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=berachain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on berachain Source: https://docs.dune.com/data-catalog/evm/berachain/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on berachain. > [!NOTE] > > This is a cross-chain table but can be filtered for berachain transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on berachain. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=berachain](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=berachain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=berachain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=berachain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on berachain Source: https://docs.dune.com/data-catalog/evm/berachain/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on berachain. > [!NOTE] > > This is a cross-chain table but can be filtered for berachain transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on berachain. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=berachain](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=berachain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=berachain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=berachain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Berachain Call Tables Source: https://docs.dune.com/data-catalog/evm/berachain/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Berachain network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # berachain.contracts Source: https://docs.dune.com/data-catalog/evm/berachain/decoded/contracts Verified contract registry on Berachain — contract name, namespace, ABI, and deployment metadata. ## Table Description The `berachain.contracts` table contains information about the contracts Dune has decoded on the Berachain blockchain. ## Column Descriptions | Column | Type | Description | | - | - | - | | `abi_id` | `varchar` | Unique identifier for the ABI | | `abi` | `array(varchar)` | Contract ABI (Application Binary Interface) | | `address` | `varbinary` | Contract address | | `from` | `varbinary` | Address that deployed the contract | | `code` | `varbinary` | Deployed bytecode of the contract | | `name` | `varchar` | Name of the contract | | `namespace` | `varchar` | Project namespace (e.g., uniswap_v3) | | `dynamic` | `boolean` | Whether the contract was dynamically detected | | `base` | `boolean` | Whether this is the base contract submission | | `factory` | `boolean` | Whether this contract is a factory contract | | `detection_source` | `varchar` | How the contract was detected (manual, factory, etc.) | | `created_at` | `timestamp` | When this record was created in Dune | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=contracts) # Event Logs - Berachain Source: https://docs.dune.com/data-catalog/evm/berachain/decoded/event-logs Smart contracts on Berachain emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # berachain.logs_decoded Source: https://docs.dune.com/data-catalog/evm/berachain/decoded/logs-decoded ABI-decoded event logs on Berachain — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from Berachain transactions. The table matches `topic0` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Event Logs](/data-catalog/evm/berachain/decoded/event-logs). The `berachain.logs_decoded` table is great for gaining a high-level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_date` | `date` | Date of the block (UTC) | | `block_time` | `timestamp` | Timestamp of the block containing this log | | `block_number` | `bigint` | Block number containing this log | | `namespace` | `varchar` | Project namespace (e.g., uniswap_v3) | | `contract_name` | `varchar` | Name of the contract that emitted the event | | `contract_address` | `varbinary` | Address of the contract that emitted the event | | `tx_hash` | `varbinary` | Hash of the transaction containing this log | | `tx_from` | `varbinary` | Address that initiated the transaction | | `tx_to` | `varbinary` | Address the transaction was sent to | | `tx_index` | `integer` | Position of the transaction within the block | | `index` | `integer` | Position of the log within the block | | `signature` | `varbinary` | Event signature hash (topic0) | | `event_name` | `varchar` | Decoded name of the event | | `created_at` | `timestamp` | When this record was created in Dune | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=logs_decoded) # Berachain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/berachain/decoded/overview Simplifying Berachain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/berachain/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/berachain/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/berachain/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # berachain.traces_decoded Source: https://docs.dune.com/data-catalog/evm/berachain/decoded/traces-decoded ABI-decoded function calls on Berachain — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from Berachain transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/berachain/decoded/call-tables). The `berachain.traces_decoded` table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_date` | `date` | Date of the block (UTC) | | `block_time` | `timestamp` | Timestamp of the block containing this trace | | `block_number` | `bigint` | Block number containing this trace | | `namespace` | `varchar` | Project namespace (e.g., uniswap_v3) | | `contract_name` | `varchar` | Name of the contract that was called | | `to` | `varbinary` | Address of the contract that was called | | `trace_address` | `array(bigint)` | Path of this trace within the call tree | | `tx_hash` | `varbinary` | Hash of the parent transaction | | `tx_from` | `varbinary` | Address that initiated the transaction | | `tx_to` | `varbinary` | Address the transaction was sent to | | `tx_index` | `integer` | Position of the transaction within the block | | `success` | `boolean` | Whether this trace executed successfully | | `signature` | `varbinary` | Function signature (first 4 bytes of calldata) | | `function_name` | `varchar` | Decoded name of the function called | | `created_at` | `timestamp` | When this record was created in Dune | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=traces_decoded) # Berachain Overview Source: https://docs.dune.com/data-catalog/evm/berachain/overview Berachain data on Dune Berachain is a high-performance EVM-Identical Layer 1 blockchain utilizing Proof-of-Liquidity (PoL), and built on top of the modular EVM-focused consensus client framework BeaconKit. It combines the security and decentralization of traditional blockchains with innovative tokenomics and liquidity mechanisms. **EVM Identical Architecture:** Berachain's execution layer is identical to the Ethereum Virtual Machine (EVM) runtime environment seen on Ethereum Mainnet. This means it uses existing unmodified execution clients like Geth, Reth, Erigon, Nethermind, and more to handle executing smart contracts, and supports all the tooling that comes native with the EVM. **Proof-of-Liquidity (PoL):** Berachain introduces a novel consensus mechanism that radically changes L1 economics, prioritizing users and applications over validator rewards. Network incentives go towards enriching ecosystem liquidity, contributing to: * Efficient trading * Price stability * Chain security * Network/user growth **BeaconKit Framework:** Built on BeaconKit, a modular framework for building EVM consensus clients, Berachain integrates the benefits of CometBFT consensus, including increased composability and single slot finality (SSF). > [card] [Berachain documentation](https://docs.berachain.com/learn/) > > Access the official documentation for Berachain, providing comprehensive information about its architecture, features, and development resources. ## Data Catalog > [card] [Logs](./raw/logs) > > Event logs from smart contracts, providing insights into interactions and activities on the Berachain network. > [card] [Blocks](./raw/blocks) > > Information on blocks processed using Berachain's PoL technology, reflecting the network's capacity for high transaction throughput. > [card] [Transactions](./raw/transactions) > > Detailed transaction data, showcasing the operational efficiency and cost-effectiveness of Berachain's solution. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and better understanding of smart contract executions on Berachain. # berachain.blocks Source: https://docs.dune.com/data-catalog/evm/berachain/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Berachain. ## Table Description The `berachain.blocks` table contains information about blocks in the Berachain blockchain. Each block contains a collection of transactions that are hashed and added to the blockchain. Berachain uses CometBFT consensus through BeaconKit, providing single slot finality (SSF) for faster and more secure block confirmations. ## Column Descriptions | Column | Type | Description | | - | - | - | | `time` | `timestamp` | The time when the block was mined | | `number` | `bigint` | The block number (height) | | `gas_limit` | `decimal` | Maximum gas allowed in the block | | `gas_used` | `decimal` | Total gas used by all transactions in the block | | `difficulty` | `bigint` | Mining difficulty of the block | | `total_difficulty` | `decimal` | Cumulative difficulty of the chain up to this block | | `size` | `bigint` | Size of the block in bytes | | `base_fee_per_gas` | `bigint` | Base fee per gas unit (EIP-1559) | | `hash` | `varbinary` | Hash of the block | | `parent_hash` | `varbinary` | Hash of the parent block | | `miner` | `varbinary` | Address of the miner/validator | | `nonce` | `varbinary` | Nonce used in mining the block | | `date` | `date` | Date of the block (UTC) | | `blob_gas_used` | `bigint` | Total blob gas used in the block (EIP-4844) | | `excess_blob_gas` | `bigint` | Excess blob gas for fee calculation (EIP-4844) | | `parent_beacon_block_root` | `varbinary` | Root of the parent beacon block | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=blocks) # berachain.creation_traces Source: https://docs.dune.com/data-catalog/evm/berachain/raw/creation-traces Contract deployment records on Berachain — deployer address, factory context, and deployed bytecode. ## Table Description The `creation_traces` table contains information about the creation of smart contracts on the Berachain blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the Berachain blockchain. The `berachain.creation_traces` table is a subset of the `traces` table, which contains information about all traces on the Berachain blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type` = `create`. ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_time` | `timestamp` | Timestamp of the block containing this creation trace | | `block_number` | `bigint` | Block number containing this creation trace | | `tx_hash` | `varbinary` | Hash of the transaction that created the contract | | `address` | `varbinary` | Address of the newly created contract | | `from` | `varbinary` | Address that deployed the contract | | `code` | `varbinary` | Bytecode of the deployed contract | | `block_month` | `date` | Month of the block (for partitioning) | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=creation_traces) # berachain.logs Source: https://docs.dune.com/data-catalog/evm/berachain/raw/logs Smart contract event logs on Berachain — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `berachain.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed on Berachain. As an EVM-identical chain, Berachain maintains complete compatibility with Ethereum's logging system while benefiting from its unique PoL consensus mechanism. Logs consist of: * Topic list: a list of 0 to 4 32-byte data topics * data: contains non-indexed data ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_time` | `timestamp` | Timestamp of the block containing this log | | `block_number` | `bigint` | Block number containing this log | | `block_hash` | `varbinary` | Hash of the block containing this log | | `contract_address` | `varbinary` | Address of the contract that emitted the log | | `topic0` | `varbinary` | Event signature hash (first indexed topic) | | `topic1` | `varbinary` | First indexed event parameter | | `topic2` | `varbinary` | Second indexed event parameter | | `topic3` | `varbinary` | Third indexed event parameter | | `data` | `varbinary` | Non-indexed event data | | `tx_hash` | `varbinary` | Hash of the transaction that generated this log | | `index` | `integer` | Position of the log within the block | | `tx_index` | `integer` | Position of the transaction within the block | | `block_date` | `date` | Date of the block (UTC) | | `tx_from` | `varbinary` | Address that initiated the transaction | | `tx_to` | `varbinary` | Address the transaction was sent to | | `blob_gas_price` | `bigint` | Blob gas price of the transaction (EIP-4844) | | `blob_gas_used` | `bigint` | Blob gas used by the transaction (EIP-4844) | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=logs) # berachain.traces Source: https://docs.dune.com/data-catalog/evm/berachain/raw/traces Internal transaction traces on Berachain — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `berachain.traces` table contains the traces of transactions executed on the Ethereum Virtual Machine (EVM). It includes traces of both top-level and internal transactions. Traces are the result of transaction execution and are used to debug and understand how transactions are processed. They are also known as `internal transactions`. This is the raw version of this table, for decoded transaction calls, see the [call tables](/data-catalog/evm/berachain/decoded/call-tables) section. ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_time` | `timestamp` | Timestamp of the block containing this trace | | `block_number` | `bigint` | Block number containing this trace | | `value` | `uint256` | Amount of native token transferred (in wei) | | `gas` | `bigint` | Gas provided for this trace | | `gas_used` | `bigint` | Gas consumed by this trace | | `block_hash` | `varbinary` | Hash of the block containing this trace | | `success` | `boolean` | Whether this trace executed successfully | | `tx_index` | `integer` | Position of the transaction within the block | | `sub_traces` | `bigint` | Number of child traces spawned by this trace | | `error` | `varchar` | Error message if the trace failed | | `tx_success` | `boolean` | Whether the parent transaction succeeded | | `tx_hash` | `varbinary` | Hash of the parent transaction | | `from` | `varbinary` | Address that initiated this trace | | `to` | `varbinary` | Address the trace was sent to | | `trace_address` | `array(bigint)` | Path of this trace within the call tree | | `type` | `varchar` | Type of trace (call, create, suicide, reward) | | `address` | `varbinary` | Address of the contract created (for create traces) | | `code` | `varbinary` | Bytecode of the contract created | | `call_type` | `varchar` | Type of call (call, delegatecall, staticcall) | | `input` | `varbinary` | Input data for the trace | | `output` | `varbinary` | Output data from the trace | | `refund_address` | `varbinary` | Address receiving refund (for selfdestruct) | | `block_date` | `date` | Date of the block (UTC) | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=traces) # berachain.transactions Source: https://docs.dune.com/data-catalog/evm/berachain/raw/transactions Every transaction on Berachain — from, to, value, gas, calldata, and receipt status. ## Table Description The `berachain.transactions` table contains information about all transactions on the Berachain blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, and gas price. Berachain's EVM-identical architecture ensures full compatibility with Ethereum tooling while leveraging its Proof-of-Liquidity (PoL) mechanism for enhanced efficiency. ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_time` | `timestamp` | Timestamp of the block containing this transaction | | `block_number` | `bigint` | Block number containing this transaction | | `value` | `decimal` | Amount of native token transferred (in wei) | | `gas_limit` | `bigint` | Maximum gas the sender is willing to use | | `gas_price` | `bigint` | Price per gas unit (in wei) | | `gas_used` | `bigint` | Actual gas consumed by the transaction | | `max_fee_per_gas` | `bigint` | Maximum total fee per gas (EIP-1559) | | `max_priority_fee_per_gas` | `bigint` | Maximum priority fee (tip) per gas (EIP-1559) | | `priority_fee_per_gas` | `bigint` | Actual priority fee per gas paid | | `nonce` | `bigint` | Transaction count of the sender before this transaction | | `index` | `bigint` | Position of the transaction within the block | | `success` | `boolean` | Whether the transaction executed successfully | | `from` | `varbinary` | Address of the transaction sender | | `to` | `varbinary` | Address of the transaction recipient | | `block_hash` | `varbinary` | Hash of the block containing this transaction | | `data` | `varbinary` | Calldata sent with the transaction | | `hash` | `varbinary` | Unique hash of the transaction | | `type` | `varchar` | Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844) | | `access_list` | `array(row)` | List of addresses and storage keys accessed (EIP-2930) | | `block_date` | `date` | Date of the block (UTC) | | `blob_versioned_hashes` | `array(varbinary)` | Versioned hashes of blobs (EIP-4844) | | `max_fee_per_blob_gas` | `bigint` | Maximum fee per blob gas (EIP-4844) | | `authorization_list` | `array(row)` | Authorization list for EIP-7702 transactions | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=berachain\&table_name_t6f0df=transactions) # dex_aggregator.trades on blast Source: https://docs.dune.com/data-catalog/evm/blast/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Blast — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for blast transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on blast. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=blast](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=blast) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=blast\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=blast\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on Blast Source: https://docs.dune.com/data-catalog/evm/blast/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on Blast. > [!NOTE] > > This is a cross-chain table but can be filtered for blast transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on blast. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=blast](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=blast) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=blast\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=blast\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on Blast Source: https://docs.dune.com/data-catalog/evm/blast/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on Blast. > [!NOTE] > > This is a cross-chain table but can be filtered for blast transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on blast. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=blast](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=blast) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=blast\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=blast\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Blast Call Tables Source: https://docs.dune.com/data-catalog/evm/blast/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Blast network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # blast.contracts Source: https://docs.dune.com/data-catalog/evm/blast/decoded/contracts Verified contract registry on Blast — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the blast blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=contracts) # Event Logs - Blast Source: https://docs.dune.com/data-catalog/evm/blast/decoded/event-logs Smart contracts on Blast emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # blast.logs_decoded Source: https://docs.dune.com/data-catalog/evm/blast/decoded/logs-decoded ABI-decoded event logs on Blast — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from blast transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/blast/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on blast?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for blast on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=logs_decoded) # Blast Decoded Overview Source: https://docs.dune.com/data-catalog/evm/blast/decoded/overview Simplifying Blast smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/blast/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/blast/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/blast/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # blast.traces_decoded Source: https://docs.dune.com/data-catalog/evm/blast/decoded/traces-decoded ABI-decoded function calls on Blast — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from blast transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/blast/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=traces_decoded) # Blast Overview Source: https://docs.dune.com/data-catalog/evm/blast/overview Blast data on Dune Analytics > [!WARNING] > > Starting from the 26th of September 2025 Dune is not live ingesting and indexing Blast data. The historical data of the chain will remain available to be used. Blast is an Ethereum Layer 2 (L2) that natively provides yield for ETH and stablecoins. Blast is an EVM-compatible, optimistic rollup that raises the baseline yield for users and developers without changing the experience cryptonatives expect. This yield makes it possible to create new business models for Dapps that aren't possible on other L2s. ### Key Features: * **Yield:** Blast is the only Ethereum L2 with native yield for ETH and stablecoins. The yield comes from ETH staking and RWA protocols. The default interest rate on other L2s is 0%. On Blast, it's 4% for ETH and 5% for stablecoins. * **Auto Rebasing:** ETH itself, not WETH, STETH, or any other ERC20, is natively rebasing on the L2. The ETH balance for EOAs is automatically rebasing. Smart contracts can opt-in to this rebasing, making it easy for existing Dapps to deploy on Blast without any changes. USDB, Blast's native stablecoin, is automatically rebasing as well. Like ETH on Blast, USDB is automatically rebasing for EOAs. USDB is also automatically rebasing for smart contracts. Smart contracts can opt-out from this rebasing. * **L1 Staking:** Blast only became possible following Ethereum's Shanghai upgrade. ETH yield from L1 staking, initially Lido, is automatically transferred to users via rebasing ETH on the L2. In the future, the Blast community will have the power to supplement, or even fully replace, Lido with Blast-native solutions or other third-party protocols. * **T-Bill Yield:** Users who bridge stablecoins receive USDB, Blast's auto-rebasing stablecoin. The yield for USDB comes from MakerDAO's on-chain T-Bill protocol. USDB can be redeemed for DAI when bridging back to Ethereum. In the future, the Blast community will have the power to supplement, or even fully replace, MakerDAO with Blast-native solutions or other third-party protocols. * **Gas Revenue Sharing:** Other L2s keep revenue from gas fees for themselves. Blast gives net gas revenue back to dApps programmatically. dApps developers can keep this revenue for themselves or use it to subsidize gas fees for users. > [card] [Blast documentation](https://docs.blast.io/) > > Explore comprehensive documentation on Blast, detailing its architecture, protocol, and resources for developers. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, providing insights into interactions within the Blast network. > [card] [Blocks](./raw/blocks) > > Information on blocks, illustrating the operational capacity and activity levels on Blast. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the efficiency and execution of operations on Blast. > [card] [Decoded](./decoded/overview) > > Enhanced transaction data decoded for better analysis and understanding of contract executions. # blast.blocks Source: https://docs.dune.com/data-catalog/evm/blast/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Blast. ## Table description The `blast.blocks` table contains information about blocks in the blast blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM blast.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM blast.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM blast.blocks
  GROUP BY 1 
  LIMIT 10`
# blast.creation_traces Source: https://docs.dune.com/data-catalog/evm/blast/raw/creation-traces Contract deployment records on Blast — deployer address, factory context, and deployed bytecode. ## Table Description The `blast.creation_traces` table contains information about the creation of smart contracts on the blast blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the blast blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the blast blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM blast.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM blast.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM blast.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# blast.logs Source: https://docs.dune.com/data-catalog/evm/blast/raw/logs Smart contract event logs on Blast — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `blast.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/blast/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM blast.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM blast.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM blast.logs
WHERE evt_block_number = 1000000`
# blast.traces Source: https://docs.dune.com/data-catalog/evm/blast/raw/traces Internal transaction traces on Blast — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `blast.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/blast/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM blast.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# blast.transactions Source: https://docs.dune.com/data-catalog/evm/blast/raw/transactions Every transaction on Blast — from, to, value, gas, calldata, and receipt status. ## Table Description The `blast.transactions` table contains information about all transactions on the blast blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the blast blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/blast/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=blast\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM blast.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM blast.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM blast.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on bnb Source: https://docs.dune.com/data-catalog/evm/bnb/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on BNB Chain — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for bnb transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on bnb. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=bnb](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=bnb) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=bnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=bnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on bnb Source: https://docs.dune.com/data-catalog/evm/bnb/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on bnb. > [!NOTE] > > This is a cross-chain table but can be filtered for bnb transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on bnb. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=bnb](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=bnb) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=bnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=bnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on bnb Source: https://docs.dune.com/data-catalog/evm/bnb/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on bnb. > [!NOTE] > > This is a cross-chain table but can be filtered for bnb transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on bnb. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=bnb](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=bnb) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=bnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=bnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # BNB Chain Call Tables Source: https://docs.dune.com/data-catalog/evm/bnb/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the BNB Chain network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # bnb.contracts Source: https://docs.dune.com/data-catalog/evm/bnb/decoded/contracts Verified contract registry on BNB Chain — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the bnb blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=contracts) # Event Logs - BNB Source: https://docs.dune.com/data-catalog/evm/bnb/decoded/event-logs Smart contracts on BNB emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # bnb.logs_decoded Source: https://docs.dune.com/data-catalog/evm/bnb/decoded/logs-decoded ABI-decoded event logs on BNB Chain — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from bnb transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/bnb/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on bnb?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for bnb on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=logs_decoded) # BNB Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/bnb/decoded/overview Simplifying BNB Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/bnb/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/bnb/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/bnb/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # bnb.traces_decoded Source: https://docs.dune.com/data-catalog/evm/bnb/decoded/traces-decoded ABI-decoded function calls on BNB Chain — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from bnb transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/bnb/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=traces_decoded) # BNB Chain Overview Source: https://docs.dune.com/data-catalog/evm/bnb/overview BNB Chain data on Dune BNB Chain is a high-performance blockchain network developed by Binance that supports the creation and functionality of decentralized applications (dApps). It is designed to provide scalability and high throughput with low transaction costs, targeting a broad and global user base. BNB Chain operates as a dual-chain architecture, which combines the capabilities of Binance Chain (BC) and Binance Smart Chain (BSC) into a single ecosystem. This design supports interoperability and flexible user experiences, allowing transfers and cross-chain communication between different blockchains. **Efficient and Economical:** BNB Chain provides a scalable infrastructure with significantly reduced transaction fees, making it accessible for a wide range of applications, from small transactions to large-scale dApps. **EVM Compatibility:** It fully supports Ethereum Virtual Machine (EVM) compatible applications, enabling developers to migrate Ethereum-based dApps to BNB Chain with minimal adjustments and utilize the existing developer tools and ecosystem. **Robust Community and Ecosystem:** BNB Chain benefits from the strong community support and the extensive ecosystem of Binance, including integrations with Binance’s marketplaces, services, and large user base. > [card] [BNB Chain documentation](https://docs.bnbchain.org) > > Access the official documentation for BNB Chain, offering detailed guides on its technology, architecture, and resources for developers. ## Data Catalog > [card] [Logs](./raw/logs) > > Event logs from smart contracts, offering insights into interactions and activities on BNB Chain. > [card] [Blocks](./raw/blocks) > > Data on blocks processed, indicating network activity and operational capacity on BNB Chain. > [card] [Transactions](./raw/transactions) > > Detailed information on transactions, illustrating operational efficiency and execution on the network. > [card] [Decoded](./decoded/overview) > > Decoded transaction data for easier analysis and better understanding of smart contract executions. # bnb.blocks Source: https://docs.dune.com/data-catalog/evm/bnb/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for BNB Chain. ## Table description The `bnb.blocks` table contains information about blocks in the bnb blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM bnb.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM bnb.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM bnb.blocks
  GROUP BY 1 
  LIMIT 10`
# bnb.creation_traces Source: https://docs.dune.com/data-catalog/evm/bnb/raw/creation-traces Contract deployment records on BNB Chain — deployer address, factory context, and deployed bytecode. ## Table Description The `bnb.creation_traces` table contains information about the creation of smart contracts on the bnb blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the bnb blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the bnb blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM bnb.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM bnb.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM bnb.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# bnb.logs Source: https://docs.dune.com/data-catalog/evm/bnb/raw/logs Smart contract event logs on BNB Chain — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `bnb.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/bnb/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM bnb.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM bnb.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM bnb.logs
WHERE evt_block_number = 1000000`
# bnb.traces Source: https://docs.dune.com/data-catalog/evm/bnb/raw/traces Internal transaction traces on BNB Chain — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `bnb.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/bnb/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM bnb.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# bnb.transactions Source: https://docs.dune.com/data-catalog/evm/bnb/raw/transactions Every transaction on BNB Chain — from, to, value, gas, calldata, and receipt status. ## Table Description The `bnb.transactions` table contains information about all transactions on the bnb blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the bnb blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/bnb/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bnb\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM bnb.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM bnb.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM bnb.transactions
ORDER BY gas_price DESC
LIMIT 10`
# BOB Overview Source: https://docs.dune.com/data-catalog/evm/bob/overview BOB data on Dune ## What is BOB? BOB ("Build on Bitcoin") is a first-of-its-kind hybrid Layer-2 powered by Bitcoin and Ethereum. It combines the security, liquidity, and userbase of Bitcoin with the innovation capabilities of Ethereum's EVM. BOB aims to become the most secure and accessible Layer-2 for developers and users. ### Why Hybrid L2? BOB leverages Bitcoin’s robustness and Ethereum’s smart contract capabilities to bridge the gap between mass adoption and innovation. It allows developers to build dapps on a network with the highest security and user base while providing Bitcoin users access to Ethereum's innovative ecosystem without leaving the Bitcoin network. ### BOB Architecture #### BOB Stack ![](https://mintcdn.com/dune/uyJ-jHeSRFvNrzyu/images/bob-stack.png?fit=max\&auto=format\&n=uyJ-jHeSRFvNrzyu\&q=85\&s=ff1ad2158455656574238b0678544910) **Rollup Layer**: Utilizing Bitcoin’s PoW security and native Ethereum bridge, BOB initially launches on the OP stack, aiming to settle directly on Bitcoin L1 using merged mining and optimistic rollup mechanisms. **EVM Core**: At its core, BOB leverages Ethereum's EVM, supporting Solidity smart contracts, existing developer tooling, wallets, and infrastructure components like block explorers and data analytics tools. **Rust zkVM**: Supporting Bitcoin’s Rust libraries through RISC Zero zkVM, enabling off-chain execution of Rust programs with ZK proofs verified in EVM smart contracts. This paves the way for future ZK rollups on Bitcoin. **Bitcoin Bridges**: BOB provides trustless access to Bitcoin block and transactional data via a BTC light client, supporting a range of decentralized and institutional Bitcoin bridges for seamless interaction with Ethereum assets. **BOB SDK**: A comprehensive toolkit for developers building on Bitcoin, offering Solidity contracts to interact with Bitcoin assets, improved APIs, and tools for a unified BTC and EVM wallet experience. #### BOB Rollup Design BOB’s hybrid L2 design will be launched in multiple stages: * **Phase 1 ("Launch")**: Bootstrapping as an ETH rollup. * **Phase 2**: Bitcoin PoW security and economic alignment through merged mining. * **Phase 3**: Hybrid L2 with settlement on Bitcoin and Ethereum, leveraging BitVM for security. > [card] [BOB documentation](https://docs.gobob.xyz/docs/learn/introduction/stack) > > Explore comprehensive documentation on BOB, detailing its architecture, protocol, and resources for developers. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, providing insights into interactions within the BOB network. > [card] [Blocks](./raw/blocks) > > Information on blocks, illustrating the operational capacity and activity levels on BOB. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the efficiency and execution of operations on BOB. > [card] [Traces](./raw/traces) > > Enhanced transaction data, including internal transactions invoked by top-level transactions. # bob.blocks Source: https://docs.dune.com/data-catalog/evm/bob/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for BOB. ## Table description The `bob.blocks` table contains information about blocks in the bob blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bob\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bob\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM bob.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM bob.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM bob.blocks
  GROUP BY 1 
  LIMIT 10`
# bob.logs Source: https://docs.dune.com/data-catalog/evm/bob/raw/logs Smart contract event logs on BOB — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `bob.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/bob/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bob\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bob\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM bob.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM bob.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM bob.logs
WHERE evt_block_number = 1000000`
# bob.traces Source: https://docs.dune.com/data-catalog/evm/bob/raw/traces Internal transaction traces on BOB — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `bob.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/bob/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bob\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bob\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM bob.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# bob.transactions Source: https://docs.dune.com/data-catalog/evm/bob/raw/transactions Every transaction on BOB — from, to, value, gas, calldata, and receipt status. ## Table Description The `bob.transactions` table contains information about all transactions on the bob blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the bob blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/bob/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bob\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=bob\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM bob.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM bob.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM bob.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on boba Source: https://docs.dune.com/data-catalog/evm/boba/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Boba — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for boba transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on boba. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=boba](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=boba) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=boba\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=boba\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on boba Source: https://docs.dune.com/data-catalog/evm/boba/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on boba. > [!NOTE] > > This is a cross-chain table but can be filtered for boba transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on boba. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=boba](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=boba) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=boba\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=boba\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on Boba Source: https://docs.dune.com/data-catalog/evm/boba/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on Boba. > [!NOTE] > > This is a cross-chain table but can be filtered for boba transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on boba. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=boba](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=boba) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=boba\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=boba\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Boba Call Tables Source: https://docs.dune.com/data-catalog/evm/boba/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Boba network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # boba.contracts Source: https://docs.dune.com/data-catalog/evm/boba/decoded/contracts Verified contract registry on Boba — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the boba blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=contracts) # Event Logs - Boba Source: https://docs.dune.com/data-catalog/evm/boba/decoded/event-logs Smart contracts on Boba emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # boba.logs_decoded Source: https://docs.dune.com/data-catalog/evm/boba/decoded/logs-decoded ABI-decoded event logs on Boba — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from boba transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/boba/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on boba?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for boba on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=logs_decoded) # Boba Decoded Overview Source: https://docs.dune.com/data-catalog/evm/boba/decoded/overview Simplifying Boba smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/boba/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/boba/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/boba/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # boba.traces_decoded Source: https://docs.dune.com/data-catalog/evm/boba/decoded/traces-decoded ABI-decoded function calls on Boba — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from boba transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/boba/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=traces_decoded) # Boba Overview Source: https://docs.dune.com/data-catalog/evm/boba/overview Boba data on Dune Analytics Boba is an Ethereum Layer 2 (L2) optimistic rollup that offers fast transactions and low fees. It is EVM-compatible, allowing developers to easily deploy existing Ethereum smart contracts on Boba. Some key features of Boba include: * **Fast Transactions:** Boba provides fast transaction confirmations by leveraging optimistic rollups, enabling high throughput and scalability. * **Low Fees:** By processing transactions off-chain and only posting data back to Ethereum for finality, Boba offers significantly lower transaction fees compared to Ethereum mainnet. * **EVM Compatibility:** Boba is fully compatible with the Ethereum Virtual Machine (EVM), allowing developers to deploy existing Ethereum smart contracts without modifications. * **Security:** Boba inherits the security of Ethereum by leveraging fraud proofs and a challenge period to ensure the validity of state transitions. > [card] [Boba documentation](https://docs.boba.network/) > > Explore comprehensive documentation on Boba, detailing its architecture, protocol, and resources for developers. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, providing insights into interactions within the Boba network. > [card] [Blocks](./raw/blocks) > > Information on blocks, illustrating the operational capacity and activity levels on Boba. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the efficiency and execution of operations on Boba. > [card] [Decoded](./decoded/overview) > > Enhanced transaction data decoded for better analysis and understanding of contract executions. # boba.blocks Source: https://docs.dune.com/data-catalog/evm/boba/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Boba. ## Table description The `boba.blocks` table contains information about blocks in the boba blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM boba.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM boba.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM boba.blocks
  GROUP BY 1 
  LIMIT 10`
# boba.creation_traces Source: https://docs.dune.com/data-catalog/evm/boba/raw/creation-traces Contract deployment records on Boba — deployer address, factory context, and deployed bytecode. ## Table Description The `boba.creation_traces` table contains information about the creation of smart contracts on the boba blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the boba blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the boba blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM boba.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM boba.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM boba.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# boba.logs Source: https://docs.dune.com/data-catalog/evm/boba/raw/logs Smart contract event logs on Boba — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `boba.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/boba/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM boba.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM boba.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM boba.logs
WHERE evt_block_number = 1000000`
# boba.traces Source: https://docs.dune.com/data-catalog/evm/boba/raw/traces Internal transaction traces on Boba — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `boba.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/boba/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM boba.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# boba.transactions Source: https://docs.dune.com/data-catalog/evm/boba/raw/transactions Every transaction on Boba — from, to, value, gas, calldata, and receipt status. ## Table Description The `boba.transactions` table contains information about all transactions on the boba blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the boba blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/boba/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=boba\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM boba.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM boba.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM boba.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on Celo Source: https://docs.dune.com/data-catalog/evm/celo/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Celo — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for celo transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on celo. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=celo](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=celo) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=celo\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=celo\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on Celo Source: https://docs.dune.com/data-catalog/evm/celo/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on Celo. > [!NOTE] > > This is a cross-chain table but can be filtered for celo transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on celo. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=celo](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=celo) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=celo\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=celo\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on Celo Source: https://docs.dune.com/data-catalog/evm/celo/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on Celo. > [!NOTE] > > This is a cross-chain table but can be filtered for celo transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on celo. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=celo](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=celo) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=celo\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=celo\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Celo Call Tables Source: https://docs.dune.com/data-catalog/evm/celo/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Celo network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # celo.contracts Source: https://docs.dune.com/data-catalog/evm/celo/decoded/contracts Verified contract registry on Celo — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the celo blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/celo/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # celo.logs_decoded Source: https://docs.dune.com/data-catalog/evm/celo/decoded/logs-decoded ABI-decoded event logs on Celo — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from celo transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On celo, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/celo/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **celo.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=logs_decoded) # Celo Decoded Overview Source: https://docs.dune.com/data-catalog/evm/celo/decoded/overview Simplifying Celo smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/celo/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/celo/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/celo/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # celo.traces_decoded Source: https://docs.dune.com/data-catalog/evm/celo/decoded/traces-decoded ABI-decoded function calls on Celo — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from celo transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/celo/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=traces_decoded) # Celo Overview Source: https://docs.dune.com/data-catalog/evm/celo/overview Celo data on Dune Celo is a blockchain ecosystem focused on increasing cryptocurrency adoption among smartphone users. By leveraging mobile access, Celo aims to empower anyone with a smartphone to access financial services, send money to phone contacts, and pay for goods and services with crypto. The Celo network utilizes a unique consensus algorithm and a stablecoin ecosystem to offer secure, fast, and low-cost transactions. It's designed to be light enough to run on mobile devices, reducing the barriers for entry and facilitating a user-friendly experience. **Mobile-First Approach:** Celo's architecture is specifically tailored for mobile users, supporting easy integration and operation on smartphones, which is essential for accessibility in regions with limited access to traditional banking. **Stablecoin Ecosystem:** The network supports various stablecoins pegged to fiat currencies, facilitating everyday transactions and reducing the volatility typically associated with cryptocurrencies. **Decentralized Finance (DeFi) Capabilities:** Celo extends the reach of DeFi applications by enabling a suite of decentralized apps that are accessible on mobile devices, broadening financial inclusion. > [card] [Celo documentation](https://docs.celo.org) > > Access the official documentation for Celo, providing comprehensive information on its technology, mobile integration, and DeFi solutions. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, providing insights into interactions and activities within the Celo network. > [card] [Blocks](./raw/blocks) > > Information on blocks processed, highlighting network activity and the performance of the mobile-first infrastructure. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the efficiency and user engagement across the network. > [card] [Decoded](./decoded/overview) > > Decoded transaction data for better analysis and understanding of contract executions on Celo. # celo.blocks Source: https://docs.dune.com/data-catalog/evm/celo/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Celo. ## Table description The `celo.blocks` table contains information about blocks in the celo blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM celo.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM celo.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM celo.blocks
  GROUP BY 1 
  LIMIT 10`
# celo.creation_traces Source: https://docs.dune.com/data-catalog/evm/celo/raw/creation-traces Contract deployment records on Celo — deployer address, factory context, and deployed bytecode. ## Table Description The `celo.creation_traces` table contains information about the creation of smart contracts on the celo blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the celo blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the celo blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM celo.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM celo.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM celo.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# celo.logs Source: https://docs.dune.com/data-catalog/evm/celo/raw/logs Smart contract event logs on Celo — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `celo.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/celo/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM celo.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM celo.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM celo.logs
WHERE evt_block_number = 1000000`
# celo.traces Source: https://docs.dune.com/data-catalog/evm/celo/raw/traces Internal transaction traces on Celo — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `celo.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/celo/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM celo.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# celo.transactions Source: https://docs.dune.com/data-catalog/evm/celo/raw/transactions Every transaction on Celo — from, to, value, gas, calldata, and receipt status. ## Table Description The `celo.transactions` table contains information about all transactions on the celo blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the celo blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/celo/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=celo\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM celo.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM celo.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM celo.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on corn Source: https://docs.dune.com/data-catalog/evm/corn/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Corn — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for corn transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on corn. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=corn](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=corn) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=corn\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=corn\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on corn Source: https://docs.dune.com/data-catalog/evm/corn/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on corn. > [!NOTE] > > This is a cross-chain table but can be filtered for corn transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on corn. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=corn](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=corn) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=corn\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=corn\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on corn Source: https://docs.dune.com/data-catalog/evm/corn/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on corn. > [!NOTE] > > This is a cross-chain table but can be filtered for corn transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on corn. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=corn](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=corn) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=corn\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=corn\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Corn Call Tables Source: https://docs.dune.com/data-catalog/evm/corn/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Corn network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # corn.contracts Source: https://docs.dune.com/data-catalog/evm/corn/decoded/contracts Verified contract registry on Corn — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the corn blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/corn/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # corn.logs_decoded Source: https://docs.dune.com/data-catalog/evm/corn/decoded/logs-decoded ABI-decoded event logs on Corn — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from corn transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/corn/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on corn?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for corn on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=logs_decoded) # Corn Decoded Overview Source: https://docs.dune.com/data-catalog/evm/corn/decoded/overview Simplifying Corn smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/corn/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/corn/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/corn/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # corn.traces_decoded Source: https://docs.dune.com/data-catalog/evm/corn/decoded/traces-decoded ABI-decoded function calls on Corn — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from corn transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/corn/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=traces_decoded) # Corn Overview Source: https://docs.dune.com/data-catalog/evm/corn/overview Corn data on Dune ## What is Corn? Corn is a next-generation Ethereum Layer 2 network specifically designed to unlock the full potential of Bitcoin. Built on Arbitrum Orbit, it provides a Bitcoin-centric ecosystem that combines scalability, efficiency, and innovative features to enhance the Bitcoin ecosystem. ## Key Features * **Bitcorn (BTCN)**: Native gas token of the network * **popCORN System**: Provides long-term incentives for ecosystem participants * **LayerZero Integration**: Enables seamless cross-chain asset transfers * **Arbitrum Orbit**: Leverages Arbitrum's technology for scalability and efficiency * **Stylus Support**: Allows developers to use multiple programming languages for smart contract development ## Why Corn? Corn positions itself as the "Butter Network" with three main value propositions: * Butter yield * Butter BTC * Butter vibes It's designed to be the optimal platform for putting Bitcoin to work, creating a rich ecosystem of Bitcoin-focused applications and services. ## Technical Architecture Built on Arbitrum Orbit, Corn inherits the robust technical foundation of Arbitrum while adding Bitcoin-specific optimizations: ### Development Features * **Multiple Language Support**: Through Stylus integration, developers can write smart contracts in various programming languages * **Bitcoin Integration**: Native support for Bitcoin-related operations and assets * **Cross-chain Capabilities**: LayerZero integration for efficient cross-chain transactions ### Network Economics * **Gas Token**: Bitcorn (BTCN) * **Incentive Structure**: popCORN System for sustainable long-term ecosystem growth > [card] [Corn Documentation](https://docs.usecorn.com) > > Official documentation for developers building on Corn - The Butter Network for Bitcoin ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through event logs > [card] [Blocks](./raw/blocks) > > Information on blocks processed on Corn, reflecting network activity and capacity > [card] [Transactions](./raw/transactions) > > Detailed data on transactions, showcasing efficiency and operational execution > [card] [decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis and understanding of smart contract executions # corn.blocks Source: https://docs.dune.com/data-catalog/evm/corn/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Corn. ## Table description The `corn.blocks` table contains information about blocks in the corn blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM corn.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM corn.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM corn.blocks
  GROUP BY 1 
  LIMIT 10`
# corn.creation_traces Source: https://docs.dune.com/data-catalog/evm/corn/raw/creation-traces Contract deployment records on Corn — deployer address, factory context, and deployed bytecode. ## Table Description The `corn.creation_traces` table contains information about the creation of smart contracts on the corn blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the corn blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the corn blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM corn.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM corn.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM corn.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# corn.logs Source: https://docs.dune.com/data-catalog/evm/corn/raw/logs Smart contract event logs on Corn — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `corn.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/corn/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM corn.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM corn.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM corn.logs
WHERE evt_block_number = 1000000`
# corn.traces Source: https://docs.dune.com/data-catalog/evm/corn/raw/traces Internal transaction traces on Corn — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `corn.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/corn/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM corn.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# corn.transactions Source: https://docs.dune.com/data-catalog/evm/corn/raw/transactions Every transaction on Corn — from, to, value, gas, calldata, and receipt status. ## Table Description The `corn.transactions` table contains information about all transactions on the corn blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the corn blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/corn/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=corn\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM corn.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM corn.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM corn.transactions
ORDER BY gas_price DESC
LIMIT 10`
# Cronos Call Tables Source: https://docs.dune.com/data-catalog/evm/cronos/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Cronos network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # cronos.contracts Source: https://docs.dune.com/data-catalog/evm/cronos/decoded/contracts Verified contract registry on Cronos — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the cronos blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=contracts) # Event Logs - Cronos Source: https://docs.dune.com/data-catalog/evm/cronos/decoded/event-logs Smart contracts on Cronos emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # cronos.logs_decoded Source: https://docs.dune.com/data-catalog/evm/cronos/decoded/logs-decoded ABI-decoded event logs on Cronos — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from cronos transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/cronos/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on cronos?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for cronos on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=logs_decoded) # Cronos Decoded Overview Source: https://docs.dune.com/data-catalog/evm/cronos/decoded/overview Simplifying Cronos smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/cronos/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/cronos/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/cronos/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # cronos.traces_decoded Source: https://docs.dune.com/data-catalog/evm/cronos/decoded/traces-decoded ABI-decoded function calls on Cronos — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from cronos transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/cronos/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=traces_decoded) # Cronos Overview Source: https://docs.dune.com/data-catalog/evm/cronos/overview Cronos EVM blockchain data on Dune ## What is Cronos? Cronos is an EVM-compatible Layer 1 blockchain built by Crypto.com. It runs on the Cosmos SDK with Ethermint, giving developers Ethereum-style smart contracts and tooling while connecting to the broader Crypto.com ecosystem. Dune indexes Cronos under the `cronos` schema namespace with standard EVM raw tables and ABI-decoded contract data. ## Key Features * **EVM compatibility**: Deploy and interact with Solidity contracts using familiar Ethereum tooling (Hardhat, Foundry, etc.). * **Cosmos interoperability**: Cronos is IBC-enabled and connects to the Crypto.org Chain hub for cross-chain asset flows. * **DeFi ecosystem**: Home to VVS Finance, CronaSwap, Tectonic, and other Cronos-native protocols. * **Low fees**: Sub-cent transaction costs make Cronos suitable for high-frequency DeFi and gaming use cases. ## EVM Specifics on Dune * **Schema namespace**: `cronos` (query as `cronos.blocks`, `cronos.transactions`, etc.). * **Chain ID**: `25` (mainnet). * **Native gas token**: CRO (18 decimals). * **Raw tables**: `blocks`, `transactions`, `logs`, `traces`, `creation_traces`. * **Decoded infrastructure**: `cronos.contracts`, `cronos.logs_decoded`, `cronos.traces_decoded`. * **Standard token events**: `erc20_cronos.evt_*`, `erc721_cronos.evt_*` (when materialized). ## Data on Dune > [card] [Raw Data](/data-catalog/evm/cronos/raw/blocks) > > Block, transaction, log, and trace data indexed from Cronos nodes. > [card] [Decoded Data](/data-catalog/evm/cronos/decoded/overview) > > ABI-decoded contract interactions and events. ## Resources > [card] [Cronos](https://cronos.org/) > > Cronos project home page. > [card] [Block Explorer](https://explorer.cronos.com/) > > Cronos mainnet block explorer. # cronos.blocks Source: https://docs.dune.com/data-catalog/evm/cronos/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Cronos. ## Table description The `cronos.blocks` table contains information about blocks in the cronos blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM cronos.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM cronos.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM cronos.blocks
  GROUP BY 1 
  LIMIT 10`
# cronos.creation_traces Source: https://docs.dune.com/data-catalog/evm/cronos/raw/creation-traces Contract deployment records on Cronos — deployer address, factory context, and deployed bytecode. ## Table Description The `cronos.creation_traces` table contains information about the creation of smart contracts on the cronos blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the cronos blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the cronos blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM cronos.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM cronos.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM cronos.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# cronos.logs Source: https://docs.dune.com/data-catalog/evm/cronos/raw/logs Smart contract event logs on Cronos — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `cronos.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/cronos/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM cronos.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM cronos.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM cronos.logs
WHERE evt_block_number = 1000000`
# cronos.traces Source: https://docs.dune.com/data-catalog/evm/cronos/raw/traces Internal transaction traces on Cronos — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `cronos.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/cronos/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM cronos.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# cronos.transactions Source: https://docs.dune.com/data-catalog/evm/cronos/raw/transactions Every transaction on Cronos — from, to, value, gas, calldata, and receipt status. ## Table Description The `cronos.transactions` table contains information about all transactions on the cronos blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the cronos blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/cronos/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=cronos\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM cronos.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM cronos.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM cronos.transactions
ORDER BY gas_price DESC
LIMIT 10`
# degen Overview Source: https://docs.dune.com/data-catalog/evm/degen/overview degen data on Dune Degen, an ERC-20 token launched in January 2024, has reshaped the Farcaster ecosystem by enabling Casters to reward others with DEGEN for posting quality content. Our points system recognizes unique posts and comments, effectively bridging the gap between online contributions and real-world value. Degen has launched a layer 3 solution that settles transactions on the Base network. This solution is designed to provide a more efficient and scalable way to settle transactions related to \$DEGEN. Degen Chain uses Arbitrum Orbit for rollups, Base for transaction settlements, and Arbitrum AnyTrust for data availability. > [card] [degen website](https://www.degen.tips/) > > The official website of degen, providing information on the project, team, and community. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, providing insights into interactions within the degen network. > [card] [Blocks](./raw/blocks) > > Information on blocks, illustrating the operational capacity and activity levels on degen. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the efficiency and execution of operations on degen. # degen.blocks Source: https://docs.dune.com/data-catalog/evm/degen/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Degen. ## Table description The `degen.blocks` table contains information about blocks in the degen blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=degen\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=degen\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM degen.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM degen.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM degen.blocks
  GROUP BY 1 
  LIMIT 10`
# degen.logs Source: https://docs.dune.com/data-catalog/evm/degen/raw/logs Smart contract event logs on Degen — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `degen.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/degen/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=degen\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=degen\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM degen.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM degen.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM degen.logs
WHERE evt_block_number = 1000000`
# degen.traces Source: https://docs.dune.com/data-catalog/evm/degen/raw/traces Internal transaction traces on Degen — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `degen.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/degen/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=degen\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=degen\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM degen.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# degen.transactions Source: https://docs.dune.com/data-catalog/evm/degen/raw/transactions Every transaction on Degen — from, to, value, gas, calldata, and receipt status. ## Table Description The `degen.transactions` table contains information about all transactions on the degen blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the degen blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/degen/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=degen\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=degen\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM degen.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM degen.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM degen.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on ethereum Source: https://docs.dune.com/data-catalog/evm/ethereum/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Ethereum — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for ethereum transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on ethereum. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=ethereum](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=ethereum) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ethereum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ethereum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on ethereum Source: https://docs.dune.com/data-catalog/evm/ethereum/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on ethereum. > [!NOTE] > > This is a cross-chain table but can be filtered for ethereum transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on ethereum. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=ethereum](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=ethereum) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ethereum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ethereum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT Trades on Ethereum Source: https://docs.dune.com/data-catalog/evm/ethereum/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on Ethereum. > [!NOTE] > > This is a cross-chain table but can be filtered for ethereum transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on ethereum. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=ethereum](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=ethereum) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ethereum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ethereum\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Ethereum Call Tables Source: https://docs.dune.com/data-catalog/evm/ethereum/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Ethereum network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [ERC20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of a transaction, this message call will be recorded in the Dune table [`uniswap_ethereum.UNI_call_decimals`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # ethereum.contracts Source: https://docs.dune.com/data-catalog/evm/ethereum/decoded/contracts Verified contract registry on Ethereum — contract name, namespace, ABI, and deployment metadata. ## Table Description The `ethereum.contracts` table contains information about the contracts Dune has decoded on the Ethereum blockchain. ## Column Descriptions | Column | Type | Description | | - | - | - | | `abi_id` | `varchar` | Unique identifier for the ABI | | `abi` | `array(varchar)` | Contract ABI (Application Binary Interface) | | `address` | `varbinary` | Contract address | | `from` | `varbinary` | Address that deployed the contract | | `code` | `varbinary` | Deployed bytecode of the contract | | `name` | `varchar` | Name of the contract | | `namespace` | `varchar` | Project namespace (e.g., uniswap_v3) | | `dynamic` | `boolean` | Whether the contract was dynamically detected | | `base` | `boolean` | Whether this is the base contract submission | | `factory` | `boolean` | Whether this contract is a factory contract | | `detection_source` | `varchar` | How the contract was detected (manual, factory, etc.) | | `created_at` | `timestamp` | When this record was created in Dune | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/ethereum/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there are multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](https://dune.com/decode) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # ethereum.logs_decoded Source: https://docs.dune.com/data-catalog/evm/ethereum/decoded/logs-decoded ABI-decoded event logs on Ethereum — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from ethereum transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On ethereum, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/ethereum/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **ethereum.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=logs_decoded) # Ethereum Decoded Overview Source: https://docs.dune.com/data-catalog/evm/ethereum/decoded/overview Simplifying Ethereum smart contract analysis through human-readable tables. ### Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits: * **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities * **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data * **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process. * **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current. > [card] [Explore decoded logs](/data-catalog/evm/ethereum/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/ethereum/decoded/call-tables) ## Which contracts have decoded data? Contract submissions on Dune are driven by the community. Usually the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying [`[blockchain].contracts`](/data-catalog/evm/ethereum/decoded/contracts) tables, the [data explorer](/web-app/query-editor/data-explorer) or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be able to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated to an address on the respective chain and is permanently stored in this chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to be able to call the functions which are defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely which allows us to interact with the smart contract using a somewhat human readable format. The ABI can be compiled using the high level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![source: https://hackernoon.com/hn-images/1\*Sz1a7G2pQ62UnkHoieve4w.jpeg](https://mintcdn.com/dune/uyJ-jHeSRFvNrzyu/data-catalog/images/decoding.png?fit=max\&auto=format\&n=uyJ-jHeSRFvNrzyu\&q=85\&s=09b359c60e030b2ef21856f09b294145) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog) the undecoded event looks like this: ![etherscan](https://mintcdn.com/dune/uyJ-jHeSRFvNrzyu/data-catalog/images/etherscan.png?fit=max\&auto=format\&n=uyJ-jHeSRFvNrzyu\&q=85\&s=45d700fb7cf23a185f72124fcaae2f34) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset. ```sql theme={null} SELECT * FROM ethereum.logs WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5 ``` [https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log. ```sql theme={null} SELECT * FROM pickle_finance_ethereum.PickleToken_evt_Transfer WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5 ``` [https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** How exactly does this work? Since we know which event we are looking at here, we can simply convert the encoded bytecode to decoded data by decoding the bytecode according to its datatype. The structure for the `Transfer` event log of an ERC20 token will always be: ```solidity theme={null} Transfer(address from, address to, uint256 value) ``` This basically tells us that topic2 and topic3 are of the type `address`(32bytes) and are respectively the sender and recipient of the token transfer. An event log only has 3 indexed fields, so the `data` field is used to store the information about how much units of the token have been moved in this transaction. This field is called `value`. Since `topic0` always is just the Keccak-256 hash of the signature of the event, we are left with decoding `topic1`, `topic2` and `data`. In this case, they map out like this: | raw data field | decoded data description | raw data | decoded data | | - | - | - | - | | topic0 | keccak('Transfer(address,address,uint256'')) | 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef | not needed, this table only contains event logs from the `transfer` event log | | topic1 | from | 0x00000000000000000000000075e89d5979e4f6fba9f97c104c2f0afb3f1dcb88 | 0x75e89d5979e4f6fba9f97c104c2f0afb3f1dcb88 | | topic2 | to | 0x00000000000000000000000087d9da48db6e1f925cb67d3b7d2a292846c24cf7 | 0x87d9da48db6e1f925cb67d3b7d2a292846c24cf7 | | data | value | 0x00000000000000000000000000000000000000000000001a894d51f85cb08000 | 489509000000000000000 | Now what works for a single erc20 token, works for all erc20 tokens. We can use defined interfaces to decode the data of any erc20 token transfer event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and Etherscan. Furthermore, actually going into the smart contract's code (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # ethereum.traces_decoded Source: https://docs.dune.com/data-catalog/evm/ethereum/decoded/traces-decoded ABI-decoded function calls on Ethereum — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from Ethereum transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/ethereum/decoded/call-tables). The `ethereum.traces_decoded` table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_date` | `date` | Date of the block (UTC) | | `block_time` | `timestamp` | Timestamp of the block containing this trace | | `block_number` | `bigint` | Block number containing this trace | | `namespace` | `varchar` | Project namespace (e.g., uniswap_v3) | | `contract_name` | `varchar` | Name of the contract that was called | | `to` | `varbinary` | Address of the contract that was called | | `trace_address` | `array(bigint)` | Path of this trace within the call tree | | `tx_hash` | `varbinary` | Hash of the parent transaction | | `tx_from` | `varbinary` | Address that initiated the transaction | | `tx_to` | `varbinary` | Address the transaction was sent to | | `tx_index` | `integer` | Position of the transaction within the block | | `success` | `boolean` | Whether this trace executed successfully | | `signature` | `varbinary` | Function signature (first 4 bytes of calldata) | | `function_name` | `varchar` | Decoded name of the function called | | `created_at` | `timestamp` | When this record was created in Dune | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=traces_decoded) # Ethereum Overview Source: https://docs.dune.com/data-catalog/evm/ethereum/overview Ethereum data on Dune Ethereum is a decentralized, open-source blockchain system that features its own cryptocurrency, Ether. It is a platform for numerous decentralized applications (dApps), including everything from financial tools to games and complex databases. Ethereum is well-known for its flexibility and its pioneering role in the introduction and use of smart contracts, which are self-executing contracts with the terms of the agreement directly written into code. The network supports a broad range of applications due to its general-purpose nature, and it operates on a proof-of-stake consensus mechanism, enhancing its scalability and energy efficiency compared to earlier proof-of-work systems. **Versatility and Developer Support:** Ethereum supports the creation of a wide variety of applications beyond simple transactions. This includes decentralized finance (DeFi) applications, NFTs, and more, supported by a robust development toolkit and a strong global community. **Smart Contract Functionality:** Ethereum's use of smart contracts automates enforcement, management, performance, and payment — they execute automatically when conditions are met. > [card] [Ethereum documentation](https://ethereum.org/en/developers/docs/) > > The official documentation for Ethereum, providing a wealth of resources on how to build on and interact with the platform. ## Data Catalog > [card] [Logs](./raw/logs) > > Event logs from smart contracts, showcasing the diverse and dynamic usage of Ethereum's decentralized platform. > [card] [Blocks](./raw/blocks) > > Information on Ethereum blocks, reflecting the network's activity and scalability achievements. > [card] [Transactions](./raw/transactions) > > Detailed information on transactions, underscoring the high throughput and complexity of operations on Ethereum. > [card] [decoded](./decoded/overview) > > Decoded transaction data, facilitating easier analysis and deeper understanding of smart contract operations. # ethereum.blocks Source: https://docs.dune.com/data-catalog/evm/ethereum/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Ethereum. ## Table Description The `ethereum.blocks` table contains information about blocks in the Ethereum blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions | Column | Type | Description | | - | - | - | | `time` | `timestamp` | The time when the block was mined | | `number` | `bigint` | The block number (height) | | `gas_limit` | `decimal` | Maximum gas allowed in the block | | `gas_used` | `decimal` | Total gas used by all transactions in the block | | `difficulty` | `bigint` | Mining difficulty of the block | | `total_difficulty` | `decimal` | Cumulative difficulty of the chain up to this block | | `size` | `bigint` | Size of the block in bytes | | `base_fee_per_gas` | `bigint` | Base fee per gas unit (EIP-1559) | | `hash` | `varbinary` | Hash of the block | | `parent_hash` | `varbinary` | Hash of the parent block | | `miner` | `varbinary` | Address of the miner/validator | | `nonce` | `varbinary` | Nonce used in mining the block | | `date` | `date` | Date of the block (UTC) | | `blob_gas_used` | `bigint` | Total blob gas used in the block (EIP-4844) | | `excess_blob_gas` | `bigint` | Excess blob gas for fee calculation (EIP-4844) | | `parent_beacon_block_root` | `varbinary` | Root of the parent beacon block | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks ```sql theme={null} SELECT number, hash, size, gas_used FROM ethereum.blocks ORDER BY number DESC LIMIT 10 ``` ### Show the number of blocks mined each day ```sql theme={null} SELECT date_trunc('day', time) AS day, count(distinct number) FROM ethereum.blocks GROUP BY day ORDER BY day DESC ``` ### Show the number of transactions in each block ```sql theme={null} SELECT number, count(*) FROM ethereum.blocks group by 1 LIMIT 10 ``` # ethereum.creation_traces Source: https://docs.dune.com/data-catalog/evm/ethereum/raw/creation-traces Contract deployment records on Ethereum — deployer address, factory context, and deployed bytecode. ## Table Description The `creation_traces` table contains information about the creation of smart contracts on the Ethereum blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the Ethereum blockchain. The `ethereum.creation_traces` table is a subset of the `traces` table, which contains information about all traces on the Ethereum blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type` = `create`. ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_time` | `timestamp` | Timestamp of the block containing this creation trace | | `block_number` | `bigint` | Block number containing this creation trace | | `tx_hash` | `varbinary` | Hash of the transaction that created the contract | | `address` | `varbinary` | Address of the newly created contract | | `from` | `varbinary` | Address that deployed the contract | | `code` | `varbinary` | Bytecode of the deployed contract | | `block_month` | `date` | Month of the block (for partitioning) | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract ```sql theme={null} select * from ethereum.creation_traces where contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d ``` ### Show the creation of smart contracts by a specific creator ```sql theme={null} select * from ethereum.creation_traces where "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6 ``` ### Show the creation of smart contracts in the last 10 days ```sql theme={null} select date_trunc('day', block_time) as day, count(*) from ethereum.creation_traces group by 1 order by 1 desc limit 10 ``` # ethereum.logs Source: https://docs.dune.com/data-catalog/evm/ethereum/raw/logs Smart contract event logs on Ethereum — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `ethereum.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of: * topic list: a list of 0 to 4 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event. * data: contains non-indexed data. This is the raw version of this table, for decoded event logs, see the [decoded logs](/data-catalog/evm/ethereum/decoded/event-logs) section. ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_time` | `timestamp` | Timestamp of the block containing this log | | `block_number` | `bigint` | Block number containing this log | | `block_hash` | `varbinary` | Hash of the block containing this log | | `contract_address` | `varbinary` | Address of the contract that emitted the log | | `topic0` | `varbinary` | Event signature hash (first indexed topic) | | `topic1` | `varbinary` | First indexed event parameter | | `topic2` | `varbinary` | Second indexed event parameter | | `topic3` | `varbinary` | Third indexed event parameter | | `data` | `varbinary` | Non-indexed event data | | `tx_hash` | `varbinary` | Hash of the transaction that generated this log | | `index` | `integer` | Position of the log within the block | | `tx_index` | `integer` | Position of the transaction within the block | | `block_date` | `date` | Date of the block (UTC) | | `tx_from` | `varbinary` | Address that initiated the transaction | | `tx_to` | `varbinary` | Address the transaction was sent to | | `blob_gas_price` | `bigint` | Blob gas price of the transaction (EIP-4844) | | `blob_gas_used` | `bigint` | Blob gas used by the transaction (EIP-4844) | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract ```sql theme={null} select * from ethereum.logs where contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d limit 10 ``` ### Filter the logs for a specific topic ```sql theme={null} select * from ethereum.logs where topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef ``` ### Show the logs of a specific block ```sql theme={null} SELECT * FROM ethereum.logs WHERE evt_block_number = 1000000 ``` # ethereum.traces Source: https://docs.dune.com/data-catalog/evm/ethereum/raw/traces Internal transaction traces on Ethereum — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `ethereum.traces` table contains the traces of transactions executed on the Ethereum Virtual Machine (EVM). It includes traces of both top-level and internal transactions. Traces are the result of transaction execution and are used to debug and understand how transactions are processed. They are also known as `internal transactions`. This is the raw version of this table, for decoded transaction calls, see the [call tables](/data-catalog/evm/ethereum/decoded/call-tables) section. ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_time` | `timestamp` | Timestamp of the block containing this trace | | `block_number` | `bigint` | Block number containing this trace | | `value` | `uint256` | Amount of native token transferred (in wei) | | `gas` | `bigint` | Gas provided for this trace | | `gas_used` | `bigint` | Gas consumed by this trace | | `block_hash` | `varbinary` | Hash of the block containing this trace | | `success` | `boolean` | Whether this trace executed successfully | | `tx_index` | `integer` | Position of the transaction within the block | | `sub_traces` | `bigint` | Number of child traces spawned by this trace | | `error` | `varchar` | Error message if the trace failed | | `tx_success` | `boolean` | Whether the parent transaction succeeded | | `tx_hash` | `varbinary` | Hash of the parent transaction | | `from` | `varbinary` | Address that initiated this trace | | `to` | `varbinary` | Address the trace was sent to | | `trace_address` | `array(bigint)` | Path of this trace within the call tree | | `type` | `varchar` | Type of trace (call, create, suicide, reward) | | `address` | `varbinary` | Address of the contract created (for create traces) | | `code` | `varbinary` | Bytecode of the contract created | | `call_type` | `varchar` | Type of call (call, delegatecall, staticcall) | | `input` | `varbinary` | Input data for the trace | | `output` | `varbinary` | Output data from the trace | | `refund_address` | `varbinary` | Address receiving refund (for selfdestruct) | | `block_date` | `date` | Date of the block (UTC) | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash ```sql theme={null} SELECT * FROM ethereum.traces WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c ``` # ethereum.transactions Source: https://docs.dune.com/data-catalog/evm/ethereum/raw/transactions Every transaction on Ethereum — from, to, value, gas, calldata, and receipt status. ## Table Description The `ethereum.transactions` table contains information about all transactions on the Ethereum blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the Ethereum blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. This is the raw version of this table, for decoded transaction calls, see the [call tables](/data-catalog/evm/ethereum/decoded/call-tables) section. ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_time` | `timestamp` | Timestamp of the block containing this transaction | | `block_number` | `bigint` | Block number containing this transaction | | `value` | `decimal` | Amount of native token transferred (in wei) | | `gas_limit` | `bigint` | Maximum gas the sender is willing to use | | `gas_price` | `bigint` | Price per gas unit (in wei) | | `gas_used` | `bigint` | Actual gas consumed by the transaction | | `max_fee_per_gas` | `bigint` | Maximum total fee per gas (EIP-1559) | | `max_priority_fee_per_gas` | `bigint` | Maximum priority fee (tip) per gas (EIP-1559) | | `priority_fee_per_gas` | `bigint` | Actual priority fee per gas paid | | `nonce` | `bigint` | Transaction count of the sender before this transaction | | `index` | `bigint` | Position of the transaction within the block | | `success` | `boolean` | Whether the transaction executed successfully | | `from` | `varbinary` | Address of the transaction sender | | `to` | `varbinary` | Address of the transaction recipient | | `block_hash` | `varbinary` | Hash of the block containing this transaction | | `data` | `varbinary` | Calldata sent with the transaction | | `hash` | `varbinary` | Unique hash of the transaction | | `type` | `varchar` | Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844) | | `access_list` | `array(row)` | List of addresses and storage keys accessed (EIP-2930) | | `block_date` | `date` | Date of the block (UTC) | | `blob_versioned_hashes` | `array(varbinary)` | Versioned hashes of blobs (EIP-4844) | | `max_fee_per_blob_gas` | `bigint` | Maximum fee per blob gas (EIP-4844) | | `authorization_list` | `array(row)` | Authorization list for EIP-7702 transactions | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address ```sql theme={null} select * from ethereum.transactions where "from" = 0x50A1b5c358F8D34F0d35aA2f10742c46054E247e ``` ### Count the number of transactions per block ```sql theme={null} SELECT block_number, COUNT(*) FROM ethereum.transactions GROUP BY 1 ORDER BY 1 DESC LIMIT 10 ``` ### Show the top 10 transactions with the highest gas price ```sql theme={null} SELECT hash, gas_price FROM ethereum.transactions ORDER BY gas_price DESC LIMIT 10 ``` # ethereum.withdrawals Source: https://docs.dune.com/data-catalog/evm/ethereum/raw/withdrawals Beacon chain ETH withdrawals on Ethereum — validator index, amount, and recipient address. > [!NOTE] > > Dune does not have beacon chain data yet. This table introduces the action of withdrawing from the beacon chain only. The [Ethereum Improvement Proposal (EIP) 4895](https://eips.ethereum.org/EIPS/eip-4895) introduces a system-level "operation" to support validator withdrawals that are "pushed" from the beacon chain to the EVM. Withdrawals are represented as a new type of object in the execution payload, called an "operation", that cleanly separates this "system-level" operation from regular transactions. Withdrawals provide key information from the consensus layer such as a monotonically increasing index, validator index, recipient address, and the amount of ether given in Gwei. Using this table you can observe beacon chain withdrawals. ## How to work with this table In order to connect deposits and withdrawals, we must identify the `validator_index` of unique depositors. Since Dune doesn't have beacon chain data yet, we have to rely on a workaround using a query to obtain a list of valid and active deposits from the Ethereum deposit contract. This [query](https://dune.com/queries/2364548) returns a list of valid and active deposits, which we can use to identify the `validator_index` of unique depositors. We can use this query to match the `validator_index` of depositors with the `validator_index` of withdrawers in the withdrawals table. This query provides a comprehensive list of valid deposits and is kept up to date with full historical coverage. [LINK TO QUERY](https://dune.com/queries/2364548) ## Column Descriptions | Column | Type | Description | | - | - | - | | `block_time` | `timestamp` | Timestamp of the block containing this withdrawal | | `block_number` | `bigint` | Block number containing this withdrawal | | `index` | `bigint` | Monotonically increasing withdrawal index | | `validator_index` | `bigint` | Index of the validator that initiated the withdrawal | | `address` | `varbinary` | Recipient address of the withdrawal | | `amount` | `uint256` | Amount of ether withdrawn (in Gwei) | | `block_date` | `date` | Date of the block (UTC) | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=withdrawals](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ethereum\&table_name_t6f0df=withdrawals) ## Examples ### Withdrawals per day ```sql theme={null} select date_trunc('day', block_time) as dt, sum(AMOUNT)/1e9 as withdraw_amount from ethereum.withdrawals group by 1 ``` ### Dashboards [https://dune.com/hildobby/eth2-staking](https://dune.com/hildobby/eth2-staking) [https://dune.com/hashed_official/staking-as-a-service](https://dune.com/hashed_official/staking-as-a-service) * [ETH Staking Dashboard](https://dune.com/hildobby/eth2-staking) - This dashboard provides an overview of the Ethereum 2.0 staking ecosystem. It includes data on the number of validators, the total amount of staked ETH, and the number of deposits and withdrawals. * [Staking as a Service](https://dune.com/hashed_official/staking-as-a-service) - This dashboard provides a comprehensive overview of the staking-as-a-service ecosystem. It includes data on the number of validators, the total amount of staked ETH, and the number of deposits and withdrawals. ## References * [Ethereum Improvement Proposal EIP 4895](https://eips.ethereum.org/EIPS/eip-4895) * [Ethereum 2.0 Deposit Contract](https://etherscan.io/address/0x00000000219ab540356cbb839cbe05303d7705fa) # dex_aggregator.trades on fantom Source: https://docs.dune.com/data-catalog/evm/fantom/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Fantom — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for fantom transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on fantom. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=fantom](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=fantom) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=fantom\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=fantom\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on fantom Source: https://docs.dune.com/data-catalog/evm/fantom/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on fantom. > [!NOTE] > > This is a cross-chain table but can be filtered for fantom transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on fantom. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=fantom](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=fantom) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=fantom\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=fantom\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on fantom Source: https://docs.dune.com/data-catalog/evm/fantom/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on fantom. > [!NOTE] > > This is a cross-chain table but can be filtered for fantom transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on fantom. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=fantom](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=fantom) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=fantom\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=fantom\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Fantom Call Tables Source: https://docs.dune.com/data-catalog/evm/fantom/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Fantom network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # fantom.contracts Source: https://docs.dune.com/data-catalog/evm/fantom/decoded/contracts Verified contract registry on Fantom — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the fantom blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/fantom/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # fantom.logs_decoded Source: https://docs.dune.com/data-catalog/evm/fantom/decoded/logs-decoded ABI-decoded event logs on Fantom — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from fantom transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/fantom/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on fantom?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for fantom on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=logs_decoded) # Fantom Decoded Overview Source: https://docs.dune.com/data-catalog/evm/fantom/decoded/overview Simplifying Fantom smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/fantom/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/fantom/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/fantom/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # fantom.traces_decoded Source: https://docs.dune.com/data-catalog/evm/fantom/decoded/traces-decoded ABI-decoded function calls on Fantom — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from fantom transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/fantom/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=traces_decoded) # Fantom Overview Source: https://docs.dune.com/data-catalog/evm/fantom/overview Fantom data on Dune Fantom is a high-performance, scalable, and secure smart-contract platform that is designed to overcome the limitations of previous generation blockchain platforms. Fantom is unique in its use of a directed acyclic graph (DAG) architecture, which allows for asynchronous confirmation of transactions, resulting in high throughput and minimal transaction costs. The network uses a bespoke consensus algorithm called Lachesis, which ensures transactions are confirmed within 1-2 seconds, significantly improving the user experience and efficiency for decentralized applications (dApps) running on the platform. **High Throughput and Low Cost:** Fantom’s DAG architecture enables unparalleled transaction speed and drastically reduced costs, making it an ideal platform for developers looking to build scalable dApps. **Developer-Friendly:** Fantom is fully compatible with Ethereum, allowing developers to deploy Ethereum-based applications quickly and seamlessly using existing tools and languages like Solidity. **Ecosystem Growth:** Fantom supports a growing ecosystem of decentralized finance (DeFi) applications, NFT platforms, and other blockchain projects, fostering innovation and new developments within its network. > [card] [Fantom documentation](https://docs.fantom.foundation) > > Access comprehensive documentation for Fantom, detailing its unique technology, features, and developer resources. ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through detailed event logs, providing visibility into the dynamic activity on Fantom. > [card] [Blocks](./raw/blocks) > > Information on blocks processed on Fantom, reflecting the network’s high throughput and capacity for handling large volumes of transactions. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, highlighting the efficiency and speed of operations across the Fantom network. > [card] [decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis and understanding of smart contract executions. # fantom.blocks Source: https://docs.dune.com/data-catalog/evm/fantom/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Fantom. ## Table description The `fantom.blocks` table contains information about blocks in the fantom blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM fantom.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM fantom.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM fantom.blocks
  GROUP BY 1 
  LIMIT 10`
# fantom.creation_traces Source: https://docs.dune.com/data-catalog/evm/fantom/raw/creation-traces Contract deployment records on Fantom — deployer address, factory context, and deployed bytecode. ## Table Description The `fantom.creation_traces` table contains information about the creation of smart contracts on the fantom blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the fantom blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the fantom blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM fantom.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM fantom.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM fantom.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# fantom.logs Source: https://docs.dune.com/data-catalog/evm/fantom/raw/logs Smart contract event logs on Fantom — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `fantom.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/fantom/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM fantom.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM fantom.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM fantom.logs
WHERE evt_block_number = 1000000`
# fantom.traces Source: https://docs.dune.com/data-catalog/evm/fantom/raw/traces Internal transaction traces on Fantom — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `fantom.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/fantom/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM fantom.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# fantom.transactions Source: https://docs.dune.com/data-catalog/evm/fantom/raw/transactions Every transaction on Fantom — from, to, value, gas, calldata, and receipt status. ## Table Description The `fantom.transactions` table contains information about all transactions on the fantom blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the fantom blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/fantom/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fantom\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM fantom.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM fantom.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM fantom.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on flare Source: https://docs.dune.com/data-catalog/evm/flare/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on flare. > [!NOTE] > > This is a cross-chain table but can be filtered for flare transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on flare. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=flare](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=flare) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=flare\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=flare\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on flare Source: https://docs.dune.com/data-catalog/evm/flare/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on flare. > [!NOTE] > > This is a cross-chain table but can be filtered for flare transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on flare. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=flare](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=flare) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=flare\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=flare\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Flare Call Tables Source: https://docs.dune.com/data-catalog/evm/flare/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Flare network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # flare.contracts Source: https://docs.dune.com/data-catalog/evm/flare/decoded/contracts Verified contract registry on Flare — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the flare blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/flare/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # flare.logs_decoded Source: https://docs.dune.com/data-catalog/evm/flare/decoded/logs-decoded ABI-decoded event logs on Flare — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from flare transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On flare, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/flare/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **flare.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=logs_decoded) # Flare Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/flare/decoded/overview Simplifying Flare Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/flare/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/flare/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/flare/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # flare.traces_decoded Source: https://docs.dune.com/data-catalog/evm/flare/decoded/traces-decoded ABI-decoded function calls on Flare — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from flare transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/flare/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=traces_decoded) # Flare Chain Overview Source: https://docs.dune.com/data-catalog/evm/flare/overview Flare blockchain data on Dune ## What is Flare? Flare is a layer 1, EVM-compatible smart contract platform that redefines the utility of blockchain by making data a public good. It is uniquely designed to provide developers with efficient access to extensive data resources, facilitating the creation of sophisticated applications in various domains such as DeFi, gaming, NFTs, music, social networks, real world assets, machine learning, and artificial intelligence. ## Key Features of Flare Flare stands out by integrating robust data protocols directly into its blockchain architecture, offering developers powerful tools to leverage data efficiently and cost-effectively. ### **Data as a Public Good** At the core of Flare’s philosophy is the provision of data as a public good. This ensures that data is accessible without central control, fostering an environment of openness and innovation. ### **Dual Role Infrastructure Providers** Infrastructure providers on Flare serve a dual role as validators and data providers. This integration allows Flare to offer its unique native oracles: the Flare Time-Series Oracle (FTSO) and the Flare Data Connector. ### **Developing on Flare** Developers interested in building on Flare can find comprehensive resources and guides at the Flare Developer Hub. This hub provides tools, documentation, and support to help developers create, test, and deploy their applications on Flare’s network. ## Flare Networks and chains Flare encompasses several networks, each designed for specific functions and stages of development: * **Flare:** The main network with \$FLR as the native currency. * **Songbird:** The canary network where \$SGB is the native currency, used for real condition testing before mainnet deployment. * **Coston:** The public test network for developers using Songbird. * **Coston2:** The public test network for developers using Flare. Flare operates on two primary chains: * **C-Chain (Contract Chain):** Hosts smart contracts and is powered by the EVM, facilitating most of the community interactions. * **P-Chain (Platform Chain):** Manages staking and rewards distribution among validators. ## Security and Governance Flare integrates advanced security protocols and a decentralized governance model, allowing \$FLR token holders to participate in network decisions. This inclusive approach ensures that Flare adapts to the evolving needs of its users and developers. > [card] [Flare Documentation](https://docs.flare.network/) > > Explore the complete documentation for Flare. ## Data Catalog > [card] [Logs](./raw/logs) > > Explore detailed logs and operational data on Flare, emphasizing transparency and access to real-time network activities and oracle updates. > [card] [Blocks](./raw/blocks) > > View insights into Flare's block production and consensus mechanism, highlighting the efficiency and security of the state connector and its impact on blockchain finality. > [card] [Transactions](./raw/transactions) > > Dive into transaction data to experience Flare’s innovative zero-gas mechanism, showcasing how it facilitates cost-effective and accessible blockchain interactions. > [card] [Decoded](./decoded/overview) > > Access decoded transaction data to gain insights into the seamless integration of FAssets and interactions across Flare's unique app chains, driving a new era of blockchain utility. # flare.blocks Source: https://docs.dune.com/data-catalog/evm/flare/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Flare. ## Table description The `flare.blocks` table contains information about blocks in the flare blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM flare.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM flare.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM flare.blocks
  GROUP BY 1 
  LIMIT 10`
# flare.creation_traces Source: https://docs.dune.com/data-catalog/evm/flare/raw/creation-traces Contract deployment records on Flare — deployer address, factory context, and deployed bytecode. ## Table Description The `flare.creation_traces` table contains information about the creation of smart contracts on the flare blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the flare blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the flare blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM flare.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM flare.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM flare.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# flare.logs Source: https://docs.dune.com/data-catalog/evm/flare/raw/logs Smart contract event logs on Flare — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `flare.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/flare/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM flare.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM flare.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM flare.logs
WHERE evt_block_number = 1000000`
# flare.traces Source: https://docs.dune.com/data-catalog/evm/flare/raw/traces Internal transaction traces on Flare — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `flare.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/flare/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM flare.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# flare.transactions Source: https://docs.dune.com/data-catalog/evm/flare/raw/transactions Every transaction on Flare — from, to, value, gas, calldata, and receipt status. ## Table Description The `flare.transactions` table contains information about all transactions on the flare blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the flare blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/flare/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flare\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM flare.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM flare.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM flare.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on gnosis Source: https://docs.dune.com/data-catalog/evm/gnosis/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Gnosis — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for gnosis transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on gnosis. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=gnosis](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=gnosis) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=gnosis\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=gnosis\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on gnosis Source: https://docs.dune.com/data-catalog/evm/gnosis/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on gnosis. > [!NOTE] > > This is a cross-chain table but can be filtered for gnosis transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on gnosis. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=gnosis](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=gnosis) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=gnosis\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=gnosis\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on gnosis Source: https://docs.dune.com/data-catalog/evm/gnosis/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on gnosis. > [!NOTE] > > This is a cross-chain table but can be filtered for gnosis transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on gnosis. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=gnosis](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=gnosis) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=gnosis\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=gnosis\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Gnosis Chain Call Tables Source: https://docs.dune.com/data-catalog/evm/gnosis/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Gnosis Chain network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # gnosis.contracts Source: https://docs.dune.com/data-catalog/evm/gnosis/decoded/contracts Verified contract registry on Gnosis — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the gnosis blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/gnosis/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # gnosis.logs_decoded Source: https://docs.dune.com/data-catalog/evm/gnosis/decoded/logs-decoded ABI-decoded event logs on Gnosis — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from gnosis transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On gnosis, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/gnosis/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **gnosis.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=logs_decoded) # Gnosis Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/gnosis/decoded/overview Simplifying Gnosis Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/gnosis/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/gnosis/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/gnosis/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # gnosis.traces_decoded Source: https://docs.dune.com/data-catalog/evm/gnosis/decoded/traces-decoded ABI-decoded function calls on Gnosis — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from gnosis transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/gnosis/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=traces_decoded) # Gnosis Chain Overview Source: https://docs.dune.com/data-catalog/evm/gnosis/overview Gnosis Chain data on Dune Gnosis Chain is a Layer 2 scaling solution designed for Ethereum, focusing on creating a low-cost, high-efficiency platform for decentralized applications (dApps). Formerly known as xDai Chain, Gnosis Chain emphasizes predictability in transaction costs, which are paid in the native stablecoin, xDAI. This platform uses a unique consensus mechanism called POSDAO, which is a Proof of Stake system that provides enhanced security and scalability while supporting environmental sustainability. Gnosis Chain is compatible with Ethereum, allowing Ethereum assets and projects to transition smoothly without the need for code changes. **Cost Efficiency and Predictability:** Transaction costs on Gnosis Chain are highly predictable, making it an attractive platform for developers and businesses that require consistent budgeting for blockchain operations. **Ethereum Compatibility:** Full compatibility with Ethereum ensures that developers can leverage existing tools and infrastructures to deploy and manage their applications on Gnosis Chain with minimal adjustments. > [card] [Gnosis Chain documentation](https://docs.gnosischain.com) > > Explore the official documentation for Gnosis Chain, which provides a deep dive into its consensus mechanism, network features, and how to develop on the platform. ## Data Catalog > [card] [Logs](./raw/logs) > > Event logs from smart contracts, offering detailed insights into interactions and activities within the Gnosis Chain network. > [card] [Blocks](./raw/blocks) > > Data on blocks processed, illustrating the network’s capacity and the performance of its POSDAO system. > [card] [Transactions](./raw/transactions) > > Comprehensive transaction data, showcasing the efficiency and cost-effectiveness of operations on Gnosis Chain. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and better understanding of contract executions on Gnosis Chain. # gnosis.blocks Source: https://docs.dune.com/data-catalog/evm/gnosis/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Gnosis. ## Table description The `gnosis.blocks` table contains information about blocks in the gnosis blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM gnosis.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM gnosis.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM gnosis.blocks
  GROUP BY 1 
  LIMIT 10`
# gnosis.creation_traces Source: https://docs.dune.com/data-catalog/evm/gnosis/raw/creation-traces Contract deployment records on Gnosis — deployer address, factory context, and deployed bytecode. ## Table Description The `gnosis.creation_traces` table contains information about the creation of smart contracts on the gnosis blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the gnosis blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the gnosis blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM gnosis.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM gnosis.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM gnosis.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# gnosis.logs Source: https://docs.dune.com/data-catalog/evm/gnosis/raw/logs Smart contract event logs on Gnosis — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `gnosis.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/gnosis/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM gnosis.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM gnosis.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM gnosis.logs
WHERE evt_block_number = 1000000`
# gnosis.traces Source: https://docs.dune.com/data-catalog/evm/gnosis/raw/traces Internal transaction traces on Gnosis — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `gnosis.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/gnosis/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM gnosis.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# gnosis.transactions Source: https://docs.dune.com/data-catalog/evm/gnosis/raw/transactions Every transaction on Gnosis — from, to, value, gas, calldata, and receipt status. ## Table Description The `gnosis.transactions` table contains information about all transactions on the gnosis blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the gnosis blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/gnosis/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=gnosis\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM gnosis.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM gnosis.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM gnosis.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on hemi Source: https://docs.dune.com/data-catalog/evm/hemi/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on hemi. > [!NOTE] > > This is a cross-chain table but can be filtered for hemi transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on hemi. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=hemi](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=hemi) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=hemi\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=hemi\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Hemi Call Tables Source: https://docs.dune.com/data-catalog/evm/hemi/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Hemi network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # hemi.contracts Source: https://docs.dune.com/data-catalog/evm/hemi/decoded/contracts Verified contract registry on Hemi — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the hemi blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=contracts) # hemi.event_logs Source: https://docs.dune.com/data-catalog/evm/hemi/decoded/event-logs Smart contract event logs on Hemi — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # hemi.logs_decoded Source: https://docs.dune.com/data-catalog/evm/hemi/decoded/logs-decoded ABI-decoded event logs on Hemi — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from hemi transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/hemi/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on hemi?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for hemi on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=logs_decoded) # Hemi Decoded Overview Source: https://docs.dune.com/data-catalog/evm/hemi/decoded/overview Simplifying Hemi smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/hemi/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/hemi/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/hemi/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # hemi.traces_decoded Source: https://docs.dune.com/data-catalog/evm/hemi/decoded/traces-decoded ABI-decoded function calls on Hemi — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from hemi transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/hemi/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=traces_decoded) # Hemi Overview Source: https://docs.dune.com/data-catalog/evm/hemi/overview Hemi data on Dune ## What is Hemi? Hemi is a modular Layer-2 protocol that provides superior scaling, security, and interoperability by combining the power of Bitcoin and Ethereum. Unlike other projects that treat Bitcoin and Ethereum as separate ecosystem silos, Hemi views them as components of a single supernetwork, unlocking new levels of programmability, portability, and potential. ## Key Features * **Bitcoin-Ethereum Integration**: Combines Bitcoin and Ethereum as components of a supernetwork * **Hemi Virtual Machine (hVM)**: Incorporates a full Bitcoin node within an Ethereum Virtual Machine * **Proof-of-Proof (PoP) Consensus**: Ensures transactions surpass Bitcoin's security level in hours * **Trustless Cross-chain Portability**: Secure asset transfers between Hemi and other chains via "Tunnels" * **Bitcoin Programmability**: Smart contracts with granular indexed views of Bitcoin state * **Extensibility**: Allows external projects to create chains secured by Hemi's technology ## Ecosystem Highlights * Modular Layer-2 protocol for superior scaling and security * Full integration of Bitcoin and Ethereum ecosystems * Advanced on-chain functionalities including routing, time-lock, and password protection * Bitcoin-Security-as-a-Service capabilities * Enhanced dual-chain interoperability and asset handling ## Data on Dune > [card] [Raw Data](/data-catalog/evm/hemi/raw/blocks) > > Access to raw blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/evm/hemi/decoded/overview) > > Human-readable contract interactions and events ## Resources > [card] [Hemi Documentation](https://docs.hemi.xyz/) > > Official documentation for developers building on Hemi # hemi.blocks Source: https://docs.dune.com/data-catalog/evm/hemi/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Hemi. ## Table description The `hemi.blocks` table contains information about blocks in the hemi blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM hemi.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM hemi.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM hemi.blocks
  GROUP BY 1 
  LIMIT 10`
# hemi.creation_traces Source: https://docs.dune.com/data-catalog/evm/hemi/raw/creation-traces Contract deployment records on Hemi — deployer address, factory context, and deployed bytecode. ## Table Description The `hemi.creation_traces` table contains information about the creation of smart contracts on the hemi blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the hemi blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the hemi blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM hemi.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM hemi.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM hemi.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# hemi.logs Source: https://docs.dune.com/data-catalog/evm/hemi/raw/logs Smart contract event logs on Hemi — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `hemi.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/hemi/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM hemi.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM hemi.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM hemi.logs
WHERE evt_block_number = 1000000`
# hemi.traces Source: https://docs.dune.com/data-catalog/evm/hemi/raw/traces Internal transaction traces on Hemi — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `hemi.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/hemi/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM hemi.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# hemi.transactions Source: https://docs.dune.com/data-catalog/evm/hemi/raw/transactions Every transaction on Hemi — from, to, value, gas, calldata, and receipt status. ## Table Description The `hemi.transactions` table contains information about all transactions on the hemi blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the hemi blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/hemi/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hemi\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM hemi.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM hemi.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM hemi.transactions
ORDER BY gas_price DESC
LIMIT 10`
# Henesys Call Tables Source: https://docs.dune.com/data-catalog/evm/henesys/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Henesys network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # henesys.contracts Source: https://docs.dune.com/data-catalog/evm/henesys/decoded/contracts Verified contract registry on Henesys — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the henesys blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=contracts) # henesys.event_logs Source: https://docs.dune.com/data-catalog/evm/henesys/decoded/event-logs Smart contract event logs on Henesys — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # henesys.logs_decoded Source: https://docs.dune.com/data-catalog/evm/henesys/decoded/logs-decoded ABI-decoded event logs on Henesys — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from henesys transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/henesys/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on henesys?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for henesys on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=logs_decoded) # Henesys Decoded Overview Source: https://docs.dune.com/data-catalog/evm/henesys/decoded/overview Simplifying Henesys smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/henesys/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/henesys/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/henesys/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # henesys.traces_decoded Source: https://docs.dune.com/data-catalog/evm/henesys/decoded/traces-decoded ABI-decoded function calls on Henesys — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from henesys transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/henesys/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=traces_decoded) # Henesys Overview Source: https://docs.dune.com/data-catalog/evm/henesys/overview Henesys data on Dune ## What is Henesys? Henesys is Avalanche's Layer 1 blockchain that powers the NEXPACE ecosystem and the MapleStory Universe. Built by Nexon's blockchain subsidiary, Henesys provides a secure, scalable platform for Web3 gaming, enabling player-owned economies, decentralized governance, and cross-chain interoperability through Chainlink's CCIP integration. ## Key Features * **Gaming-Focused Infrastructure**: Specialized blockchain for Web3 gaming and NFT ecosystems * **Avalanche L1**: Built on Avalanche for high performance and scalability * **Player-Owned Economies**: Enables true ownership of in-game assets through NFTs * **Fusion-Fission Model**: Dynamic NFT/item supply balancing mechanism * **Cross-Chain Interoperability**: Chainlink CCIP integration for secure NFT portability across games ## Ecosystem Highlights * MapleStory Universe integration with blockchain technology * NFT minting and trading for in-game assets * Synergy Apps ecosystem with open APIs for third-party developers * Support for various gaming use cases including: * In-game item tokenization * Player-to-player trading * Cross-game asset portability * Prediction markets and dashboards * Community-driven tooling ## Data on Dune > [card] [Raw Data](/data-catalog/evm/henesys/raw/blocks) > > Access to raw blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/evm/henesys/decoded/overview) > > Human-readable contract interactions and events ## Resources > [card] [NEXPACE Documentation](https://coinmarketcap.com/cmc-ai/maplestory-universe/what-is/) > > Learn more about the NEXPACE ecosystem and MapleStory Universe # henesys.blocks Source: https://docs.dune.com/data-catalog/evm/henesys/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Henesys. ## Table description The `henesys.blocks` table contains information about blocks in the henesys blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM henesys.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM henesys.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM henesys.blocks
  GROUP BY 1 
  LIMIT 10`
# henesys.creation_traces Source: https://docs.dune.com/data-catalog/evm/henesys/raw/creation-traces Contract deployment records on Henesys — deployer address, factory context, and deployed bytecode. ## Table Description The `henesys.creation_traces` table contains information about the creation of smart contracts on the henesys blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the henesys blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the henesys blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM henesys.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM henesys.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM henesys.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# henesys.logs Source: https://docs.dune.com/data-catalog/evm/henesys/raw/logs Smart contract event logs on Henesys — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `henesys.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/henesys/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM henesys.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM henesys.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM henesys.logs
WHERE evt_block_number = 1000000`
# henesys.traces Source: https://docs.dune.com/data-catalog/evm/henesys/raw/traces Internal transaction traces on Henesys — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `henesys.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/henesys/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM henesys.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# henesys.transactions Source: https://docs.dune.com/data-catalog/evm/henesys/raw/transactions Every transaction on Henesys — from, to, value, gas, calldata, and receipt status. ## Table Description The `henesys.transactions` table contains information about all transactions on the henesys blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the henesys blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/henesys/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=henesys\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM henesys.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM henesys.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM henesys.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on hyperevm Source: https://docs.dune.com/data-catalog/evm/hyperevm/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on hyperevm. > [!NOTE] > > This is a cross-chain table but can be filtered for hyperevm transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on hyperevm. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=hyperevm](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=hyperevm) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=hyperevm\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=hyperevm\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # hyperevm.contracts Source: https://docs.dune.com/data-catalog/evm/hyperevm/decoded/contracts Verified contract registry on HyperEVM — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the hyperevm blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperevm\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperevm\&table_name_t6f0df=contracts) # hyperevm.event_logs Source: https://docs.dune.com/data-catalog/evm/hyperevm/decoded/event-logs Smart contract event logs on HyperEVM — indexed topics and data fields emitted during transaction execution. # hyperevm.logs_decoded Source: https://docs.dune.com/data-catalog/evm/hyperevm/decoded/logs-decoded ABI-decoded event logs on HyperEVM — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from hyperevm transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On hyperevm, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/hyperevm/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **hyperevm.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperevm\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperevm\&table_name_t6f0df=logs_decoded) # HyperEVM Decoded Overview Source: https://docs.dune.com/data-catalog/evm/hyperevm/decoded/overview Simplifying HyperEVM smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/hyperevm/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/hyperevm/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/hyperevm/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # HyperEVM Overview Source: https://docs.dune.com/data-catalog/evm/hyperevm/overview HyperEVM data on Dune ## What is HyperEVM? HyperEVM is the EVM-compatible layer of the Hyperliquid blockchain, which features a dual-block architecture with HyperCore and HyperEVM. The HyperEVM is not a separate chain, but rather secured by the same HyperBFT consensus as HyperCore, allowing it to interact directly with HyperCore's spot and perpetual order books. ## Key Features * **Dual-Block Architecture**: Combines HyperCore (for trading) and HyperEVM (for smart contracts) * **EVM-Compatible**: Full compatibility with Ethereum smart contracts and tooling * **Direct Order Book Access**: Smart contracts can read prices and execute trades directly on HyperCore * **Permissionless Asset Deployment**: Projects can deploy ERC20 contracts and corresponding spot assets * **Unified State**: No bridging risk between HyperCore and HyperEVM * **Mature Liquidity**: Access to established, liquid onchain order books * **Captive Audience**: Built-in user base excited about onchain finance ## Technical Capabilities * **Read Precompiles**: Smart contracts can read prices directly from HyperCore order books * **Write System Contracts**: Contracts can send orders directly to HyperCore order books * **Protocolized Liquidations**: Lending protocols can implement automated liquidations * **Native Token Integration**: Seamless connection between HyperEVM contracts and HyperCore trading ## Use Cases * **DeFi Protocols**: Lending, borrowing, and automated trading strategies * **Token Projects**: Permissionless listing and trading of new assets * **Trading Bots**: Direct access to order books for algorithmic trading * **Cross-Protocol Integration**: Seamless interaction between different DeFi applications ## Current Status HyperEVM is currently in alpha stage with a gradual roll-out approach to ensure: * Equal access for all developers (no insiders) * Safe system upgrades for high-volume trading * Live iteration based on user feedback ## Data on Dune We currently don't support traces yet for hyperEVM so compared to usual EVM support we will not have: * Traces * Traces_decoded * "Enable bytecode matching" decoding feature * "Decode other contracts created by the same factory" decoding feature > [card] [Raw Data](/data-catalog/evm/hyperevm/raw/blocks) > > Access to raw blockchain data including blocks, transactions, and logs > [card] [Decoded Data](/data-catalog/evm/hyperevm/decoded/overview) > > Human-readable contract interactions and events ## Resources > [card] [Hyperliquid Documentation](https://hyperliquid.gitbook.io/hyperliquid-docs/hyperevm) > > Official documentation for developers building on HyperEVM # hyperevm.blocks Source: https://docs.dune.com/data-catalog/evm/hyperevm/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for HyperEVM. ## Table description The `hyperevm.blocks` table contains information about blocks in the hyperevm blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperevm\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperevm\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM hyperevm.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM hyperevm.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM hyperevm.blocks
  GROUP BY 1 
  LIMIT 10`
# hyperevm.logs Source: https://docs.dune.com/data-catalog/evm/hyperevm/raw/logs Smart contract event logs on HyperEVM — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `hyperevm.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/hyperevm/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperevm\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperevm\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM hyperevm.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM hyperevm.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM hyperevm.logs
WHERE evt_block_number = 1000000`
# hyperevm.transactions Source: https://docs.dune.com/data-catalog/evm/hyperevm/raw/transactions Every transaction on HyperEVM — from, to, value, gas, calldata, and receipt status. ## Table Description The `hyperevm.transactions` table contains information about all transactions on the hyperevm blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the hyperevm blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/hyperevm/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperevm\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hyperevm\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM hyperevm.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM hyperevm.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM hyperevm.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on ink Source: https://docs.dune.com/data-catalog/evm/ink/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Ink — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for ink transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on ink. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=ink](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=ink) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ink\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ink\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on ink Source: https://docs.dune.com/data-catalog/evm/ink/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on ink. > [!NOTE] > > This is a cross-chain table but can be filtered for ink transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on ink. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=ink](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=ink) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ink\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ink\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on ink Source: https://docs.dune.com/data-catalog/evm/ink/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on ink. > [!NOTE] > > This is a cross-chain table but can be filtered for ink transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on ink. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=ink](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=ink) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ink\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ink\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Ink Call Tables Source: https://docs.dune.com/data-catalog/evm/ink/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Ink network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # ink.contracts Source: https://docs.dune.com/data-catalog/evm/ink/decoded/contracts Verified contract registry on Ink — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the ink blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/ink/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # ink.logs_decoded Source: https://docs.dune.com/data-catalog/evm/ink/decoded/logs-decoded ABI-decoded event logs on Ink — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from ink transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On ink, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/ink/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **ink.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=logs_decoded) # Ink Decoded Overview Source: https://docs.dune.com/data-catalog/evm/ink/decoded/overview Simplifying Ink smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/ink/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/ink/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ink/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # ink.traces_decoded Source: https://docs.dune.com/data-catalog/evm/ink/decoded/traces-decoded ABI-decoded function calls on Ink — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from ink transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/ink/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=traces_decoded) # Ink Overview Source: https://docs.dune.com/data-catalog/evm/ink/overview Ink data on Dune ## What is Ink? Ink is Kraken's dedicated DeFi chain, built as a Layer 2 solution using the OP Stack technology. As part of the Superchain ecosystem, it provides a scalable, secure environment for decentralized finance applications while maintaining full compatibility with the Ethereum ecosystem. ## Technical Architecture Ink's architecture leverages the OP Stack to deliver a robust DeFi-focused platform: ### Optimistic Rollup Technology * Inherits Ethereum's security through optimistic rollups * Posts transaction data to Ethereum mainnet * Uses fraud proofs for security guarantees * Provides fast transaction finality with L2 execution ### Network Specifications * **Technology Stack**: OP Stack (Superchain) * **Gas Token**: ETH * **Challenge Period**: \~7 days * **Block Time**: \~2 seconds * **Network Type**: EVM-compatible Layer 2 ### Developer Tools & Infrastructure * **Smart Contract Development**: Support for Foundry, Hardhat, and Remix * **Block Explorers**: Multiple options for transaction monitoring * **Infrastructure**: * Account Abstraction support * Cross-chain bridges * Oracle integration * VRF capabilities * Indexing services ### Compatibility & Integration * Full EVM compatibility * Native bridge functionality * Support for standard Ethereum development tools * Seamless integration with existing Ethereum infrastructure > [card] [Ink Documentation](https://docs.inkonchain.com) > > Official documentation for developers building on Ink - Kraken's DeFi chain ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through event logs > [card] [Blocks](./raw/blocks) > > Information on blocks processed on Ink > [card] [Transactions](./raw/transactions) > > Detailed data on transactions > [card] [decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis # ink.blocks Source: https://docs.dune.com/data-catalog/evm/ink/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Ink. ## Table description The `ink.blocks` table contains information about blocks in the ink blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM ink.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM ink.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM ink.blocks
  GROUP BY 1 
  LIMIT 10`
# ink.creation_traces Source: https://docs.dune.com/data-catalog/evm/ink/raw/creation-traces Contract deployment records on Ink — deployer address, factory context, and deployed bytecode. ## Table Description The `ink.creation_traces` table contains information about the creation of smart contracts on the ink blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the ink blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the ink blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM ink.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM ink.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM ink.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# ink.logs Source: https://docs.dune.com/data-catalog/evm/ink/raw/logs Smart contract event logs on Ink — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `ink.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/ink/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM ink.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM ink.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM ink.logs
WHERE evt_block_number = 1000000`
# ink.traces Source: https://docs.dune.com/data-catalog/evm/ink/raw/traces Internal transaction traces on Ink — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `ink.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/ink/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM ink.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# ink.transactions Source: https://docs.dune.com/data-catalog/evm/ink/raw/transactions Every transaction on Ink — from, to, value, gas, calldata, and receipt status. ## Table Description The `ink.transactions` table contains information about all transactions on the ink blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the ink blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/ink/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ink\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM ink.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM ink.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM ink.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on kaia Source: https://docs.dune.com/data-catalog/evm/kaia/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on kaia. > [!NOTE] > > This is a cross-chain table but can be filtered for kaia transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on kaia. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=kaia](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=kaia) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=kaia\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=kaia\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on kaia Source: https://docs.dune.com/data-catalog/evm/kaia/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on kaia. > [!NOTE] > > This is a cross-chain table but can be filtered for kaia transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on kaia. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=kaia](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=kaia) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=kaia\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=kaia\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # KAIA Call Tables Source: https://docs.dune.com/data-catalog/evm/kaia/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the KAIA network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # kaia.contracts Source: https://docs.dune.com/data-catalog/evm/kaia/decoded/contracts Verified contract registry on KAIA — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the kaia blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/kaia/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # kaia.logs_decoded Source: https://docs.dune.com/data-catalog/evm/kaia/decoded/logs-decoded ABI-decoded event logs on KAIA — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from kaia transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/kaia/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on kaia?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for kaia on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=logs_decoded) # KAIA Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/kaia/decoded/overview Simplifying KAIA Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/kaia/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/kaia/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/kaia/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # kaia.traces_decoded Source: https://docs.dune.com/data-catalog/evm/kaia/decoded/traces-decoded ABI-decoded function calls on KAIA — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from kaia transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/kaia/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=traces_decoded) # KAIA Chain Overview Source: https://docs.dune.com/data-catalog/evm/kaia/overview KAIA blockchain data on Dune ## What is KAIA? KAIA is a highly optimized, BFT-based public blockchain designed to meet the performance and reliability needs of enterprises. With features like immediate finality, high transaction throughput, and EVM compatibility, KAIA provides a robust infrastructure for blockchain applications across industries. KAIA’s network architecture and consensus mechanism prioritize security and scalability, making it a preferred choice for businesses looking to deploy fast, cost-effective, and scalable blockchain solutions. ## Key Features of KAIA KAIA’s infrastructure is built around a few core design goals, ensuring its suitability for enterprise and real-world use cases. These goals drive the performance and flexibility of the blockchain. ### **Immediate Finality and High Throughput** KAIA enables 1-second block generation, confirming transactions with immediate finality. The network supports up to **4,000 transactions per second (TPS)**, providing the speed and reliability needed for real-time applications. ### **Low-Cost Transactions** KAIA offers transaction costs at approximately 1/10th the price of Ethereum, making it more accessible for businesses and developers looking to scale operations without high gas fees. ### **EVM Compatibility** KAIA is fully compatible with the Ethereum Virtual Machine (EVM), supporting Solidity contracts. This makes it easy for Ethereum developers to migrate their applications to KAIA with minimal changes, leveraging familiar tools like Remix, Hardhat, and Foundry. ## Network Architecture KAIA’s network architecture is divided into three logical subnetworks that work together to ensure high performance, scalability, and efficient resource utilization. * **Core Cell Network (CCN):** Responsible for transaction verification, block creation, and execution. * **Endpoint Node Network (ENN):** Handles API requests and processes data for auxiliary service chains. * **Service Chain Network (SCN):** Operates independently while connected to the main chain, enabling scalable dApp development. ### **Node Types in KAIA** KAIA employs a tiered architecture with several types of nodes, each serving specific roles: * **Consensus Node (CN):** Generates blocks and participates in the consensus process. * **Proxy Node (PN):** Handles transaction requests and network communication. * **Endpoint Node (EN):** Processes API requests and ensures data flow for service chains. ## Consensus Mechanism KAIA utilizes an optimized version of Istanbul BFT (Practical Byzantine Fault Tolerance) for its consensus. This ensures: * **Fast Block Finality:** No forks or transaction reversals, providing certainty for real-time applications. * **Verifiable Random Function (VRF):** Used for selecting block proposers, adding randomness to enhance security and decentralization. ## Security and Interoperability KAIA incorporates several security measures to protect the integrity of its network: * **Validator Key Separation:** Ensures that keys used for validation are kept separate from reward keys, reducing the risk of key theft. * **Cross-Chain Compatibility:** EVM compatibility allows KAIA to interoperate with other EVM-based chains, supporting cross-chain transactions and smart contract execution. ## Token Economy KAIA’s native token, **KAIA**, plays a central role in its economy: * **Block Rewards:** Distributed to validators and stakers to incentivize network participation. * **Inflation Rate:** Initially set at 5.2% annually, with block rewards allocated between creators, stakers, and ecosystem funds to support development and infrastructure. ## Governance and Transparency KAIA operates with an on-chain governance system where voting power is based on staked KAIA tokens. Governance ensures: * **Fair Representation:** Voting rights are capped to prevent dominance by large stakeholders. * **Delegation Allowed:** Token holders can delegate voting power to trusted representatives. * **Transparency:** All governance proposals and transactions are recorded on-chain, ensuring full auditability. ## Why KAIA? KAIA is built to lead Web3 adoption in Asia by offering high-performance, low-cost infrastructure for businesses of all sizes. It provides real-world asset (RWA) linkage, abundant liquidity support, and convenient development tools, making it an attractive platform for decentralized applications across various sectors. > [card] [KAIA documentation](https://docs.kaia.io/learn/) > > Access comprehensive documentation for KAIA, providing detailed insights into its zk-Rollup technology, platform architecture, and how to build on it. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, offering insights into contract interactions and the dynamics of kaia's zk-Rollup operations. > [card] [Blocks](./raw/blocks) > > Information on blocks processed through KAIA’s zk-Rollups, illustrating the network's enhanced throughput and scalability. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, highlighting the efficiency and reduced costs of operations on kaia. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and deeper understanding of smart contract executions on the kaia network. # kaia.blocks Source: https://docs.dune.com/data-catalog/evm/kaia/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for KAIA. ## Table description The `kaia.blocks` table contains information about blocks in the kaia blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM kaia.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM kaia.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM kaia.blocks
  GROUP BY 1 
  LIMIT 10`
# kaia.creation_traces Source: https://docs.dune.com/data-catalog/evm/kaia/raw/creation-traces Contract deployment records on KAIA — deployer address, factory context, and deployed bytecode. ## Table Description The `kaia.creation_traces` table contains information about the creation of smart contracts on the kaia blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the kaia blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the kaia blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM kaia.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM kaia.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM kaia.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# kaia.logs Source: https://docs.dune.com/data-catalog/evm/kaia/raw/logs Smart contract event logs on KAIA — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `kaia.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/kaia/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM kaia.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM kaia.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM kaia.logs
WHERE evt_block_number = 1000000`
# kaia.traces Source: https://docs.dune.com/data-catalog/evm/kaia/raw/traces Internal transaction traces on KAIA — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `kaia.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/kaia/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM kaia.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# kaia.transactions Source: https://docs.dune.com/data-catalog/evm/kaia/raw/transactions Every transaction on KAIA — from, to, value, gas, calldata, and receipt status. ## Table Description The `kaia.transactions` table contains information about all transactions on the kaia blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the kaia blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/kaia/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kaia\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM kaia.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM kaia.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM kaia.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on katana Source: https://docs.dune.com/data-catalog/evm/katana/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Katana — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for katana transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on katana. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=katana](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=katana) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=katana\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=katana\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on katana Source: https://docs.dune.com/data-catalog/evm/katana/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on DEX trade events across various protocols on katana. > [!NOTE] > > This is a cross-chain table but can be filtered for katana transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on katana. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=katana](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=katana) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=katana\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=katana\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Call Tables Source: https://docs.dune.com/data-catalog/evm/katana/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # katana.contracts Source: https://docs.dune.com/data-catalog/evm/katana/decoded/contracts Verified contract registry on Katana — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the katana blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/katana/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # katana.logs_decoded Source: https://docs.dune.com/data-catalog/evm/katana/decoded/logs-decoded ABI-decoded event logs on Katana — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from katana transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/katana/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on katana?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for katana on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=logs_decoded) # Decoded Data Overview Source: https://docs.dune.com/data-catalog/evm/katana/decoded/overview Overview of decoded data on Katana ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/katana/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/katana/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/katana/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # katana.traces_decoded Source: https://docs.dune.com/data-catalog/evm/katana/decoded/traces-decoded ABI-decoded function calls on Katana — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from katana transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/katana/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=traces_decoded) # Katana Overview Source: https://docs.dune.com/data-catalog/evm/katana/overview Katana data on Dune ## What is Katana? Katana is a high-performance blockchain platform designed for scalability and developer experience. It provides a robust infrastructure for building decentralized applications with advanced features and optimized performance. ## Key Features ### High Performance * Optimized for high-frequency trading and DeFi applications * Supports thousands of transactions per second * Low latency transaction confirmations ### Developer Experience * Full EVM compatibility with enhanced capabilities * Comprehensive developer tools and SDKs * Easy deployment and management of smart contracts ### Security and Infrastructure * Robust security model with multiple layers of protection * Advanced cryptographic protocols for transaction validation * Distributed network architecture for enhanced reliability > [card] [Katana Documentation](https://app.katana.network/krates) > > Official documentation and resources for developers building on Katana ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through event logs > [card] [Blocks](./raw/blocks) > > Information on blocks processed on Katana > [card] [Transactions](./raw/transactions) > > Detailed data on transactions > [card] [decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis # katana.blocks Source: https://docs.dune.com/data-catalog/evm/katana/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Katana. ## Table description The `katana.blocks` table contains information about blocks in the katana blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM katana.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM katana.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM katana.blocks
  GROUP BY 1 
  LIMIT 10`
# katana.creation_traces Source: https://docs.dune.com/data-catalog/evm/katana/raw/creation-traces Contract deployment records on Katana — deployer address, factory context, and deployed bytecode. ## Table Description The `katana.creation_traces` table contains information about the creation of smart contracts on the katana blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the katana blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the katana blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM katana.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM katana.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM katana.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# katana.logs Source: https://docs.dune.com/data-catalog/evm/katana/raw/logs Smart contract event logs on Katana — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `katana.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/katana/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM katana.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM katana.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM katana.logs
WHERE evt_block_number = 1000000`
# katana.traces Source: https://docs.dune.com/data-catalog/evm/katana/raw/traces Internal transaction traces on Katana — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `katana.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/katana/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM katana.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# katana.transactions Source: https://docs.dune.com/data-catalog/evm/katana/raw/transactions Every transaction on Katana — from, to, value, gas, calldata, and receipt status. ## Table Description The `katana.transactions` table contains information about all transactions on the katana blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the katana blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/katana/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=katana\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM katana.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM katana.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM katana.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on lens Source: https://docs.dune.com/data-catalog/evm/lens/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on lens. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. > [!NOTE] > > This is a cross-chain table but can be filtered for lens transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on lens. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=lens](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=lens) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=lens\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=lens\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on lens Source: https://docs.dune.com/data-catalog/evm/lens/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on lens. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. > [!NOTE] > > This is a cross-chain table but can be filtered for lens transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on lens. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=lens](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=lens) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=lens\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=lens\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Lens Call Tables Source: https://docs.dune.com/data-catalog/evm/lens/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Lens network in their own tables. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # lens.contracts Source: https://docs.dune.com/data-catalog/evm/lens/decoded/contracts Verified contract registry on Lens — contract name, namespace, ABI, and deployment metadata. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table Description This table contains information about the contracts Dune has decoded on the lens blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/lens/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # lens.logs_decoded Source: https://docs.dune.com/data-catalog/evm/lens/decoded/logs-decoded ABI-decoded event logs on Lens — human-readable event names and parsed parameters from verified contracts. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. \## Table Description The \`logs_decoded\` table contains decoded logs from lens transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/lens/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on lens?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for lens on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=logs_decoded) # Lens Decoded Overview Source: https://docs.dune.com/data-catalog/evm/lens/decoded/overview Simplifying Lens smart contract analysis through human-readable tables. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. > [!WARNING] > > Due to bugs in the Lens client, some contract creation traces are missing, and data in the code field is incomplete for certain blocks. Consequently, we cannot support factory and bytecode matching for this chain. Once the bugs are addressed, we will work to restore this functionality. We apologize for the inconvenience. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/lens/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/lens/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/lens/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # lens.traces_decoded Source: https://docs.dune.com/data-catalog/evm/lens/decoded/traces-decoded ABI-decoded function calls on Lens — parsed function names, inputs, and outputs from verified contracts. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table Description The `traces_decoded` table contains decoded traces from lens transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/lens/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=traces_decoded) # Lens Overview Source: https://docs.dune.com/data-catalog/evm/lens/overview Lens data on Dune > [!WARNING] > > **Deprecation Notice**: Starting from the 19th of December 2025 Dune is not live ingesting and indexing Lens data. The historical data of the chain will remain available to be used. Lens is a ZK chain that combines social primitives with a simple user experience and high scalability. Built on ZK technology, Lens Chain aims to bring SocialFi accessibility to a wider audience while maintaining robust security and performance. **Architecture and Technology:** * **ZKSync**: A ZK-based scaling solution that provides high throughput and security * **Social Protocol**: Core social primitives for building social applications * **Storage Nodes**: Decentralized storage with centralized performance * **Account Abstraction**: Built-in support for smart accounts and improved user experience **Enhanced User Experience:** Lens focuses on simplifying the blockchain experience while maintaining high performance. The platform is designed to make social applications accessible to everyday users while providing the tools and infrastructure developers need to build sophisticated applications. **Developer-Centric Approach:** The platform provides a comprehensive environment for developers to build and deploy applications, with native support for advanced features like account abstraction and paymaster functionality, enabling more sophisticated and user-friendly dApps. > [card] [Lens documentation](https://lens.xyz/docs/chain/overview) > > Access the official documentation for Lens to explore its architecture, features, and development resources. ## Data Catalog > [card] [Logs](./raw/logs) > > Event logs from smart contracts, providing insights into interactions and activities on the Lens network. > [card] [Blocks](./raw/blocks) > > Information on blocks processed using Lens's ZK technology, reflecting the network's capacity for high transaction throughput. > [card] [Transactions](./raw/transactions) > > Detailed transaction data, showcasing the operational efficiency and cost-effectiveness of Lens's validium solution. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and better understanding of smart contract executions on Lens. # lens.blocks Source: https://docs.dune.com/data-catalog/evm/lens/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Lens. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table description The `lens.blocks` table contains information about blocks in the lens blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM lens.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM lens.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM lens.blocks
  GROUP BY 1 
  LIMIT 10`
# lens.creation_traces Source: https://docs.dune.com/data-catalog/evm/lens/raw/creation-traces Contract deployment records on Lens — deployer address, factory context, and deployed bytecode. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table Description The `lens.creation_traces` table contains information about the creation of smart contracts on the lens blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the lens blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the lens blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM lens.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM lens.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM lens.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# lens.logs Source: https://docs.dune.com/data-catalog/evm/lens/raw/logs Smart contract event logs on Lens — indexed topics and data fields from token transfers, swaps, and protocol actions. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table Description The `lens.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/lens/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM lens.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM lens.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM lens.logs
WHERE evt_block_number = 1000000`
# lens.traces Source: https://docs.dune.com/data-catalog/evm/lens/raw/traces Internal transaction traces on Lens — cross-contract calls, delegate calls, and value transfers with full call stack context. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. > [!WARNING] > > You may see duplicate records in the `traces` table for the Lens chain. This is not a bug, but a result of trace calls appearing twice within the same transaction. These consecutive calls—an outer and an inner call—are identical except for their gas values. They share the same `from`, `to`, `input`, `output`, `success`, and `value` fields. ## Table Description The `lens.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/lens/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM lens.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# lens.transactions Source: https://docs.dune.com/data-catalog/evm/lens/raw/transactions Every transaction on Lens — from, to, value, gas, calldata, and receipt status. > [!WARNING] > > **Deprecation Notice**: Lens data ingestion has been discontinued as of December 2025. Only historical data is available, and no new data will be added. ## Table Description The `lens.transactions` table contains information about all transactions on the lens blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the lens blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/lens/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=lens\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM lens.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM lens.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM lens.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on linea Source: https://docs.dune.com/data-catalog/evm/linea/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Linea — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for linea transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on linea. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=linea](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=linea) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=linea\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=linea\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on linea Source: https://docs.dune.com/data-catalog/evm/linea/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on linea. > [!NOTE] > > This is a cross-chain table but can be filtered for linea transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on linea. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=linea](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=linea) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=linea\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=linea\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on linea Source: https://docs.dune.com/data-catalog/evm/linea/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on linea. > [!NOTE] > > This is a cross-chain table but can be filtered for linea transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on linea. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=linea](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=linea) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=linea\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=linea\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Linea Call Tables Source: https://docs.dune.com/data-catalog/evm/linea/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Linea network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # linea.contracts Source: https://docs.dune.com/data-catalog/evm/linea/decoded/contracts Verified contract registry on Linea — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the linea blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/linea/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # linea.logs_decoded Source: https://docs.dune.com/data-catalog/evm/linea/decoded/logs-decoded ABI-decoded event logs on Linea — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from linea transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On linea, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/linea/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **linea.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=logs_decoded) # Linea Decoded Overview Source: https://docs.dune.com/data-catalog/evm/linea/decoded/overview Simplifying Linea smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/linea/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/linea/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/linea/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # linea.traces_decoded Source: https://docs.dune.com/data-catalog/evm/linea/decoded/traces-decoded ABI-decoded function calls on Linea — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from linea transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/linea/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=traces_decoded) # Linea Overview Source: https://docs.dune.com/data-catalog/evm/linea/overview Linea data on Dune Linea is an EVM-equivalent network, scaling the Ethereum experience. Secured with a zero-knowledge rollup to Ethereum, built on lattice-based cryptography, and powered by Consensys. Linea behaves like Ethereum, but with a higher throughput and lower fees. > [card] [Linea docs](https://https://docs.linea.build/) > > The official documentation for Linea, providing detailed information on the protocol, architecture, and developer resources ## Data Catalog > [card] [Logs](/data-catalog/evm/linea/raw/logs) > > Event logs from smart contracts, providing insights into contract interactions > [card] [Blocks](/data-catalog/evm/linea/raw/blocks) > > Information and statistics on blocks, showcasing the network's activity and throughput > [card] [Transactions](/data-catalog/evm/linea/raw/transactions) > > Detailed transaction data, highlighting the execution and efficiency of operations > [card] [Decoded](/data-catalog/evm/linea/decoded/overview) > > Decoded transaction data for easier understanding and analysis of smart contract executions # linea.blocks Source: https://docs.dune.com/data-catalog/evm/linea/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Linea. ## Table description The `linea.blocks` table contains information about blocks in the linea blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM linea.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM linea.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM linea.blocks
  GROUP BY 1 
  LIMIT 10`
# linea.creation_traces Source: https://docs.dune.com/data-catalog/evm/linea/raw/creation-traces Contract deployment records on Linea — deployer address, factory context, and deployed bytecode. ## Table Description The `linea.creation_traces` table contains information about the creation of smart contracts on the linea blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the linea blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the linea blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM linea.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM linea.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM linea.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# linea.logs Source: https://docs.dune.com/data-catalog/evm/linea/raw/logs Smart contract event logs on Linea — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `linea.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/linea/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM linea.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM linea.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM linea.logs
WHERE evt_block_number = 1000000`
# linea.traces Source: https://docs.dune.com/data-catalog/evm/linea/raw/traces Internal transaction traces on Linea — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `linea.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/linea/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM linea.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# linea.transactions Source: https://docs.dune.com/data-catalog/evm/linea/raw/transactions Every transaction on Linea — from, to, value, gas, calldata, and receipt status. ## Table Description The `linea.transactions` table contains information about all transactions on the linea blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the linea blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/linea/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=linea\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM linea.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM linea.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM linea.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on mantle Source: https://docs.dune.com/data-catalog/evm/mantle/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Mantle — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for mantle transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on mantle. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=mantle](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=mantle) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=mantle\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=mantle\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on mantle Source: https://docs.dune.com/data-catalog/evm/mantle/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on mantle. > [!NOTE] > > This is a cross-chain table but can be filtered for mantle transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on mantle. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=mantle](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=mantle) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=mantle\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=mantle\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on mantle Source: https://docs.dune.com/data-catalog/evm/mantle/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on mantle. > [!NOTE] > > This is a cross-chain table but can be filtered for mantle transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on mantle. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=mantle](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=mantle) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=mantle\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=mantle\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Mantle Call Tables Source: https://docs.dune.com/data-catalog/evm/mantle/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Mantle network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # mantle.contracts Source: https://docs.dune.com/data-catalog/evm/mantle/decoded/contracts Verified contract registry on Mantle — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the mantle blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/mantle/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # mantle.logs_decoded Source: https://docs.dune.com/data-catalog/evm/mantle/decoded/logs-decoded ABI-decoded event logs on Mantle — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from mantle transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On mantle, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/mantle/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **mantle.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=logs_decoded) # Mantle Decoded Overview Source: https://docs.dune.com/data-catalog/evm/mantle/decoded/overview Simplifying Mantle smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/mantle/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/mantle/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/mantle/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # mantle.traces_decoded Source: https://docs.dune.com/data-catalog/evm/mantle/decoded/traces-decoded ABI-decoded function calls on Mantle — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from mantle transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/mantle/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=traces_decoded) # Mantle Overview Source: https://docs.dune.com/data-catalog/evm/mantle/overview Mantle data on Dune Mantle Network is dedicated to building an EVM-compatible scaling solution for Ethereum. This means that all contracts and tools running on Ethereum can operate on the Mantle Network with minimal modifications. Taking advantage of its modular architecture, Mantle Network combines an optimistic rollup with various innovative data availability solutions, providing cheaper and more accessible data availability while inheriting the security of Ethereum. Mantle's design philosophy aims to offer users a less costly and more user-friendly experience, provide developers with a simpler and more flexible development environment, and deliver a comprehensive set of infrastructure for the next wave of mass-adopted dApps. As an Ethereum L2, Mantle Network offers the security, stability, and scalability necessary to support your onchain applications. Developers can deploy any EVM-compatible codebase and smoothly transition users and assets from Ethereum L1 and other compatible chains. ## Key Features * **Built as a Rollup**: Utilizes Ethereum validators and consensus protocols to significantly reduce gas fees, decrease latency, and increase throughput. Users can customize transaction confirmation requirements to provide near real-time confirmation latency with minimal security settings. * **Modular Architecture**: Unlike traditional monolithic chains that execute transaction execution, consensus, settlement, and storage at the same network layer, Mantle separates these functions into individual modules as a modular chain. These include an EVM-compatible execution layer developed by Mantle for transaction execution, a consensus layer and settlement layer completed on Ethereum, and an external DA component (currently Mantle DA powered by EigenDA technology; we will switch to EigenDA upon its mainnet stable launch). * **Secured by Ethereum**: L2 state transitions are verified by Ethereum validators, undergoing the same consensus and settlement processes as L1 transactions. * **Modular Data Availability**: Independent DA modules, such as Mantle DA powered by EigenLayer's EigenDA technology. According to internal assessments, this translates to potential cost savings of more than 90% compared to on-chain L1. > [card] [Mantle documentation](https://mantle.network/docs) > > Explore comprehensive documentation on Mantle, detailing its architecture, protocol, and resources for developers. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, providing insights into interactions within the Mantle network. > [card] [Blocks](./raw/blocks) > > Information on blocks, illustrating the operational capacity and activity levels on Mantle. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the efficiency and execution of operations on Mantle. > [card] [Decoded](./decoded/overview) > > Enhanced transaction data decoded for better analysis and understanding of contract executions. # mantle.blocks Source: https://docs.dune.com/data-catalog/evm/mantle/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Mantle. ## Table description The `mantle.blocks` table contains information about blocks in the mantle blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM mantle.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM mantle.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM mantle.blocks
  GROUP BY 1 
  LIMIT 10`
# mantle.creation_traces Source: https://docs.dune.com/data-catalog/evm/mantle/raw/creation-traces Contract deployment records on Mantle — deployer address, factory context, and deployed bytecode. ## Table Description The `mantle.creation_traces` table contains information about the creation of smart contracts on the mantle blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the mantle blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the mantle blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM mantle.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM mantle.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM mantle.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# mantle.logs Source: https://docs.dune.com/data-catalog/evm/mantle/raw/logs Smart contract event logs on Mantle — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `mantle.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/mantle/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM mantle.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM mantle.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM mantle.logs
WHERE evt_block_number = 1000000`
# mantle.traces Source: https://docs.dune.com/data-catalog/evm/mantle/raw/traces Internal transaction traces on Mantle — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `mantle.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/mantle/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM mantle.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# mantle.transactions Source: https://docs.dune.com/data-catalog/evm/mantle/raw/transactions Every transaction on Mantle — from, to, value, gas, calldata, and receipt status. ## Table Description The `mantle.transactions` table contains information about all transactions on the mantle blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the mantle blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/mantle/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mantle\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM mantle.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM mantle.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM mantle.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on megaeth Source: https://docs.dune.com/data-catalog/evm/megaeth/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on megaeth. > [!NOTE] > > This is a cross-chain table but can be filtered for megaeth transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on megaeth. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=megaeth](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=megaeth) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=megaeth\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=megaeth\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # MegaETH Call Tables Source: https://docs.dune.com/data-catalog/evm/megaeth/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the MegaETH network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # megaeth.contracts Source: https://docs.dune.com/data-catalog/evm/megaeth/decoded/contracts Verified contract registry on MegaETH — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the megaeth blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=contracts) # megaeth.event_logs Source: https://docs.dune.com/data-catalog/evm/megaeth/decoded/event-logs Smart contract event logs on MegaETH — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # megaeth.logs_decoded Source: https://docs.dune.com/data-catalog/evm/megaeth/decoded/logs-decoded ABI-decoded event logs on MegaETH — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from megaeth transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/megaeth/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on megaeth?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for megaeth on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=logs_decoded) # MegaETH Decoded Overview Source: https://docs.dune.com/data-catalog/evm/megaeth/decoded/overview Simplifying MegaETH smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/megaeth/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/megaeth/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/megaeth/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # megaeth.traces_decoded Source: https://docs.dune.com/data-catalog/evm/megaeth/decoded/traces-decoded ABI-decoded function calls on MegaETH — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from megaeth transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/megaeth/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=traces_decoded) # MegaETH Overview Source: https://docs.dune.com/data-catalog/evm/megaeth/overview MegaETH data on Dune ## What is MegaETH? MegaETH is an EVM-compatible blockchain built to deliver **real-time performance**, aiming for millisecond-level responsiveness while sustaining high throughput and substantial compute capacity. The goal is to push performance toward hardware limits so developers can build applications with fast feedback loops and high update rates. ## Key Features * **Real-time execution**: Process transactions as they arrive and publish state updates in real time. * **High throughput + compute**: Designed to support demanding on-chain applications that are bottlenecked by gas-per-second and compute limits on typical EVM chains. * **Node specialization**: Uses specialized node roles (sequencers, provers, full nodes, replica nodes) to reduce consensus/execution overhead while preserving verifiability. * **EVM compatibility**: Supports the EVM environment so existing Ethereum tooling and contracts can be used. * **Security via base layers**: Delegates security and censorship-resistance constraints to base layers such as Ethereum and EigenDA, enabling a broader performance optimization design space. ## Data on Dune > [card] [Raw Data](/data-catalog/evm/megaeth/raw/blocks) > > Access to raw blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/evm/megaeth/decoded/overview) > > Human-readable contract interactions and events ## Resources > [card] [MegaETH Research](https://www.megaeth.com/research) > > MegaETH research and technical deep dives # megaeth.blocks Source: https://docs.dune.com/data-catalog/evm/megaeth/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for MegaETH. ## Table description The `megaeth.blocks` table contains information about blocks in the megaeth blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM megaeth.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM megaeth.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM megaeth.blocks
  GROUP BY 1 
  LIMIT 10`
# megaeth.creation_traces Source: https://docs.dune.com/data-catalog/evm/megaeth/raw/creation-traces Contract deployment records on MegaETH — deployer address, factory context, and deployed bytecode. ## Table Description The `megaeth.creation_traces` table contains information about the creation of smart contracts on the megaeth blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the megaeth blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the megaeth blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM megaeth.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM megaeth.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM megaeth.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# megaeth.logs Source: https://docs.dune.com/data-catalog/evm/megaeth/raw/logs Smart contract event logs on MegaETH — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `megaeth.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/megaeth/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM megaeth.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM megaeth.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM megaeth.logs
WHERE evt_block_number = 1000000`
# megaeth.traces Source: https://docs.dune.com/data-catalog/evm/megaeth/raw/traces Internal transaction traces on MegaETH — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `megaeth.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/megaeth/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM megaeth.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# megaeth.transactions Source: https://docs.dune.com/data-catalog/evm/megaeth/raw/transactions Every transaction on MegaETH — from, to, value, gas, calldata, and receipt status. ## Table Description The `megaeth.transactions` table contains information about all transactions on the megaeth blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the megaeth blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/megaeth/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=megaeth\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM megaeth.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM megaeth.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM megaeth.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on mezo Source: https://docs.dune.com/data-catalog/evm/mezo/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on mezo. > [!NOTE] > > This is a cross-chain table but can be filtered for mezo transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on mezo. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=mezo](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=mezo) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=mezo\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=mezo\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Mezo Call Tables Source: https://docs.dune.com/data-catalog/evm/mezo/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Mezo network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # mezo.contracts Source: https://docs.dune.com/data-catalog/evm/mezo/decoded/contracts Verified contract registry on Mezo — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the mezo blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/mezo/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # mezo.logs_decoded Source: https://docs.dune.com/data-catalog/evm/mezo/decoded/logs-decoded ABI-decoded event logs on Mezo — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from mezo transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/mezo/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on mezo?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for mezo on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=logs_decoded) # Mezo Decoded Overview Source: https://docs.dune.com/data-catalog/evm/mezo/decoded/overview Simplifying Mezo smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/mezo/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/mezo/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/mezo/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # mezo.traces_decoded Source: https://docs.dune.com/data-catalog/evm/mezo/decoded/traces-decoded ABI-decoded function calls on Mezo — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from mezo transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/mezo/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=traces_decoded) # Mezo Overview Source: https://docs.dune.com/data-catalog/evm/mezo/overview Mezo data on Dune ## What is Mezo? Mezo is the onchain Bitcoin banking platform owned by its users. Users can access self-service Bitcoin finance without interacting with loan officers, undergoing credit checks, or observing operational hours. It's just you, your Bitcoin, and permissionless access to financial services 24/7. Mezo eliminates traditional banking middlemen, giving you the power to manage your finances intelligently on your own terms. The platform is built on tBTC, the most battle-tested decentralized Bitcoin bridge with 24k+ BTC bridged since 2020. ## Key Features and Advantages ### Flagship Feature: Fixed Rate Bitcoin Loans **MUSD: Bitcoin-Backed Money with Complete Autonomy** Deposit Bitcoin as collateral, mint MUSD (a dollar-pegged stablecoin), and use it however you need. Your Bitcoin stays yours while MUSD provides you with instant liquidity. Fixed rates start as low as 1% and stay fixed for the entire life of the loan. This is self-service banking with complete autonomy. Unlike any traditional banking experience, there are no minimum payments, set repayment schedules, or penalties for early repayment. Close your position tomorrow or keep it open for years. ### Core Features * **Bitcoin Loans (MUSD)**: Self-service loans at fixed 1% rates. Borrow MUSD against your Bitcoin and manage everything yourself. Access up to 90% of your Bitcoin's value. * **Bitcoin Savings Accounts (Yield Vaults)**: Deposit BTC or MUSD into automated vaults that generate yield through lending, liquidity provision, and DeFi strategies. Like a high-yield savings account, but transparent, onchain. No minimum balance, withdraw anytime. * **Native Swaps**: Trade directly on Mezo without leaving the platform. Swap between BTC, MUSD, and other assets with deep liquidity and competitive rates. * **Mezo Market**: Spend your MUSD on real goods and services. Buy gift cards, pay for subscriptions, and access everyday purchases, all without selling your Bitcoin. * **BTC as Gas**: Every transaction on Mezo is paid in Bitcoin. This keeps the experience pure Bitcoin while creating a revenue stream that flows back to participants in the Mezo ecosystem. ### Network Specifications * **Technology Stack**: EVM-compatible blockchain * **Gas Token**: BTC (Bitcoin) * **Network Type**: EVM-compatible Layer 2 * **Base Bridge**: tBTC (decentralized Bitcoin bridge) * **Reserve Verification**: Verifiable 24/7 reserves ### Developer Tools & Infrastructure * **Full EVM Compatibility**: Support for standard Ethereum development tools * **Permissionless Building**: Developers can build without permission * **Open Source**: Contracts and documentation are open source * **Infrastructure**: * Cross-chain bridges * DeFi integrations * Payment systems * Financial primitives > [card] [Mezo Documentation](https://mezo.org/docs/users/introduction/mezo-self-service-banking) > > Official documentation for users and developers building on Mezo ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through event logs > [card] [Blocks](./raw/blocks) > > Information on blocks processed on Mezo > [card] [Transactions](./raw/transactions) > > Detailed data on transactions > [card] [decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis # mezo.blocks Source: https://docs.dune.com/data-catalog/evm/mezo/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Mezo. ## Table description The `mezo.blocks` table contains information about blocks in the mezo blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM mezo.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM mezo.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM mezo.blocks
  GROUP BY 1 
  LIMIT 10`
# mezo.creation_traces Source: https://docs.dune.com/data-catalog/evm/mezo/raw/creation-traces Contract deployment records on Mezo — deployer address, factory context, and deployed bytecode. ## Table Description The `mezo.creation_traces` table contains information about the creation of smart contracts on the mezo blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the mezo blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the mezo blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM mezo.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM mezo.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM mezo.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# mezo.logs Source: https://docs.dune.com/data-catalog/evm/mezo/raw/logs Smart contract event logs on Mezo — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `mezo.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/mezo/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM mezo.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM mezo.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM mezo.logs
WHERE evt_block_number = 1000000`
# mezo.traces Source: https://docs.dune.com/data-catalog/evm/mezo/raw/traces Internal transaction traces on Mezo — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `mezo.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/mezo/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM mezo.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# mezo.transactions Source: https://docs.dune.com/data-catalog/evm/mezo/raw/transactions Every transaction on Mezo — from, to, value, gas, calldata, and receipt status. ## Table Description The `mezo.transactions` table contains information about all transactions on the mezo blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the mezo blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/mezo/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=mezo\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM mezo.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM mezo.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM mezo.transactions
ORDER BY gas_price DESC
LIMIT 10`
# Monad Testnet Call Tables Source: https://docs.dune.com/data-catalog/evm/monad-testnet/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Monad testnet in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # monad_testnet.contracts Source: https://docs.dune.com/data-catalog/evm/monad-testnet/decoded/contracts Verified contract registry on Monad Testnet — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the monad_testnet blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=contracts) # monad_testnet.event_logs Source: https://docs.dune.com/data-catalog/evm/monad-testnet/decoded/event-logs Smart contract event logs on Monad Testnet — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # monad_testnet.logs_decoded Source: https://docs.dune.com/data-catalog/evm/monad-testnet/decoded/logs-decoded ABI-decoded event logs on Monad Testnet — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from monad_testnet transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/monad_testnet/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on monad_testnet?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for monad_testnet on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=logs_decoded) # Monad Testnet Decoded Overview Source: https://docs.dune.com/data-catalog/evm/monad-testnet/decoded/overview Simplifying Monad testnet smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/monad_testnet/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/monad_testnet/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/monad_testnet/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # monad_testnet.traces_decoded Source: https://docs.dune.com/data-catalog/evm/monad-testnet/decoded/traces-decoded ABI-decoded function calls on Monad Testnet — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from monad_testnet transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/monad_testnet/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=traces_decoded) # Monad Testnet Overview Source: https://docs.dune.com/data-catalog/evm/monad-testnet/overview Monad Testnet data on Dune ## What is Monad? Monad is a high-performance Ethereum-compatible L1 that materially advances the efficient frontier in the balance between decentralization and scalability. Monad introduces optimizations in five major areas, resulting in an Ethereum-compatible Layer-1 blockchain with 10,000 tps of throughput, 400ms block frequency, and 800ms finality. ## Key Features * **MonadBFT**: Performant, tail-fork-resistant BFT consensus * **RaptorCast**: Efficient block transmission * **Asynchronous Execution**: Pipelining consensus and execution to raise the time budget for execution * **Parallel Execution**: Efficient transaction execution * **MonadDb**: Efficient state access * **Full EVM Compatibility**: Complete bytecode equivalence for seamless application deployment * **Ethereum RPC API Compatibility**: Familiar interface for users and developers ## Performance Characteristics * **10,000 TPS**: High throughput for scalable applications * **400ms Block Frequency**: Fast block production * **800ms Finality**: Quick transaction finalization * **Commodity Hardware**: Designed to run on standard hardware ## Architecture Monad is designed with a focus on performance and scalability. The first Monad client is built by Category Labs and is written from scratch in C++ and Rust. The monad-bft consensus client implementation is open-source under GPL-3.0. ## Testnet Monad's public testnet provides developers with a sandbox environment to test and deploy applications before mainnet launch. The testnet supports many leading Ethereum developer tools and infrastructure providers. ## Data on Dune > [card] [Raw Data](/data-catalog/evm/monad-testnet/raw/blocks) > > Access to raw blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/evm/monad-testnet/decoded/overview) > > Human-readable contract interactions and events ## Resources > [card] [Monad Documentation](https://docs.monad.xyz/) > > Official documentation for developers building on Monad # monad_testnet.blocks Source: https://docs.dune.com/data-catalog/evm/monad-testnet/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Monad Testnet. ## Table description The `monad_testnet.blocks` table contains information about blocks in the monad_testnet blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM monad_testnet.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM monad_testnet.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM monad_testnet.blocks
  GROUP BY 1 
  LIMIT 10`
# monad_testnet.creation_traces Source: https://docs.dune.com/data-catalog/evm/monad-testnet/raw/creation-traces Contract deployment records on Monad Testnet — deployer address, factory context, and deployed bytecode. ## Table Description The `monad_testnet.creation_traces` table contains information about the creation of smart contracts on the monad_testnet blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the monad_testnet blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the monad_testnet blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM monad_testnet.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM monad_testnet.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM monad_testnet.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# monad_testnet.logs Source: https://docs.dune.com/data-catalog/evm/monad-testnet/raw/logs Smart contract event logs on Monad Testnet — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `monad_testnet.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/monad_testnet/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM monad_testnet.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM monad_testnet.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM monad_testnet.logs
WHERE evt_block_number = 1000000`
# monad_testnet.traces Source: https://docs.dune.com/data-catalog/evm/monad-testnet/raw/traces Internal transaction traces on Monad Testnet — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `monad_testnet.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/monad_testnet/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM monad_testnet.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# monad_testnet.transactions Source: https://docs.dune.com/data-catalog/evm/monad-testnet/raw/transactions Every transaction on Monad Testnet — from, to, value, gas, calldata, and receipt status. ## Table Description The `monad_testnet.transactions` table contains information about all transactions on the monad_testnet blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the monad_testnet blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/monad_testnet/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad_testnet\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM monad_testnet.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM monad_testnet.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM monad_testnet.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on monad Source: https://docs.dune.com/data-catalog/evm/monad/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on monad. > [!NOTE] > > This is a cross-chain table but can be filtered for monad transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on monad. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=monad](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=monad) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=monad\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=monad\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Monad Call Tables Source: https://docs.dune.com/data-catalog/evm/monad/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Monad in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # monad.contracts Source: https://docs.dune.com/data-catalog/evm/monad/decoded/contracts Verified contract registry on Monad — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the monad blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=contracts) # monad.event_logs Source: https://docs.dune.com/data-catalog/evm/monad/decoded/event-logs Smart contract event logs on Monad — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # monad.logs_decoded Source: https://docs.dune.com/data-catalog/evm/monad/decoded/logs-decoded ABI-decoded event logs on Monad — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from monad transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On monad, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/monad/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **monad.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=logs_decoded) # Monad Decoded Overview Source: https://docs.dune.com/data-catalog/evm/monad/decoded/overview Simplifying Monad smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/monad/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/monad/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/monad/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # monad.traces_decoded Source: https://docs.dune.com/data-catalog/evm/monad/decoded/traces-decoded ABI-decoded function calls on Monad — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from monad transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/monad/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=traces_decoded) # Monad Overview Source: https://docs.dune.com/data-catalog/evm/monad/overview Monad data on Dune ## What is Monad? Monad is a high-performance Ethereum-compatible L1 that materially advances the efficient frontier in the balance between decentralization and scalability. Monad introduces optimizations in five major areas, resulting in an Ethereum-compatible Layer-1 blockchain with 10,000 tps of throughput, 400ms block frequency, and 800ms finality. ## Key Features * **MonadBFT**: Performant, tail-fork-resistant BFT consensus * **RaptorCast**: Efficient block transmission * **Asynchronous Execution**: Pipelining consensus and execution to raise the time budget for execution * **Parallel Execution**: Efficient transaction execution * **MonadDb**: Efficient state access * **Full EVM Compatibility**: Complete bytecode equivalence for seamless application deployment * **Ethereum RPC API Compatibility**: Familiar interface for users and developers ## Performance Characteristics * **10,000 TPS**: High throughput for scalable applications * **400ms Block Frequency**: Fast block production * **800ms Finality**: Quick transaction finalization * **Commodity Hardware**: Designed to run on standard hardware ## Architecture Monad is designed with a focus on performance and scalability. The first Monad client is built by Category Labs and is written from scratch in C++ and Rust. The monad-bft consensus client implementation is open-source under GPL-3.0. ## Mainnet Monad mainnet provides developers with a production-ready environment to deploy and run applications. The mainnet supports many leading Ethereum developer tools and infrastructure providers. ## Data on Dune > [card] [Raw Data](/data-catalog/evm/monad/raw/blocks) > > Access to raw blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/evm/monad/decoded/overview) > > Human-readable contract interactions and events ## Resources > [card] [Monad Documentation](https://docs.monad.xyz/) > > Official documentation for developers building on Monad # monad.blocks Source: https://docs.dune.com/data-catalog/evm/monad/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Monad. ## Table description The `monad.blocks` table contains information about blocks in the monad blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM monad.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM monad.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM monad.blocks
  GROUP BY 1 
  LIMIT 10`
# monad.creation_traces Source: https://docs.dune.com/data-catalog/evm/monad/raw/creation-traces Contract deployment records on Monad — deployer address, factory context, and deployed bytecode. ## Table Description The `monad.creation_traces` table contains information about the creation of smart contracts on the monad blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the monad blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the monad blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM monad.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM monad.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM monad.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# monad.logs Source: https://docs.dune.com/data-catalog/evm/monad/raw/logs Smart contract event logs on Monad — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `monad.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/monad/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM monad.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM monad.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM monad.logs
WHERE evt_block_number = 1000000`
# monad.traces Source: https://docs.dune.com/data-catalog/evm/monad/raw/traces Internal transaction traces on Monad — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `monad.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/monad/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM monad.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# monad.transactions Source: https://docs.dune.com/data-catalog/evm/monad/raw/transactions Every transaction on Monad — from, to, value, gas, calldata, and receipt status. ## Table Description The `monad.transactions` table contains information about all transactions on the monad blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the monad blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/monad/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=monad\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM monad.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM monad.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM monad.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on morph Source: https://docs.dune.com/data-catalog/evm/morph/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on morph. > [!NOTE] > > This is a cross-chain table but can be filtered for morph transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on morph. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=morph](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=morph) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=morph\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=morph\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Morph Call Tables Source: https://docs.dune.com/data-catalog/evm/morph/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Morph network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # morph.contracts Source: https://docs.dune.com/data-catalog/evm/morph/decoded/contracts Verified contract registry on Morph — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the morph blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=contracts) # morph.event_logs Source: https://docs.dune.com/data-catalog/evm/morph/decoded/event-logs Smart contract event logs on Morph — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # morph.logs_decoded Source: https://docs.dune.com/data-catalog/evm/morph/decoded/logs-decoded ABI-decoded event logs on Morph — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from morph transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/morph/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on morph?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for morph on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=logs_decoded) # Morph Decoded Overview Source: https://docs.dune.com/data-catalog/evm/morph/decoded/overview Simplifying Morph smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/morph/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/morph/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/morph/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # morph.traces_decoded Source: https://docs.dune.com/data-catalog/evm/morph/decoded/traces-decoded ABI-decoded function calls on Morph — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from morph transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/morph/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=traces_decoded) # Morph Overview Source: https://docs.dune.com/data-catalog/evm/morph/overview Morph blockchain data on Dune ## What is Morph? Morph is an EVM-compatible Ethereum Layer 2 built as an optimistic rollup. It targets low-cost, high-throughput onchain activity while inheriting security from Ethereum. Dune indexes Morph under the `morph` schema namespace with standard EVM raw tables, ABI-decoded contract data, and curated DEX, transfer, price, and gas spells. ## Key Features * **EVM compatibility**: Deploy and interact with standard Solidity contracts using familiar Ethereum tooling. * **Optimistic rollup**: Morph batches transactions to Ethereum for data availability and fault-proof security. * **Curated analytics**: Morph is included in cross-chain spells such as `dex.trades`, `tokens.transfers`, `prices.usd`, and `gas.fees`. ## EVM Specifics on Dune * **Schema namespace**: `morph` (query as `morph.blocks`, `morph.transactions`, etc.). * **Chain ID**: `2818` (mainnet). * **Native gas token**: ETH (18 decimals). * **Raw tables**: `blocks`, `transactions`, `logs`, `traces`, `creation_traces`. * **Decoded infrastructure**: `morph.contracts`, `morph.signatures`, `morph.logs_decoded`, `morph.traces_decoded`. * **Standard token events**: `erc20_morph.evt_*`, `erc721_morph.evt_*` (when materialized). ## Data on Dune > [card] [Raw Data](/data-catalog/evm/morph/raw/blocks) > > Block, transaction, log, and trace data indexed from Morph nodes. > [card] [Decoded Data](/data-catalog/evm/morph/decoded/overview) > > ABI-decoded contract interactions and events. > [card] [DEX Trades](/data-catalog/evm/morph/curated-data/dex/dex-trades) > > Standardized decentralized exchange trades via `dex.trades`. ## Resources > [card] [Morph](https://www.morphl2.io/) > > Morph project home page. > [card] [Block Explorer](https://explorer.morph.network) > > Morph mainnet block explorer. # morph.blocks Source: https://docs.dune.com/data-catalog/evm/morph/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Morph. ## Table description The `morph.blocks` table contains information about blocks in the morph blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM morph.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM morph.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM morph.blocks
  GROUP BY 1 
  LIMIT 10`
# morph.creation_traces Source: https://docs.dune.com/data-catalog/evm/morph/raw/creation-traces Contract deployment records on Morph — deployer address, factory context, and deployed bytecode. ## Table Description The `morph.creation_traces` table contains information about the creation of smart contracts on the morph blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the morph blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the morph blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM morph.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM morph.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM morph.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# morph.logs Source: https://docs.dune.com/data-catalog/evm/morph/raw/logs Smart contract event logs on Morph — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `morph.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/morph/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM morph.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM morph.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM morph.logs
WHERE evt_block_number = 1000000`
# morph.traces Source: https://docs.dune.com/data-catalog/evm/morph/raw/traces Internal transaction traces on Morph — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `morph.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/morph/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM morph.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# morph.transactions Source: https://docs.dune.com/data-catalog/evm/morph/raw/transactions Every transaction on Morph — from, to, value, gas, calldata, and receipt status. ## Table Description The `morph.transactions` table contains information about all transactions on the morph blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the morph blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/morph/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=morph\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM morph.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM morph.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM morph.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on opbnb Source: https://docs.dune.com/data-catalog/evm/opbnb/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on opBNB — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for opbnb transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on opbnb. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=opbnb](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=opbnb) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=opbnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=opbnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on opbnb Source: https://docs.dune.com/data-catalog/evm/opbnb/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on opbnb. > [!NOTE] > > This is a cross-chain table but can be filtered for opbnb transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on opbnb. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=opbnb](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=opbnb) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=opbnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=opbnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on opbnb Source: https://docs.dune.com/data-catalog/evm/opbnb/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on opbnb. > [!NOTE] > > This is a cross-chain table but can be filtered for opbnb transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on opbnb. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=opbnb](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=opbnb) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=opbnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=opbnb\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # opBNB Call Tables Source: https://docs.dune.com/data-catalog/evm/opbnb/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the opBNB network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # opbnb.contracts Source: https://docs.dune.com/data-catalog/evm/opbnb/decoded/contracts Verified contract registry on opBNB — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the opbnb blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/opbnb/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # opbnb.logs_decoded Source: https://docs.dune.com/data-catalog/evm/opbnb/decoded/logs-decoded ABI-decoded event logs on opBNB — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from opbnb transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/opbnb/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on opbnb?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for opbnb on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=logs_decoded) # opBNB Decoded Overview Source: https://docs.dune.com/data-catalog/evm/opbnb/decoded/overview Simplifying opBNB smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/opbnb/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/opbnb/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/opbnb/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # opbnb.traces_decoded Source: https://docs.dune.com/data-catalog/evm/opbnb/decoded/traces-decoded ABI-decoded function calls on opBNB — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from opbnb transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/opbnb/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=traces_decoded) # opBNB Overview Source: https://docs.dune.com/data-catalog/evm/opbnb/overview opBNB data on Dune ## What is opBNB? opBNB is a high-performance Layer 2 scaling solution for the BNB Smart Chain, powered by the bedrock version of Optimism OP Stack. It works by offloading transaction processing and resource usage from the BNB Smart Chain while maintaining data posting to the underlying mainnet. Users interact with opBNB by depositing funds from BSC and using applications and contracts on opBNB. ## Key Features and Advantages ### Optimistic Rollup Technology * Processes transactions off-chain while maintaining BSC chain security * Bundles multiple transactions into single batches for main chain submission * Reduces computational load on BSC for faster and cheaper transactions * Supports up to 5,000 transactions per second (TPS) ### Transaction Efficiency * Lower transaction fees through off-chain processing * Faster transaction confirmations * Enhanced user experience for DApps and DeFi platforms * Ideal for micro-transactions ### Security and Infrastructure * Maintains security through BSC main chain's security model * Fraud-proof mechanism for transaction validation * Sequencers aggregate transactions and compute state transitions * Provers generate cryptographic proofs for state validity * Verifiers check proofs to ensure network integrity ### Network Specifications * **Technology Stack**: OP Stack (bedrock version) * **Gas Token**: BNB * **Network Type**: EVM-compatible Layer 2 * **Base Chain**: BNB Smart Chain ### Developer Tools & Infrastructure * **Smart Contract Development**: Support for standard Ethereum development tools * **Block Explorers**: Multiple options for transaction monitoring * **Infrastructure**: * Cross-chain bridges * Oracle integration * VRF capabilities * Indexing services > [card] [opBNB Documentation](https://docs.bnbchain.org/bnb-opbnb/overview/) > > Official documentation for developers building on opBNB ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through event logs > [card] [Blocks](./raw/blocks) > > Information on blocks processed on opBNB > [card] [Transactions](./raw/transactions) > > Detailed data on transactions > [card] [decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis # opbnb.blocks Source: https://docs.dune.com/data-catalog/evm/opbnb/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for opBNB. ## Table description The `opbnb.blocks` table contains information about blocks in the opbnb blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM opbnb.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM opbnb.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM opbnb.blocks
  GROUP BY 1 
  LIMIT 10`
# opbnb.creation_traces Source: https://docs.dune.com/data-catalog/evm/opbnb/raw/creation-traces Contract deployment records on opBNB — deployer address, factory context, and deployed bytecode. ## Table Description The `opbnb.creation_traces` table contains information about the creation of smart contracts on the opbnb blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the opbnb blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the opbnb blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM opbnb.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM opbnb.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM opbnb.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# opbnb.logs Source: https://docs.dune.com/data-catalog/evm/opbnb/raw/logs Smart contract event logs on opBNB — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `opbnb.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/opbnb/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM opbnb.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM opbnb.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM opbnb.logs
WHERE evt_block_number = 1000000`
# opbnb.traces Source: https://docs.dune.com/data-catalog/evm/opbnb/raw/traces Internal transaction traces on opBNB — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `opbnb.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/opbnb/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM opbnb.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# opbnb.transactions Source: https://docs.dune.com/data-catalog/evm/opbnb/raw/transactions Every transaction on opBNB — from, to, value, gas, calldata, and receipt status. ## Table Description The `opbnb.transactions` table contains information about all transactions on the opbnb blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the opbnb blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/opbnb/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=opbnb\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM opbnb.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM opbnb.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM opbnb.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on optimism Source: https://docs.dune.com/data-catalog/evm/optimism/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Optimism — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for optimism transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on optimism. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=optimism](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=optimism) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=optimism\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=optimism\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on optimism Source: https://docs.dune.com/data-catalog/evm/optimism/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on optimism. > [!NOTE] > > This is a cross-chain table but can be filtered for optimism transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on optimism. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=optimism](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=optimism) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=optimism\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=optimism\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on optimism Source: https://docs.dune.com/data-catalog/evm/optimism/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on optimism. > [!NOTE] > > This is a cross-chain table but can be filtered for optimism transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on optimism. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=optimism](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=optimism) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=optimism\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=optimism\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Optimism Call Tables Source: https://docs.dune.com/data-catalog/evm/optimism/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Optimism network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # optimism.contracts Source: https://docs.dune.com/data-catalog/evm/optimism/decoded/contracts Verified contract registry on Optimism — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the optimism blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/optimism/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # optimism.logs_decoded Source: https://docs.dune.com/data-catalog/evm/optimism/decoded/logs-decoded ABI-decoded event logs on Optimism — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from optimism transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On optimism, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/optimism/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **optimism.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=logs_decoded) # Optimism Decoded Overview Source: https://docs.dune.com/data-catalog/evm/optimism/decoded/overview Simplifying Optimism smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/optimism/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/optimism/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/optimism/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # ethereum.traces_decoded Source: https://docs.dune.com/data-catalog/evm/optimism/decoded/traces-decoded ABI-decoded function calls on Ethereum — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from optimism transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/optimism/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=traces_decoded) # Optimism Overview Source: https://docs.dune.com/data-catalog/evm/optimism/overview Optimism data on Dune Optimism is a Layer 2 scaling solution for Ethereum that utilizes Optimistic Rollups to drastically improve transaction throughput while reducing costs. Optimism is designed to be fully compatible with Ethereum, allowing developers to deploy existing Ethereum applications without significant modifications. Optimism operates under the principle of "optimistic execution," where transactions are assumed to be valid by default and only fully verified if a challenge is raised. This method greatly accelerates transaction processing times and lowers gas fees. **Scalability and Cost-Efficiency:** Optimism enhances Ethereum’s scalability by handling transactions off-chain while maintaining the security and decentralization of the main Ethereum network. It reduces the overall transaction costs, making it more accessible for users and developers. **Ethereum Compatibility:** Being fully compatible with Ethereum, Optimism allows for seamless migration of dApps and smart contracts, utilizing the same tools and programming languages used on Ethereum. **Community-Driven Governance:** Optimism actively supports a community-driven approach to its governance and development, promoting a decentralized and inclusive platform ecosystem. > [card] [Optimism documentation](https://community.optimism.io/docs/) > > Access the official documentation for Optimism, providing detailed information on its technology, architecture, and how to build on the platform. ## Data Catalog > [card] [Logs](./raw/logs) > > Event logs from smart contracts, providing insights into contract interactions and the dynamic activity on Optimism. > [card] [Blocks](./raw/blocks) > > Information on blocks processed, reflecting the enhanced throughput and capacity of the Optimism network. > [card] [Transactions](./raw/transactions) > > Detailed information on transactions, highlighting the operational efficiency and reduced costs facilitated by Optimistic Rollups. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and understanding of contract executions on the Optimism network. # optimism.blocks Source: https://docs.dune.com/data-catalog/evm/optimism/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Optimism. ## Table description The `optimism.blocks` table contains information about blocks in the optimism blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM optimism.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM optimism.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM optimism.blocks
  GROUP BY 1 
  LIMIT 10`
# optimism.creation_traces Source: https://docs.dune.com/data-catalog/evm/optimism/raw/creation-traces Contract deployment records on Optimism — deployer address, factory context, and deployed bytecode. ## Table Description The `optimism.creation_traces` table contains information about the creation of smart contracts on the optimism blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the optimism blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the optimism blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM optimism.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM optimism.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM optimism.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# optimism.logs Source: https://docs.dune.com/data-catalog/evm/optimism/raw/logs Smart contract event logs on Optimism — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `optimism.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/optimism/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM optimism.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM optimism.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM optimism.logs
WHERE evt_block_number = 1000000`
# optimism.traces Source: https://docs.dune.com/data-catalog/evm/optimism/raw/traces Internal transaction traces on Optimism — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `optimism.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/optimism/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM optimism.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# optimism.transactions Source: https://docs.dune.com/data-catalog/evm/optimism/raw/transactions Every transaction on Optimism — from, to, value, gas, calldata, and receipt status. ## Table Description The `optimism.transactions` table contains information about all transactions on the optimism blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the optimism blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/optimism/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=optimism\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM optimism.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM optimism.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM optimism.transactions
ORDER BY gas_price DESC
LIMIT 10`
# EVM Overview Source: https://docs.dune.com/data-catalog/evm/overview EVM chains on Dune ## Introduction to EVM Chains The Ethereum Virtual Machine (EVM) is the runtime environment for smart contracts in Ethereum. It's not only the cornerstone of Ethereum but also serves as a standard for decentralized applications across various blockchain networks. Due to its robustness and developer-friendly attributes, numerous blockchains have adopted the EVM framework, enabling them to leverage Ethereum's thriving ecosystem and interoperability. ### EVM Chains We provide the most comprehensive data catalog for Ethereum Mainnet and EVM-compatible rollups, sidechains and other layer 2 solutions. All EVM chains on Dune have raw data, decoded data and curated data tables available. e.g. here are the available data sets for Ethereum Mainnet: > [card] [Raw data](./ethereum/raw/transactions) > [card] [Decoded data](./ethereum/decoded/overview) > [card] [Curated data](/data-catalog/curated/overview) [https://dune.com/embeds/3695907/6218008](https://dune.com/embeds/3695907/6218008) # dex.trades on peaq Source: https://docs.dune.com/data-catalog/evm/peaq-evm/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on peaq. > [!NOTE] > > This is a cross-chain table but can be filtered for peaq transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on peaq. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=peaq](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=peaq) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=peaq\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=peaq\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Peaq EVM Call Tables Source: https://docs.dune.com/data-catalog/evm/peaq-evm/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the peaq network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # peaq.contracts Source: https://docs.dune.com/data-catalog/evm/peaq-evm/decoded/contracts Verified contract registry on Peaq — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the peaq blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/peaq-evm/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # peaq.logs_decoded Source: https://docs.dune.com/data-catalog/evm/peaq-evm/decoded/logs-decoded ABI-decoded event logs on Peaq — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from peaq transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/peaq/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on peaq?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for peaq on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=logs_decoded) # Peaq Decoded Overview Source: https://docs.dune.com/data-catalog/evm/peaq-evm/decoded/overview Simplifying peaq smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/peaq/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/peaq/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/peaq/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # peaq.traces_decoded Source: https://docs.dune.com/data-catalog/evm/peaq-evm/decoded/traces-decoded ABI-decoded function calls on Peaq — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from peaq transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/peaq/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=traces_decoded) # Peaq EVM Overview Source: https://docs.dune.com/data-catalog/evm/peaq-evm/overview Peaq EVM data on Dune ## What is Peaq? Peaq EVM is the EVM chain of the layer-1 blockchain purpose-built PEAQ and optimized to power the Machine Economy. The platform enables decentralized physical infrastructure networks (DePINs), decentralized physical AI (DePAI), Machine DeFi, and Machine RWAs (Real-World Assets). By leveraging parallelized block production, asynchronous backing, and agile core time, peaq currently handles up to 10,000 transactions per second (TPS). It is set to scale beyond 100,000 TPS after future upgrades, all while maintaining a minimum transaction cost of approximately \$0.00025. ## Key Features and Advantages ### Machine Economy Focus Peaq is purpose-built for the Machine Economy, supporting: * **DePINs (Decentralized Physical Infrastructure Networks)**: Networks that incentivize people to deploy hardware for real-world services * **DePAI (Decentralized Physical AI)**: Decentralized AI systems that interact with physical infrastructure * **Machine DeFi**: Decentralized Finance based on machines' on-chain economic value and activity * **Machine RWAs**: Tokenized machines bringing real-world economic value on-chain ### High Performance & Scalability * **Current Throughput**: Up to 10,000 transactions per second (TPS) * **Future Scalability**: Set to scale beyond 100,000 TPS after future upgrades * **Low Transaction Costs**: Minimum transaction cost of approximately \$0.00025 * **Parallelized Block Production**: Enables high throughput and efficiency * **Asynchronous Backing**: Advanced consensus mechanism for performance ### Security & Decentralization * **Environmentally-Friendly Architecture**: Leverages the world's environmentally-friendliest blockchain architecture * **High Nakamoto Coefficient**: One of the highest Nakamoto Coefficients in the industry to ensure censorship resistance * **EVM Compatibility**: Full EVM compatibility for familiar development tools ### Modular DePIN and DePAI Functions Peaq offers a comprehensive suite of ready-to-use Modular DePIN and DePAI Functions, granting builders and machines essential core functionalities: * **Self-Sovereign Machine IDs**: Unique identity for machines on-chain * **Role-Based Access Control**: Secure permission management * **Data Verification**: Ensure data integrity and authenticity * **Universal Machine Time**: Synchronized time across the network * **Seamless Machine Payment Processing**: Built-in payment infrastructure * **Data Storage**: On-chain and off-chain storage solutions * **Data Indexing**: Efficient data retrieval and querying * **AI Agents**: AI-powered automation and decision-making All functions are accessible via the Peaq SDK, allowing developers to deploy them with just \~15 lines of code. ### Network Specifications * **Technology Stack**: EVM-compatible Layer 1 * **Network Type**: EVM-compatible blockchain * **Consensus**: Asynchronous backing with parallelized block production * **Transaction Speed**: Up to 10,000 TPS (scaling to 100,000+ TPS) * **Transaction Cost**: Minimum \~\$0.00025 per transaction ### Developer Tools & Infrastructure * **Full EVM Compatibility**: Support for standard Ethereum development tools * **Peaq SDK**: Comprehensive SDK for deploying DePIN and DePAI functions * **Modular Functions**: Ready-to-use functions for machine economy applications * **Smart Contract Development**: Standard Solidity development support * **Infrastructure**: * Machine identity management * Data verification systems * Payment processing * Storage solutions * AI agent integration > [card] [Peaq Documentation](https://docs.peaq.xyz/build/introduction) > > Official documentation for developers building on Peaq ## Data Catalog > [card] [Logs](/data-catalog/evm/peaq-evm/raw/logs) > > Insights into smart contract interactions through event logs > [card] [Blocks](/data-catalog/evm/peaq-evm/raw/blocks) > > Information on blocks processed on Peaq EVM > [card] [Transactions](/data-catalog/evm/peaq-evm/raw/transactions) > > Detailed data on transactions > [card] [Decoded](/data-catalog/evm/peaq-evm/decoded/overview) > > Decoded transaction information for enhanced analysis # peaq.evm_blocks Source: https://docs.dune.com/data-catalog/evm/peaq-evm/raw/blocks Peaq EVM-compatible block data. ## Table description The `peaq.blocks` table contains information about blocks in the peaq blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM peaq.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM peaq.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM peaq.blocks
  GROUP BY 1 
  LIMIT 10`
# peaq.creation_traces Source: https://docs.dune.com/data-catalog/evm/peaq-evm/raw/creation-traces Contract deployment records on Peaq — deployer address, factory context, and deployed bytecode. ## Table Description The `peaq.creation_traces` table contains information about the creation of smart contracts on the peaq blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the peaq blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the peaq blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM peaq.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM peaq.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM peaq.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# peaq.logs Source: https://docs.dune.com/data-catalog/evm/peaq-evm/raw/logs Smart contract event logs on Peaq — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `peaq.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/peaq/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM peaq.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM peaq.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM peaq.logs
WHERE evt_block_number = 1000000`
# peaq.traces Source: https://docs.dune.com/data-catalog/evm/peaq-evm/raw/traces Internal transaction traces on Peaq — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `peaq.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/peaq/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM peaq.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# peaq.transactions Source: https://docs.dune.com/data-catalog/evm/peaq-evm/raw/transactions Every transaction on Peaq — from, to, value, gas, calldata, and receipt status. ## Table Description The `peaq.transactions` table contains information about all transactions on the peaq blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the peaq blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/peaq/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM peaq.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM peaq.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM peaq.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on plasma Source: https://docs.dune.com/data-catalog/evm/plasma/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on plasma. > [!NOTE] > > This is a cross-chain table but can be filtered for plasma transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on plasma. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=plasma](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=plasma) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=plasma\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=plasma\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Plasma Call Tables Source: https://docs.dune.com/data-catalog/evm/plasma/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Plasma network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # plasma.contracts Source: https://docs.dune.com/data-catalog/evm/plasma/decoded/contracts Verified contract registry on Plasma — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the plasma blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=contracts) # plasma.event_logs Source: https://docs.dune.com/data-catalog/evm/plasma/decoded/event-logs Smart contract event logs on Plasma — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # plasma.logs_decoded Source: https://docs.dune.com/data-catalog/evm/plasma/decoded/logs-decoded ABI-decoded event logs on Plasma — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from plasma transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On plasma, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/plasma/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **plasma.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=logs_decoded) # Plasma Decoded Overview Source: https://docs.dune.com/data-catalog/evm/plasma/decoded/overview Simplifying Plasma smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/plasma/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/plasma/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/plasma/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # plasma.traces_decoded Source: https://docs.dune.com/data-catalog/evm/plasma/decoded/traces-decoded ABI-decoded function calls on Plasma — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from plasma transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/plasma/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=traces_decoded) # Plasma Overview Source: https://docs.dune.com/data-catalog/evm/plasma/overview Plasma data on Dune ## What is Plasma? Plasma is a stablecoin-native blockchain designed specifically for building stablecoin applications. It provides a secure, scalable platform that enables zero-fee USD₮ transfers and supports custom gas tokens, making it ideal for payment applications and stablecoin-focused DeFi protocols. ## Key Features * **Stablecoin-Native**: Purpose-built for stablecoin applications and payments * **Zero-Fee USD₮ Transfers**: Native support for fee-free USDT transactions * **Custom Gas Tokens**: Flexibility to use different tokens for gas payments * **Confidential Payments**: Privacy-preserving transaction capabilities * **Account Abstraction**: Advanced account management features * **Bitcoin Bridge**: Native integration with Bitcoin network ## Architecture Plasma features a unique architecture optimized for stablecoin operations: * **Consensus**: Robust consensus mechanism for network security * **Execution**: Optimized execution layer for stablecoin transactions * **Bitcoin Bridge**: Secure cross-chain connectivity with Bitcoin * **System Overview**: Comprehensive infrastructure for payment applications ## Ecosystem Highlights * Advanced stablecoin-native smart contracts * Zero-fee transfer capabilities for USD₮ * Support for confidential payment protocols * Comprehensive tooling and infrastructure including: * Block explorers and analytics * Cross-chain bridges * RPC providers and indexers * Oracles and account abstraction tools * Testnet faucets for XPL tokens ## Data on Dune > [card] [Raw Data](/data-catalog/evm/plasma/raw/blocks) > > Access to raw blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/evm/plasma/decoded/overview) > > Human-readable contract interactions and events ## Resources > [card] [Plasma Documentation](http://docs.plasma.to/docs/plasma-chain/introduction/start-here) > > Official documentation for developers building on Plasma # plasma.blocks Source: https://docs.dune.com/data-catalog/evm/plasma/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Plasma. ## Table description The `plasma.blocks` table contains information about blocks in the plasma blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM plasma.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM plasma.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM plasma.blocks
  GROUP BY 1 
  LIMIT 10`
# plasma.creation_traces Source: https://docs.dune.com/data-catalog/evm/plasma/raw/creation-traces Contract deployment records on Plasma — deployer address, factory context, and deployed bytecode. ## Table Description The `plasma.creation_traces` table contains information about the creation of smart contracts on the plasma blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the plasma blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the plasma blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM plasma.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM plasma.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM plasma.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# plasma.logs Source: https://docs.dune.com/data-catalog/evm/plasma/raw/logs Smart contract event logs on Plasma — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `plasma.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/plasma/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM plasma.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM plasma.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM plasma.logs
WHERE evt_block_number = 1000000`
# plasma.traces Source: https://docs.dune.com/data-catalog/evm/plasma/raw/traces Internal transaction traces on Plasma — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `plasma.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/plasma/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM plasma.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# plasma.transactions Source: https://docs.dune.com/data-catalog/evm/plasma/raw/transactions Every transaction on Plasma — from, to, value, gas, calldata, and receipt status. ## Table Description The `plasma.transactions` table contains information about all transactions on the plasma blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the plasma blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/plasma/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plasma\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM plasma.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM plasma.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM plasma.transactions
ORDER BY gas_price DESC
LIMIT 10`
# plume.dex_aggregator_trades Source: https://docs.dune.com/data-catalog/evm/plume/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Plume — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for plume transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on plume. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=plume](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=plume) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=plume\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=plume\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # plume.dex_trades Source: https://docs.dune.com/data-catalog/evm/plume/curated-data/dex/dex-trades DEX trade data on Plume — swaps across Uniswap, SushiSwap, and other decentralized exchanges with token amounts and USD pricing. > [!NOTE] > > This is a cross-chain table but can be filtered for plume transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on plume. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=plume](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=plume) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=plume\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=plume\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # plume.contracts Source: https://docs.dune.com/data-catalog/evm/plume/decoded/contracts Verified contract registry on Plume — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the plume blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=contracts) # plume.event_logs Source: https://docs.dune.com/data-catalog/evm/plume/decoded/event-logs Smart contract event logs on Plume — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # plume.logs_decoded Source: https://docs.dune.com/data-catalog/evm/plume/decoded/logs-decoded ABI-decoded event logs on Plume — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from plume transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/plume/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on plume?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for plume on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=logs_decoded) # Plume Decoded Overview Source: https://docs.dune.com/data-catalog/evm/plume/decoded/overview Simplifying Plume smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/plume/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/plume/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/plume/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # plume.traces_decoded Source: https://docs.dune.com/data-catalog/evm/plume/decoded/traces-decoded ABI-decoded function calls on Plume — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from plume transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/plume/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=traces_decoded) # Plume Overview Source: https://docs.dune.com/data-catalog/evm/plume/overview Plume data on Dune ## What is Plume? Plume is a public, EVM-compatible blockchain specifically designed for Real World Assets (RWAs). It serves as the onchain home for real-world assets, enabling them to be used like crypto-native assets through features like staking, swapping, lending, borrowing, and looping. ## Key Features * **RWA-Focused**: Built specifically for the next evolution of Real World Assets * **EVM-Compatible**: Seamless integration with existing Ethereum tools and infrastructure * **Institutional Integration**: Designed to work with major institutions and asset managers * **Composability**: RWAs can be used across the DeFi stack for yield stacking, leverage, and structured products ## Ecosystem Highlights * Over 200 protocols onboarded and growing * Testnet success with 18 million wallets and 280 million transactions * Partnerships with major institutions and asset managers * Support for various asset types including: * Private credit * ETFs * Commodities * Esoteric assets (GPUs, uranium, mineral rights, etc.) ## Data on Dune > [card] [Raw Data](/data-catalog/evm/plume/raw/blocks) > > Access to raw blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/evm/plume/decoded/overview) > > Human-readable contract interactions and events > [card] [DEX Data](/data-catalog/evm/plume/curated-data/dex/dex-trades) > > Track DEX trading activity and aggregator trades ## Resources > [card] [Plume Documentation](https://docs.plume.org/plume) > > Official documentation for developers building on Plume # plume.blocks Source: https://docs.dune.com/data-catalog/evm/plume/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Plume. ## Table description The `plume.blocks` table contains information about blocks in the plume blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM plume.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM plume.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM plume.blocks
  GROUP BY 1 
  LIMIT 10`
# plume.creation_traces Source: https://docs.dune.com/data-catalog/evm/plume/raw/creation-traces Contract deployment records on Plume — deployer address, factory context, and deployed bytecode. ## Table Description The `plume.creation_traces` table contains information about the creation of smart contracts on the plume blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the plume blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the plume blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM plume.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM plume.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM plume.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# plume.logs Source: https://docs.dune.com/data-catalog/evm/plume/raw/logs Smart contract event logs on Plume — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `plume.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/plume/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM plume.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM plume.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM plume.logs
WHERE evt_block_number = 1000000`
# plume.traces Source: https://docs.dune.com/data-catalog/evm/plume/raw/traces Internal transaction traces on Plume — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `plume.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/plume/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM plume.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# plume.transactions Source: https://docs.dune.com/data-catalog/evm/plume/raw/transactions Every transaction on Plume — from, to, value, gas, calldata, and receipt status. ## Table Description The `plume.transactions` table contains information about all transactions on the plume blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the plume blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/plume/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=plume\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM plume.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM plume.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM plume.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on Polygon zkEVM Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Polygon zkEVM — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for zkevm transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on zkevm. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=zkevm](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=zkevm) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zkevm\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zkevm\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on Polygon zkEVM Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on Polygon zkEVM. > [!NOTE] > > This is a cross-chain table but can be filtered for zkevm transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on zkevm. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=zkevm](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=zkevm) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zkevm\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zkevm\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on Polygon zkEVM Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on Polygon zkEVM. > [!NOTE] > > This is a cross-chain table but can be filtered for zkevm transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on zkevm. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=zkevm](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=zkevm) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zkevm\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zkevm\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Polygon zkEVM Call Tables Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Polygon zkEVM network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # zkevm.contracts Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/decoded/contracts Verified contract registry on Polygon zkEVM — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the zkevm blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # zkevm.logs_decoded Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/decoded/logs-decoded ABI-decoded event logs on Polygon zkEVM — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from zkevm transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/zkevm/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on zkevm?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for zkevm on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=logs_decoded) # Polygon zkEVM Decoded Overview Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/decoded/overview Simplifying Polygon zkEVM smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/zkevm/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/zkevm/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/zkevm/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # zkevm.traces_decoded Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/decoded/traces-decoded ABI-decoded function calls on Polygon zkEVM — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from zkevm transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/zkevm/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=traces_decoded) # Polygon zkEVM Overview Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/overview Polygon zkEVM data on Dune Polygon zkEVM is a Layer 2 scaling solution for Ethereum that leverages zero-knowledge proofs to ensure scalability. It is designed to be Ethereum Virtual Machine (EVM)-compatible, enabling developers to deploy existing Solidity smart contracts without modifications. The core feature of Polygon zkEVM is its use of zk-SNARKs (zero-knowledge Succinct Non-Interactive Arguments of Knowledge) to bundle hundreds of transactions into a single proof, verifying them on the Ethereum mainnet. This process enhances throughput, reduces transaction costs, and maintains the robust security guarantees of Ethereum. The native utility token for Polygon zkEVM is Ether, used primarily for transaction fees. Unlike Layer1 blockchains, Polygon zkEVM aims to provide a seamless scaling solution that inherits Ethereum's security and decentralization features while significantly improving performance and cost-efficiency. Dune offers comprehensive datasets for Polygon zkEVM, including event logs, transactions, blocks, and token activities. These datasets enable deep insights into the network's performance, usage patterns, and smart contract interactions. > [card] [Polygon zkEVM docs](https://polygon.technology/polygon-zkevm) > > The official documentation for Polygon zkEVM, providing detailed information on the protocol, architecture, and developer resources ## Data Catalog > [card] [Logs](./raw/logs) > > Event logs from smart contracts, providing insights into contract interactions > [card] [Blocks](./raw/blocks) > > Information and statistics on blocks, showcasing the network's activity and throughput > [card] [Transactions](./raw/transactions) > > Detailed transaction data, highlighting the execution and efficiency of operations > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier understanding and analysis of smart contract executions # zkevm.blocks Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Polygon zkEVM. ## Table description The `zkevm.blocks` table contains information about blocks in the zkevm blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM zkevm.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM zkevm.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM zkevm.blocks
  GROUP BY 1 
  LIMIT 10`
# zkevm.creation_traces Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/raw/creation-traces Contract deployment records on Polygon zkEVM — deployer address, factory context, and deployed bytecode. ## Table Description The `zkevm.creation_traces` table contains information about the creation of smart contracts on the zkevm blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the zkevm blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the zkevm blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM zkevm.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM zkevm.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM zkevm.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# zkevm.logs Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/raw/logs Smart contract event logs on Polygon zkEVM — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `zkevm.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/zkevm/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM zkevm.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM zkevm.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM zkevm.logs
WHERE evt_block_number = 1000000`
# zkevm.traces Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/raw/traces Internal transaction traces on Polygon zkEVM — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `zkevm.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/zkevm/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM zkevm.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# zkevm.transactions Source: https://docs.dune.com/data-catalog/evm/polygon-zkEVM/raw/transactions Every transaction on Polygon zkEVM — from, to, value, gas, calldata, and receipt status. ## Table Description The `zkevm.transactions` table contains information about all transactions on the zkevm blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the zkevm blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/zkevm/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zkevm\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM zkevm.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM zkevm.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM zkevm.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on polygon Source: https://docs.dune.com/data-catalog/evm/polygon/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Polygon — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for polygon transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on polygon. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=polygon](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=polygon) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=polygon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=polygon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on polygon Source: https://docs.dune.com/data-catalog/evm/polygon/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on polygon. > [!NOTE] > > This is a cross-chain table but can be filtered for polygon transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on polygon. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=polygon](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=polygon) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=polygon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=polygon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on polygon Source: https://docs.dune.com/data-catalog/evm/polygon/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on polygon. > [!NOTE] > > This is a cross-chain table but can be filtered for polygon transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on polygon. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=polygon](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=polygon) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=polygon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=polygon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Polygon PoS Network Call Tables Source: https://docs.dune.com/data-catalog/evm/polygon/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Polygon PoS Network network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # polygon.contracts Source: https://docs.dune.com/data-catalog/evm/polygon/decoded/contracts Verified contract registry on Polygon — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the polygon blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/polygon/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # polygon.logs_decoded Source: https://docs.dune.com/data-catalog/evm/polygon/decoded/logs-decoded ABI-decoded event logs on Polygon — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from polygon transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/polygon/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on polygon?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for polygon on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=logs_decoded) # Polygon PoS Network Decoded Overview Source: https://docs.dune.com/data-catalog/evm/polygon/decoded/overview Simplifying Polygon PoS Network smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/polygon/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/polygon/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/polygon/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # polygon.traces_decoded Source: https://docs.dune.com/data-catalog/evm/polygon/decoded/traces-decoded ABI-decoded function calls on Polygon — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from polygon transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/polygon/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=traces_decoded) # Polygon PoS Network Overview Source: https://docs.dune.com/data-catalog/evm/polygon/overview Polygon PoS Network data on Dune Polygon PoS is a proof-of-stake blockchain network that serves as a scaling solution for Ethereum. It combines the security and interoperability of Ethereum with the speed and efficiency of standalone networks, facilitating faster and cheaper transactions. Polygon PoS leverages a network of validators who stake their tokens to secure the network, participate in consensus, and manage governance. **High Performance and Low Transaction Costs:** Polygon PoS offers significant improvements in speed and transaction costs over Ethereum's mainnet by processing transactions on a sidechain before committing them to the Ethereum blockchain. This approach minimizes congestion and gas fees. **Ethereum Compatibility:** Fully compatible with Ethereum, Polygon PoS enables developers to deploy existing Ethereum applications without significant changes, using familiar tools and frameworks. **Decentralized and Secure:** The proof-of-stake model ensures that the network remains decentralized and secure, with validators and delegators actively participating in the consensus and governance processes. > [card] [Polygon PoS documentation](https://docs.polygon.technology/docs/home) > > Comprehensive documentation on the Polygon PoS network, including guides on its architecture, staking mechanisms, and development resources. ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through detailed event logs, providing visibility into the dynamic activity on the Polygon PoS network. > [card] [Blocks](./raw/blocks) > > Information on blocks processed on the Polygon PoS network, reflecting the network’s high throughput and capacity for handling large volumes of transactions. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, highlighting the operational efficiency and reduced costs facilitated by the PoS mechanism. > [card] [decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis and understanding of smart contract executions on the Polygon PoS network. # polygon.blocks Source: https://docs.dune.com/data-catalog/evm/polygon/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Polygon. ## Table description The `polygon.blocks` table contains information about blocks in the polygon blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM polygon.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM polygon.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM polygon.blocks
  GROUP BY 1 
  LIMIT 10`
# polygon.creation_traces Source: https://docs.dune.com/data-catalog/evm/polygon/raw/creation-traces Contract deployment records on Polygon — deployer address, factory context, and deployed bytecode. ## Table Description The `polygon.creation_traces` table contains information about the creation of smart contracts on the polygon blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the polygon blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the polygon blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM polygon.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM polygon.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM polygon.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# polygon.logs Source: https://docs.dune.com/data-catalog/evm/polygon/raw/logs Smart contract event logs on Polygon — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `polygon.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/polygon/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM polygon.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM polygon.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM polygon.logs
WHERE evt_block_number = 1000000`
# polygon.traces Source: https://docs.dune.com/data-catalog/evm/polygon/raw/traces Internal transaction traces on Polygon — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `polygon.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/polygon/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM polygon.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# polygon.transactions Source: https://docs.dune.com/data-catalog/evm/polygon/raw/transactions Every transaction on Polygon — from, to, value, gas, calldata, and receipt status. ## Table Description The `polygon.transactions` table contains information about all transactions on the polygon blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the polygon blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/polygon/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polygon\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM polygon.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM polygon.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM polygon.transactions
ORDER BY gas_price DESC
LIMIT 10`
# RISE Call Tables Source: https://docs.dune.com/data-catalog/evm/rise/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the RISE network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # rise.contracts Source: https://docs.dune.com/data-catalog/evm/rise/decoded/contracts Verified contract registry on RISE — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the rise blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=contracts) # Event Logs - RISE Source: https://docs.dune.com/data-catalog/evm/rise/decoded/event-logs Smart contracts on RISE emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # rise.logs_decoded Source: https://docs.dune.com/data-catalog/evm/rise/decoded/logs-decoded ABI-decoded event logs on RISE — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from rise transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/rise/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on rise?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for rise on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=logs_decoded) # RISE Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/rise/decoded/overview Simplifying RISE Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/rise/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/rise/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/rise/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # rise.traces_decoded Source: https://docs.dune.com/data-catalog/evm/rise/decoded/traces-decoded ABI-decoded function calls on RISE — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from rise transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/rise/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=traces_decoded) # RISE Chain Overview Source: https://docs.dune.com/data-catalog/evm/rise/overview RISE blockchain data on Dune ## What is RISE? RISE is a high-performance Ethereum Layer 2 designed for onchain markets, delivering near-instant transactions at scale with full EVM compatibility. The chain advertises 1ms latency, 50,000+ TPS, and 5 Ggas/s of compute throughput, while remaining secured by Ethereum. RISE pairs a low-latency execution environment with native orderbook infrastructure (RISE MarketCore) and a perpetuals platform (RISEx) so trading and other latency-sensitive applications can share deep liquidity onchain. ## Key Features * **Sub-second blocks**: RISE produces a new block every \~1 second, enabling sub-second user-perceivable finality and very tight feedback loops for trading applications. * **EVM compatibility**: Standard Solidity tooling (Foundry, Hardhat, etc.) works without modification — contracts deploy as on any EVM chain. * **High throughput**: Architecture targets >50K TPS and 5 Ggas/s, well above mainstream rollups, intended for orderbook-style applications that demand many small writes per second. * **Native market infrastructure**: RISE MarketCore exposes a shared orderbook substrate so any application can permissionlessly launch onchain spot or perpetual markets backed by network-wide liquidity. * **Modular DA**: RISE leverages a modular data availability layer (Celestia / EigenDA) with Ethereum fallbacks for security, allowing high throughput without Ethereum L1 calldata cost. ## EVM Specifics on Dune * **Native gas token**: ETH (gas paid in ETH like other Ethereum L2s). * **Block time**: \~1 second average (verified against `rise.blocks` time deltas). * **TIP-20**: RISE indexes a TIP-20 token-event family alongside ERC-20 — `tip20_rise.evt_*` tables surface RISE-specific token primitives (memo transfers, reward distribution, supply caps, transfer policies). Standard ERC-20 events live under `erc20_rise.evt_*`. ## Data on Dune > [card] [Raw Data](/data-catalog/evm/rise/raw/blocks) > > Block, transaction, log, and trace data indexed directly from RISE nodes. > [card] [Decoded Data](/data-catalog/evm/rise/decoded/overview) > > ABI-decoded contract interactions and events including the native RISEx perps stack. ## Resources > [card] [RISE Chain](https://risechain.com/) > > Project home page. > [card] [RISE Documentation](https://docs.risechain.com/) > > Architecture, tooling, and developer guides. # rise.blocks Source: https://docs.dune.com/data-catalog/evm/rise/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for RISE. ## Table description The `rise.blocks` table contains information about blocks in the rise blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM rise.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM rise.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM rise.blocks
  GROUP BY 1 
  LIMIT 10`
# rise.creation_traces Source: https://docs.dune.com/data-catalog/evm/rise/raw/creation-traces Contract deployment records on RISE — deployer address, factory context, and deployed bytecode. ## Table Description The `rise.creation_traces` table contains information about the creation of smart contracts on the rise blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the rise blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the rise blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM rise.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM rise.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM rise.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# rise.logs Source: https://docs.dune.com/data-catalog/evm/rise/raw/logs Smart contract event logs on RISE — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `rise.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/rise/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM rise.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM rise.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM rise.logs
WHERE evt_block_number = 1000000`
# rise.traces Source: https://docs.dune.com/data-catalog/evm/rise/raw/traces Internal transaction traces on RISE — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `rise.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/rise/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM rise.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# rise.transactions Source: https://docs.dune.com/data-catalog/evm/rise/raw/transactions Every transaction on RISE — from, to, value, gas, calldata, and receipt status. ## Table Description The `rise.transactions` table contains information about all transactions on the rise blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the rise blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/rise/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=rise\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM rise.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM rise.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM rise.transactions
ORDER BY gas_price DESC
LIMIT 10`
# Robinhood Call Tables Source: https://docs.dune.com/data-catalog/evm/robinhood/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Robinhood network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # robinhood.contracts Source: https://docs.dune.com/data-catalog/evm/robinhood/decoded/contracts Verified contract registry on Robinhood — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the robinhood blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=contracts) # Event Logs - Robinhood Source: https://docs.dune.com/data-catalog/evm/robinhood/decoded/event-logs Smart contracts on Robinhood emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # robinhood.logs_decoded Source: https://docs.dune.com/data-catalog/evm/robinhood/decoded/logs-decoded ABI-decoded event logs on Robinhood — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from robinhood transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/robinhood/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on robinhood?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for robinhood on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=logs_decoded) # Robinhood Decoded Overview Source: https://docs.dune.com/data-catalog/evm/robinhood/decoded/overview Simplifying Robinhood Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/robinhood/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/robinhood/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/robinhood/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # robinhood.traces_decoded Source: https://docs.dune.com/data-catalog/evm/robinhood/decoded/traces-decoded ABI-decoded function calls on Robinhood — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from robinhood transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/robinhood/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=traces_decoded) # Robinhood Chain Overview Source: https://docs.dune.com/data-catalog/evm/robinhood/overview Robinhood Chain blockchain data on Dune ## What is Robinhood Chain? Robinhood Chain is an EVM-compatible blockchain built by Robinhood to support onchain trading, tokenized assets, and related financial applications. Dune indexes Robinhood Chain under the `robinhood` schema namespace with standard EVM raw tables and ABI-decoded contract data. ## Key Features * **EVM compatibility**: Standard Solidity contracts and familiar EVM tooling apply — raw tables follow the same schema conventions as other EVM chains on Dune. * **Tokenized assets**: Decoded ERC-20 and ERC-721 event tables (`erc20_robinhood.evt_*`, `erc721_robinhood.evt_*`) surface token transfers and NFT activity on the chain. * **Contract decoding**: Per-project decoded tables follow the `{project}_robinhood.{contract}_evt_{Event}` namespace pattern (for example `robinhood_arbitrum.*` for Robinhood Arbitrum-stack contracts). ## EVM Specifics on Dune * **Schema namespace**: `robinhood` (query as `robinhood.blocks`, `robinhood.transactions`, etc.). * **Raw tables**: `blocks`, `transactions`, `logs`, `traces`, `creation_traces`. * **Decoded infrastructure**: `robinhood.contracts`, `robinhood.signatures`, `robinhood.logs_decoded`, `robinhood.traces_decoded`. * **Standard token events**: `erc20_robinhood.evt_*`, `erc721_robinhood.evt_*`. ## Data on Dune > [card] [Raw Data](/data-catalog/evm/robinhood/raw/blocks) > > Block, transaction, log, and trace data indexed from Robinhood Chain nodes. > [card] [Decoded Data](/data-catalog/evm/robinhood/decoded/overview) > > ABI-decoded contract interactions and events, including ERC-20/721 token activity. ## Resources > [card] [Robinhood](https://robinhood.com/) > > Robinhood product home page. # robinhood.blocks Source: https://docs.dune.com/data-catalog/evm/robinhood/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Robinhood. ## Table description The `robinhood.blocks` table contains information about blocks in the robinhood blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM robinhood.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM robinhood.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM robinhood.blocks
  GROUP BY 1 
  LIMIT 10`
# robinhood.creation_traces Source: https://docs.dune.com/data-catalog/evm/robinhood/raw/creation-traces Contract deployment records on Robinhood — deployer address, factory context, and deployed bytecode. ## Table Description The `robinhood.creation_traces` table contains information about the creation of smart contracts on the robinhood blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the robinhood blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the robinhood blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM robinhood.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM robinhood.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM robinhood.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# robinhood.logs Source: https://docs.dune.com/data-catalog/evm/robinhood/raw/logs Smart contract event logs on Robinhood — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `robinhood.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/robinhood/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM robinhood.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM robinhood.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM robinhood.logs
WHERE evt_block_number = 1000000`
# robinhood.traces Source: https://docs.dune.com/data-catalog/evm/robinhood/raw/traces Internal transaction traces on Robinhood — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `robinhood.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/robinhood/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM robinhood.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# robinhood.transactions Source: https://docs.dune.com/data-catalog/evm/robinhood/raw/transactions Every transaction on Robinhood — from, to, value, gas, calldata, and receipt status. ## Table Description The `robinhood.transactions` table contains information about all transactions on the robinhood blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the robinhood blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/robinhood/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=robinhood\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM robinhood.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM robinhood.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM robinhood.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on ronin Source: https://docs.dune.com/data-catalog/evm/ronin/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on ronin. > [!NOTE] > > This is a cross-chain table but can be filtered for ronin transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on ronin. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=ronin](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=ronin) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ronin\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ronin\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on ronin Source: https://docs.dune.com/data-catalog/evm/ronin/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on ronin. > [!NOTE] > > This is a cross-chain table but can be filtered for ronin transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on ronin. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=ronin](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=ronin) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ronin\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=ronin\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Ronin Call Tables Source: https://docs.dune.com/data-catalog/evm/ronin/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Ronin network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # ronin.contracts Source: https://docs.dune.com/data-catalog/evm/ronin/decoded/contracts Verified contract registry on Ronin — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the ronin blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/ronin/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # ronin.logs_decoded Source: https://docs.dune.com/data-catalog/evm/ronin/decoded/logs-decoded ABI-decoded event logs on Ronin — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from ronin transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/ronin/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on ronin?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for ronin on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=logs_decoded) # Ronin Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/ronin/decoded/overview Simplifying Ronin Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/ronin/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/ronin/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ronin/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # ronin.traces_decoded Source: https://docs.dune.com/data-catalog/evm/ronin/decoded/traces-decoded ABI-decoded function calls on Ronin — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from ronin transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/ronin/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=traces_decoded) # Ronin Chain Overview Source: https://docs.dune.com/data-catalog/evm/ronin/overview Ronin blockchain data on Dune ## What is Ronin? Ronin is an EVM-based blockchain purpose-built for gaming, created by Sky Mavis, the team behind Axie Infinity. As one of the few blockchains capable of scaling a single game to millions of daily active users, Ronin powers the vibrant Axie Infinity ecosystem and has processed over \$4 billion in NFT volumes. With near-instant transactions and minimal fees, Ronin is optimized to support the high demand of Web3 gaming experiences. ## Key Features of Ronin Ronin’s infrastructure focuses on performance, scalability, and seamless user experience for in-game transactions, making it the top choice for Web3 games. ### **Scalability and Gaming Optimization** Ronin has demonstrated its ability to scale, processing 15% of the global NFT trading volume at its peak and handling millions of daily users in the Axie Infinity ecosystem. It prioritizes only high-quality applications and maintains high uptime, ensuring a spam-free, optimized gaming environment. ### **Low-Cost Transactions** With negligible transaction fees, Ronin makes it feasible for users to perform frequent in-game transactions, eliminating cost barriers for players and developers alike. ### **EVM Compatibility** As an EVM-compatible chain, Ronin allows developers familiar with Ethereum to migrate applications easily, benefiting from tools like Remix, Hardhat, and Foundry. ## Network Architecture Ronin’s architecture is designed to support high-performance gaming applications with an emphasis on minimal latency and cost-effectiveness. It also supports selective onboarding of apps, preserving quality across the ecosystem. * **Gaming-Focused Environment:** Allows only high-quality applications to join, reducing bloat and increasing uptime. * **Security Measures:** Incorporates advanced security measures following past challenges, including zero-trust architecture and rigorous internal security practices. ## Consensus Mechanism Ronin initially adopted a **Proof of Authority (PoA)** consensus, relying on a trusted validator set selected by Sky Mavis and the community. To increase decentralization, Ronin transitioned in 2023 to **Delegated Proof of Stake (DPoS)**, allowing any RON token holder to participate in validator selection, creating a more community-driven governance model. * **Block Production and Finality Voting:** Validators are selected to produce blocks and vote for finality, with weighted voting based on staked RON. * **Rotating Validators:** Introduced in July 2024, ensuring all validators have block production opportunities and receive rewards, fostering greater inclusivity. ## Security and Slashing Mechanism Ronin has implemented robust security measures, including slashing penalties for validators who act maliciously or are frequently unavailable. The credit score and bailout system enables validators to recover from unexpected downtime, while tiered penalties discourage continuous underperformance. * **Double Signing Penalties:** Validators involved in double-signing or publishing contradictory votes are permanently jailed and face RON slashing. * **Validator Credit Score:** A unique system allows validators to earn credits daily, which can be used to bail out of jail in case of unexpected downtime. ## Token Economy The native token, **RON**, is central to Ronin's economy, supporting validator incentives and governance: * **Staking and Rewards:** Validators and delegators earn rewards through block production and finality voting. * **Governance Participation:** Token holders can delegate stake to preferred validators, enhancing decentralization. > [card] [Ronin documentation](https://docs.roninchain.com/) > > Access comprehensive documentation for Ronin, covering details on its consensus mechanisms, security features, and how to build on the network. ## Data Catalog > [card] [Logs](./raw/logs) > > Access logs of in-game transactions and other activities on Ronin, providing insight into the chain’s high transaction volume. > [card] [Blocks](./raw/blocks) > > Information on block production and finality, illustrating Ronin's ability to handle gaming-scale operations. > [card] [Transactions](./raw/transactions) > > Transaction data with a focus on minimal fees, showing how Ronin enables smooth in-game interactions. > [card] [decoded](./decoded/overview) > > Decoded transaction data, making it easier to analyze in-game economies and smart contract interactions. # ronin.blocks Source: https://docs.dune.com/data-catalog/evm/ronin/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Ronin. ## Table description The `ronin.blocks` table contains information about blocks in the ronin blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM ronin.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM ronin.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM ronin.blocks
  GROUP BY 1 
  LIMIT 10`
# ronin.creation_traces Source: https://docs.dune.com/data-catalog/evm/ronin/raw/creation-traces Contract deployment records on Ronin — deployer address, factory context, and deployed bytecode. ## Table Description The `ronin.creation_traces` table contains information about the creation of smart contracts on the ronin blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the ronin blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the ronin blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM ronin.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM ronin.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM ronin.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# ronin.logs Source: https://docs.dune.com/data-catalog/evm/ronin/raw/logs Smart contract event logs on Ronin — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `ronin.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/ronin/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM ronin.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM ronin.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM ronin.logs
WHERE evt_block_number = 1000000`
# ronin.traces Source: https://docs.dune.com/data-catalog/evm/ronin/raw/traces Internal transaction traces on Ronin — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `ronin.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/ronin/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM ronin.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# ronin.transactions Source: https://docs.dune.com/data-catalog/evm/ronin/raw/transactions Every transaction on Ronin — from, to, value, gas, calldata, and receipt status. ## Table Description The `ronin.transactions` table contains information about all transactions on the ronin blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the ronin blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/ronin/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ronin\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM ronin.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM ronin.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM ronin.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on scroll Source: https://docs.dune.com/data-catalog/evm/scroll/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Scroll — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for scroll transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on scroll. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=scroll](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=scroll) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=scroll\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=scroll\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on scroll Source: https://docs.dune.com/data-catalog/evm/scroll/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on scroll. > [!NOTE] > > This is a cross-chain table but can be filtered for scroll transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on scroll. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=scroll](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=scroll) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=scroll\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=scroll\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on scroll Source: https://docs.dune.com/data-catalog/evm/scroll/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on scroll. > [!NOTE] > > This is a cross-chain table but can be filtered for scroll transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on scroll. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=scroll](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=scroll) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=scroll\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=scroll\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Scroll Call Tables Source: https://docs.dune.com/data-catalog/evm/scroll/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Scroll network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # scroll.contracts Source: https://docs.dune.com/data-catalog/evm/scroll/decoded/contracts Verified contract registry on Scroll — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the scroll blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/scroll/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # scroll.logs_decoded Source: https://docs.dune.com/data-catalog/evm/scroll/decoded/logs-decoded ABI-decoded event logs on Scroll — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from scroll transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/scroll/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on scroll?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for scroll on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=logs_decoded) # Scroll Decoded Overview Source: https://docs.dune.com/data-catalog/evm/scroll/decoded/overview Simplifying Scroll smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/scroll/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/scroll/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/scroll/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # scroll.traces_decoded Source: https://docs.dune.com/data-catalog/evm/scroll/decoded/traces-decoded ABI-decoded function calls on Scroll — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from scroll transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/scroll/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=traces_decoded) # Scroll Overview Source: https://docs.dune.com/data-catalog/evm/scroll/overview Scroll data on Dune Scroll is a Layer 2 scaling solution for Ethereum that utilizes zk-Rollups to enhance transaction throughput while maintaining low costs and high security. Scroll is designed to facilitate scalable and efficient blockchain applications by bundling multiple transactions into a single rollup block, which is then verified on the Ethereum mainnet using zero-knowledge proofs. **High Scalability and Efficiency:** Scroll leverages zk-Rollups to significantly increase transaction capacity and reduce blockchain congestion. This technology allows for rapid processing and finalization of transactions at a fraction of the cost of traditional Ethereum transactions. **Strong Security and Ethereum Compatibility:** By using zero-knowledge proofs, Scroll ensures that all transactions maintain the same level of security as those on the Ethereum mainnet. Additionally, Scroll is fully compatible with Ethereum, enabling developers to deploy existing smart contracts and dApps without the need for extensive modifications. **Developer-Friendly Environment:** Scroll provides a robust environment for developers, with tools that simplify the integration and deployment of Ethereum-compatible applications on a scalable Layer 2 platform. > [card] [Scroll documentation](https://docs.scroll.io) > > Access comprehensive documentation for Scroll, providing detailed insights into its zk-Rollup technology, platform architecture, and how to build on it. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, offering insights into contract interactions and the dynamics of Scroll's zk-Rollup operations. > [card] [Blocks](./raw/blocks) > > Information on blocks processed through Scroll’s zk-Rollups, illustrating the network's enhanced throughput and scalability. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, highlighting the efficiency and reduced costs of operations on Scroll. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and deeper understanding of smart contract executions on the Scroll network. # scroll.blocks Source: https://docs.dune.com/data-catalog/evm/scroll/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Scroll. ## Table description The `scroll.blocks` table contains information about blocks in the scroll blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM scroll.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM scroll.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM scroll.blocks
  GROUP BY 1 
  LIMIT 10`
# scroll.creation_traces Source: https://docs.dune.com/data-catalog/evm/scroll/raw/creation-traces Contract deployment records on Scroll — deployer address, factory context, and deployed bytecode. ## Table Description The `scroll.creation_traces` table contains information about the creation of smart contracts on the scroll blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the scroll blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the scroll blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM scroll.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM scroll.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM scroll.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# scroll.logs Source: https://docs.dune.com/data-catalog/evm/scroll/raw/logs Smart contract event logs on Scroll — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `scroll.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/scroll/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM scroll.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM scroll.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM scroll.logs
WHERE evt_block_number = 1000000`
# scroll.traces Source: https://docs.dune.com/data-catalog/evm/scroll/raw/traces Internal transaction traces on Scroll — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `scroll.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/scroll/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM scroll.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# scroll.transactions Source: https://docs.dune.com/data-catalog/evm/scroll/raw/transactions Every transaction on Scroll — from, to, value, gas, calldata, and receipt status. ## Table Description The `scroll.transactions` table contains information about all transactions on the scroll blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the scroll blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/scroll/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=scroll\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM scroll.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM scroll.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM scroll.transactions
ORDER BY gas_price DESC
LIMIT 10`
# sei.cosmos_block_events Source: https://docs.dune.com/data-catalog/evm/sei/cosmos/cosmos_block_events Block-level events emitted during block processing on Sei. ## Table description The `sei.cosmos_block_events` table contains all block-level events and attributes in the chain, partitioned by `event_index`. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the event occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the block belongs. | | **event_index** | bigint | A unique index for events within the block. | | **event_type** | varchar | The type of event that was triggered. | | **event_source** | varchar | The source of the event. | | **attribute_key** | varchar | The key of the event attribute. | | **attribute_value** | varchar | The value of the event attribute. | | **attribute_index** | bigint | A unique index for attributes within the event. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_block_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_block_events) # sei.cosmos_blocks Source: https://docs.dune.com/data-catalog/evm/sei/cosmos/cosmos_blocks Block data — block height, timestamp, proposer, and transaction count on Sei. ## Table description The `sei.cosmos_blocks` table contains each validated block in the chain. `block_timestamp` is only available in this table, so you need to do an inner join on `block_height` to get `block_timestamp` to other tables. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block, a unique identifier for each block. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the block belongs. | | **proposer_address** | varchar | The address of the validator proposing the block. | | **validators_hash** | varchar | The hash of the validators set for the block. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_blocks) # sei.cosmos_message_events Source: https://docs.dune.com/data-catalog/evm/sei/cosmos/cosmos_message_events Message-level events — events emitted by specific transaction messages on Sei. ## Table description Contains all events and their corresponding attributes partitioned by `message_index`. Events are linked to transactions via column `tx_id`. > [!TIP] > > On execution, transactions from Cosmos emit data in two formats: > > * Messages (`sei.cosmos_tx_messages`): These provide a high-level, readable summary of actions, such as "send money" or "execute contract." They are easier to understand and track transaction types. > * Events (`sei.cosmos_message_events`): These capture detailed, low-level changes at the chain level, including underlying blockchain modifications that may not always be directly related to state changes. > * Use Messages for a general overview and Events when you need detailed insights. The two tables are complementary. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the message event occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the message event belongs. | | **tx_id** | varchar | The hash of the transaction containing the message event. | | **tx_index** | bigint | The index of the transaction in the block. | | **message_index** | bigint | The index of the message in the transaction. | | **event_index** | bigint | The index of the event in the message. | | **event_type** | varchar | The type of event that was triggered. | | **event_source** | varchar | The source of the event. | | **attribute_key** | varchar | The key of the event attribute. | | **attribute_value** | varchar | The value of the event attribute. | | **attribute_index** | bigint | A unique index for attributes within the event. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_message_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_message_events) # sei.cosmos_transactions Source: https://docs.dune.com/data-catalog/evm/sei/cosmos/cosmos_transactions Transaction records — messages, fees, gas, and execution status on Sei. ## Table description The `sei.cosmos_transactions` table contains relevant data associated with each transaction. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_height** | bigint | The height of the block where the transaction occurred. | | **chain_id** | varchar | The ID of the chain where the transaction occurred. | | **tx_id** | varchar | The unique ID of the transaction. | | **tx_info** | varchar | Information related to the transaction. | | **tx_log_message** | varchar | The log message associated with the transaction. | | **memo** | varchar | A memo associated with the transaction. | | **fee** | varchar | The fee associated with the transaction. | | **tx_code** | bigint | The result code of the transaction. | | **tx_index** | bigint | The index of the transaction within the block. | | **gas_used** | bigint | The amount of gas used by the transaction. | | **gas_wanted** | bigint | The amount of gas requested by the transaction. | | **schema_version** | bigint | The schema version for the transaction data. | | **fee_coins** | varchar | The coins used to pay the transaction fee. | | **fee_granter** | varchar | The address granting the fee for the transaction. | | **fee_payer** | varchar | The address paying the fee for the transaction. | | **gas_limit** | bigint | The gas limit set for the transaction. | | **single_sign_mode** | bigint | The signing mode for single-signature transactions. | | **multi_sign_json** | varchar | JSON structure for multi-signature transactions. | | **timeout_height** | varchar | The timeout height set for the transaction. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_transactions) # sei.cosmos_tx_messages Source: https://docs.dune.com/data-catalog/evm/sei/cosmos/cosmos_tx_messages Transaction messages — individual message types and payloads on Sei. ## Table description The `sei.cosmos_tx_messages` table contains all messages submitted to the blockchain. Each row represents one message, so there may be repeated `tx_id` if the transaction contains multiple messages. > [!TIP] > > On execution, transactions from Cosmos emit data in two formats: > > * Messages (`sei.cosmos_tx_messages`): These provide a high-level, readable summary of actions, such as "send money" or "execute contract." They are easier to understand and track transaction types. > * Events (`sei.cosmos_message_events`): These capture detailed, low-level changes at the chain level, including underlying blockchain modifications that may not always be directly related to state changes. > * Use Messages for a general overview and Events when you need detailed insights. The two tables are complementary. ## Column Description | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the message occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the message belongs. | | **tx_id** | varchar | The hash of the transaction containing the message. | | **tx_index** | bigint | The index of the transaction in the block. | | **message_index** | bigint | The index of the message in the transaction. | | **message_type** | varchar | The type of message. | | **message** | varchar | The value/content of the message. | | **schema_version** | bigint | The version of the schema in provider database. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_tx_messages](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_tx_messages) # sei.cosmos_validators Source: https://docs.dune.com/data-catalog/evm/sei/cosmos/cosmos_validators Validator set data — operator address, voting power, and commission on Sei. ## Table description The `sei.cosmos_validators` table maps validator addresses to monikers (human-readable description) and other metadata. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **operator_address** | varchar | The operator address of the validator. | | **account_address** | varchar | The account address of the validator. | | **consensus_pubkey** | varchar | The consensus public key of the validator. | | **jailed** | boolean | Indicates whether the validator is jailed. | | **status** | varchar | The status of the validator (e.g., active, inactive). | | **tokens** | varchar | The number of tokens held by the validator. | | **moniker** | varchar | The moniker or name of the validator. | | **identity** | varchar | The identity information of the validator. | | **website** | varchar | The website of the validator. | | **security_contact** | varchar | The security contact information for the validator. | | **details** | varchar | Additional details about the validator. | | **unbonding_height** | bigint | The block height at which the validator started unbonding. | | **unbonding_time** | varchar | The time when the validator will complete unbonding. | | **commission_rate** | double | The commission rate charged by the validator. | | **commission_max_rate** | double | The maximum commission rate allowed for the validator. | | **commission_max_change_rate** | double | The maximum rate at which the validator can change its commission. | | **commission_update_time** | varchar | The time when the validator last updated its commission. | | **min_self_delegation** | varchar | The minimum self-delegation required for the validator. | | **snapshot_height** | bigint | The block height at which the snapshot was taken. | | **snapshot_time** | varchar | The time when the snapshot was taken. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_validators](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=cosmos_validators) # dex_aggregator.trades on sei Source: https://docs.dune.com/data-catalog/evm/sei/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Sei — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for sei transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on sei. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=sei](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=sei) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sei\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sei\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on sei Source: https://docs.dune.com/data-catalog/evm/sei/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on sei. > [!NOTE] > > This is a cross-chain table but can be filtered for sei transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on sei. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=sei](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=sei) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sei\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sei\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on sei Source: https://docs.dune.com/data-catalog/evm/sei/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on sei. > [!NOTE] > > This is a cross-chain table but can be filtered for sei transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on sei. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=sei](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=sei) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sei\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sei\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Sei Call Tables Source: https://docs.dune.com/data-catalog/evm/sei/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Sei network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # sei.contracts Source: https://docs.dune.com/data-catalog/evm/sei/decoded/contracts Verified contract registry on Sei — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the sei blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/sei/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # sei.logs_decoded Source: https://docs.dune.com/data-catalog/evm/sei/decoded/logs-decoded ABI-decoded event logs on Sei — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from sei transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/sei/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on sei?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for sei on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=logs_decoded) # Sei Decoded Overview Source: https://docs.dune.com/data-catalog/evm/sei/decoded/overview Simplifying Sei smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/sei/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/sei/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/sei/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # sei.traces_decoded Source: https://docs.dune.com/data-catalog/evm/sei/decoded/traces-decoded ABI-decoded function calls on Sei — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from sei transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/sei/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=traces_decoded) # Sei Overview Source: https://docs.dune.com/data-catalog/evm/sei/overview Sei data on Dune ## What is Sei? Sei is a Layer-1 blockchain optimized for trading and decentralized finance (DeFi). It combines the strengths of Solana and Ethereum by implementing a fast parallelized EVM chain, providing a hyper optimized execution layer that benefits from the tooling and mindshare around the EVM. > [!WARNING] > > Sei is a Cosmos chain with EVM modules added in the [v2 upgrade](https://www.mintscan.io/sei/proposals/55). Dune indexes the EVM data separately from the Cosmos data. As such, data latency between the two can be expected. > [!TIP] > > * Sei (v1) was originally a Cosmos chain. On May 20, 2024, a proposal to [upgrade Sei (v2) to include EVM support](https://www.mintscan.io/sei/proposals/55) was passed. Consequently, on May 27, 2024, Sei upgraded to [v2 with EVM support](https://github.com/sei-protocol/sei-chain/blob/main/CHANGELOG.md#v552). > * Dune indexes the EVM component of Sei directly from RPC providers, supporting standard EVM chain decoding capabilities. > * For Cosmos data, Dune partners with a data provider, and these tables and schemas can be found in the [Cosmos Data](#cosmos-data) section. > * The EVM and Cosmos components share the same consensus mechanism, validated by the same validators, but they operate independently with interoperability features. > * Interoperability between EVM and Cosmos relies on [EVM Precompiles](https://www.docs.sei.io/dev-interoperability/precompiles/addr) and [Pointer Contracts](https://www.docs.sei.io/dev-interoperability/pointer-contracts). If these do not emit events, it may result in data gaps. > * Dune's EVM data for Sei starts from the v2 upgrade at [block height 73,123,881](https://seitrace.com/block/79123881). ### Parallelization Parallelization allows Sei to process multiple independent transactions simultaneously, leveraging modern hardware capabilities for enhanced performance. ### Sei Optimizations Sei introduces four major innovations: 1. **Twin Turbo Consensus**: This feature allows Sei to reach the fastest time to finality of any blockchain at 400ms, unlocking web2 like experiences for applications. 2. **Optimistic Parallelization**: This feature allows developers to unlock parallel processing for their Ethereum applications, with no additional work. 3. **SeiDB**: This major upgrade allows Sei to handle the much higher rate of data storage, reads and writes which become extremely important for a high performance blockchain. 4. **Interoperable EVM**: This allows existing developers in the Ethereum ecosystem to deploy their applications, tooling and infrastructure to Sei with no changes, while benefiting from the 100x performance improvements offered by Sei. ### Performance Metrics * **Time to Finality**: 400 milliseconds * **Transactions per Second**: 5,030 (12,500 theoretical max) ### Virtual Machine Interoperability Sei supports both EVM and CosmWasm smart contracts in different execution environments. It introduces interoperability features, such as precompiled EVM contracts and Pointer Contracts, to enable smooth interactions between both environments. For more details, visit [Sei Interoperability Documentation](https://www.docs.sei.io/dev-interoperability). > [card] [Sei documentation](https://www.docs.sei.io/) > > Explore comprehensive documentation on Sei, detailing its architecture, protocol, and resources for developers. ## Data Catalog ### EVM Data > [card] [Logs](./raw/logs) > > Access detailed event logs from smart contracts to analyze contract activity and interactions. > [card] [Blocks](./raw/blocks) > > Explore data on blocks processed by the Sei chain, illustrating network throughput and activity. > [card] [Transactions](./raw/transactions) > > Transaction details that highlight the efficiency and speed of the Sei chain. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and deeper understanding of contract executions. ### Cosmos Data > [!TIP] > > Timestamp is only available on block level tables (e.g. `sei.cosmos_blocks`) with field `block_timestamp`, so you need to do an inner join on `block_height` to get timestamp to other tables. > [card] [Blocks](/data-catalog/evm/sei/cosmos/cosmos_blocks) > > Contains each validated block in the chain. > [card] [Block Events](/data-catalog/evm/sei/cosmos/cosmos_block_events) > > Contains all block-level events and attributes in the chain, partitioned by event_index. > [card] [Transactions](/data-catalog/evm/sei/cosmos/cosmos_transactions) > > Contains relevant data associated with each transaction. > [card] [Transaction Message Events](/data-catalog/evm/sei/cosmos/cosmos_message_events) > > Contains all events and their corresponding attributes partitioned by message_index. > [card] [Transaction Messages](/data-catalog/evm/sei/cosmos/cosmos_tx_messages) > > Contains all messages submitted to the blockchain. > [card] [Validators](/data-catalog/evm/sei/cosmos/cosmos_validators) > > Maps validator addresses to monikers (human-readable description) and other metadata. # sei.blocks Source: https://docs.dune.com/data-catalog/evm/sei/raw/blocks Block data — block height, timestamp, and metadata on Sei. ## Table description The `sei.blocks` table contains information about blocks in the sei blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM sei.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM sei.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM sei.blocks
  GROUP BY 1 
  LIMIT 10`
# sei.creation_traces Source: https://docs.dune.com/data-catalog/evm/sei/raw/creation-traces Contract deployment records on Sei — deployer address, factory context, and deployed bytecode. ## Table Description The `sei.creation_traces` table contains information about the creation of smart contracts on the sei blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the sei blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the sei blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM sei.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM sei.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM sei.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# sei.logs Source: https://docs.dune.com/data-catalog/evm/sei/raw/logs Smart contract event logs on Sei — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `sei.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sei/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM sei.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM sei.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM sei.logs
WHERE evt_block_number = 1000000`
# sei.traces Source: https://docs.dune.com/data-catalog/evm/sei/raw/traces Internal transaction traces on Sei — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `sei.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sei/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM sei.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# sei.transactions Source: https://docs.dune.com/data-catalog/evm/sei/raw/transactions Transaction records — messages, fees, and execution results on Sei. ## Table Description The `sei.transactions` table contains information about all transactions on the sei blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the sei blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sei/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sei\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM sei.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM sei.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM sei.transactions
ORDER BY gas_price DESC
LIMIT 10`
# Sepolia Call Tables Source: https://docs.dune.com/data-catalog/evm/sepolia/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Sepolia network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # sepolia.contracts Source: https://docs.dune.com/data-catalog/evm/sepolia/decoded/contracts Verified contract registry on Sepolia — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the sepolia blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/sepolia/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # sepolia.logs_decoded Source: https://docs.dune.com/data-catalog/evm/sepolia/decoded/logs-decoded ABI-decoded event logs on Sepolia — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from sepolia transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/sepolia/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on sepolia?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for sepolia on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=logs_decoded) # Sepolia Testnet Decoded Overview Source: https://docs.dune.com/data-catalog/evm/sepolia/decoded/overview Simplifying Sepolia Testnet smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/sepolia/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/sepolia/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/sepolia/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # sepolia.traces_decoded Source: https://docs.dune.com/data-catalog/evm/sepolia/decoded/traces-decoded ABI-decoded function calls on Sepolia — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from sepolia transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/sepolia/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=traces_decoded) # Sepolia Testnet Overview Source: https://docs.dune.com/data-catalog/evm/sepolia/overview Sepolia data on Dune Analytics Sepolia is an Ethereum testnet that provides a stable environment for developers to test and deploy their applications before launching on the Ethereum mainnet. Sepolia is designed to mirror the conditions of the mainnet, providing a realistic testing environment without the financial risks. ### Key Features: * **Mainnet Parity:** Sepolia offers an environment that closely replicates the Ethereum mainnet, allowing developers to test their applications under conditions similar to the mainnet. * **EVM Compatibility:** Sepolia supports all Ethereum Virtual Machine (EVM) compatible codebases, enabling seamless testing and deployment of smart contracts and decentralized applications (dApps). * **Cost-Effective Testing:** Transactions on Sepolia are conducted using test ETH, which has no real-world value, allowing developers to experiment and troubleshoot without incurring any costs. * **Stability and Reliability:** Sepolia is maintained to ensure a stable and reliable test environment, providing developers with confidence that their applications will perform as expected on the mainnet. * **Community Support:** Sepolia is backed by a robust community of developers and enthusiasts who contribute to its maintenance and improvement, ensuring it remains a valuable resource for the Ethereum ecosystem. > [card] [Sepolia documentation](https://sepolia.dev/) > > Explore comprehensive documentation on Sepolia, detailing its architecture, protocol, and resources for developers. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, providing insights into interactions within the Sepolia network. > [card] [Blocks](./raw/blocks) > > Information on blocks, illustrating the operational capacity and activity levels on Sepolia. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the efficiency and execution of operations on Sepolia. > [card] [Decoded](./decoded/overview) > > Enhanced transaction data decoded for better analysis and understanding of contract executions. # sepolia.blocks Source: https://docs.dune.com/data-catalog/evm/sepolia/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Sepolia. ## Table description The `sepolia.blocks` table contains information about blocks in the sepolia blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM sepolia.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM sepolia.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM sepolia.blocks
  GROUP BY 1 
  LIMIT 10`
# sepolia.creation_traces Source: https://docs.dune.com/data-catalog/evm/sepolia/raw/creation-traces Contract deployment records on Sepolia — deployer address, factory context, and deployed bytecode. ## Table Description The `sepolia.creation_traces` table contains information about the creation of smart contracts on the sepolia blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the sepolia blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the sepolia blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM sepolia.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM sepolia.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM sepolia.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# sepolia.logs Source: https://docs.dune.com/data-catalog/evm/sepolia/raw/logs Smart contract event logs on Sepolia — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `sepolia.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sepolia/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM sepolia.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM sepolia.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM sepolia.logs
WHERE evt_block_number = 1000000`
# sepolia.traces Source: https://docs.dune.com/data-catalog/evm/sepolia/raw/traces Internal transaction traces on Sepolia — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `sepolia.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sepolia/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM sepolia.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# sepolia.transactions Source: https://docs.dune.com/data-catalog/evm/sepolia/raw/transactions Every transaction on Sepolia — from, to, value, gas, calldata, and receipt status. ## Table Description The `sepolia.transactions` table contains information about all transactions on the sepolia blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the sepolia blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sepolia/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sepolia\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM sepolia.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM sepolia.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM sepolia.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on shape Source: https://docs.dune.com/data-catalog/evm/shape/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Shape — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for shape transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on shape. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=shape](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=shape) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=shape\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=shape\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on shape Source: https://docs.dune.com/data-catalog/evm/shape/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on shape. > [!NOTE] > > This is a cross-chain table but can be filtered for shape transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on shape. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=shape](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=shape) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=shape\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=shape\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on shape Source: https://docs.dune.com/data-catalog/evm/shape/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on shape. > [!NOTE] > > This is a cross-chain table but can be filtered for shape transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on shape. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=shape](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=shape) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=shape\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=shape\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Shape Call Tables Source: https://docs.dune.com/data-catalog/evm/shape/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Shape network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # shape.contracts Source: https://docs.dune.com/data-catalog/evm/shape/decoded/contracts Verified contract registry on Shape — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the shape blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/shape/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # shape.logs_decoded Source: https://docs.dune.com/data-catalog/evm/shape/decoded/logs-decoded ABI-decoded event logs on Shape — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from shape transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/shape/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on shape?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for shape on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=logs_decoded) # Shape Decoded Overview Source: https://docs.dune.com/data-catalog/evm/shape/decoded/overview Simplifying Shape smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/shape/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/shape/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/shape/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # shape.traces_decoded Source: https://docs.dune.com/data-catalog/evm/shape/decoded/traces-decoded ABI-decoded function calls on Shape — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from shape transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/shape/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=traces_decoded) # Shape Overview Source: https://docs.dune.com/data-catalog/evm/shape/overview Shape data on Dune Shape is the chain for creators, built on top of Ethereum. It is an EVM equivalent Layer 2 scaling solution that inherits its security directly from Ethereum, keeping the networks intrinsically linked forever. **Chain for Creators with Gasback:** As a creator on Shape, you can claim back 80% of sequencer fees users spend interacting with your contracts. This includes contracts you build yourself, contracts you acquire ownership of, and contracts that you deploy through other platforms. **EVM Equivalent:** Shape is fully EVM equivalent, providing the same creator experience as on Ethereum, just at a fraction of the cost. This enables developers to deploy existing smart contracts and dApps without the need for extensive modifications. **Secure, Stable & Scalable:** Shape inherits its security directly from Ethereum and prioritizes stability and scalability, utilizing Alchemy and Optimism as key infrastructure partners to help achieve and maintain these states. **Part of the Superchain:** Shape is a member of the Superchain, which unlocks a range of further benefits for the entire ecosystem - including ongoing network-level cooperation, funding of public goods, and additional builder incentives on Shape. > [card] [Shape documentation](https://docs.shape.network/documentation/introduction) > > Access comprehensive documentation for Shape, providing detailed insights into its technology, platform architecture, and how to build on it. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, offering insights into contract interactions and the dynamics of Shape's operations. > [card] [Blocks](./raw/blocks) > > Information on blocks processed through Shape, illustrating the network's enhanced throughput and scalability. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, highlighting the efficiency and reduced costs of operations on Shape. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and deeper understanding of smart contract executions on the Shape network. # shape.blocks Source: https://docs.dune.com/data-catalog/evm/shape/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Shape. ## Table description The `shape.blocks` table contains information about blocks in the shape blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM shape.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM shape.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM shape.blocks
  GROUP BY 1 
  LIMIT 10`
# shape.creation_traces Source: https://docs.dune.com/data-catalog/evm/shape/raw/creation-traces Contract deployment records on Shape — deployer address, factory context, and deployed bytecode. ## Table Description The `shape.creation_traces` table contains information about the creation of smart contracts on the shape blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the shape blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the shape blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM shape.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM shape.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM shape.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# shape.logs Source: https://docs.dune.com/data-catalog/evm/shape/raw/logs Smart contract event logs on Shape — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `shape.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/shape/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM shape.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM shape.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM shape.logs
WHERE evt_block_number = 1000000`
# shape.traces Source: https://docs.dune.com/data-catalog/evm/shape/raw/traces Internal transaction traces on Shape — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `shape.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/shape/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM shape.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# shape.transactions Source: https://docs.dune.com/data-catalog/evm/shape/raw/transactions Every transaction on Shape — from, to, value, gas, calldata, and receipt status. ## Table Description The `shape.transactions` table contains information about all transactions on the shape blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the shape blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/shape/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=shape\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM shape.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM shape.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM shape.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on somnia Source: https://docs.dune.com/data-catalog/evm/somnia/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on somnia. > [!NOTE] > > This is a cross-chain table but can be filtered for somnia transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on somnia. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=somnia](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=somnia) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=somnia\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=somnia\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Somnia Call Tables Source: https://docs.dune.com/data-catalog/evm/somnia/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Somnia network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # somnia.contracts Source: https://docs.dune.com/data-catalog/evm/somnia/decoded/contracts Verified contract registry on Somnia — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the somnia blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=contracts) # somnia.event_logs Source: https://docs.dune.com/data-catalog/evm/somnia/decoded/event-logs Smart contract event logs on Somnia — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # somnia.logs_decoded Source: https://docs.dune.com/data-catalog/evm/somnia/decoded/logs-decoded ABI-decoded event logs on Somnia — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from somnia transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/somnia/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on somnia?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for somnia on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=logs_decoded) # Somnia Decoded Overview Source: https://docs.dune.com/data-catalog/evm/somnia/decoded/overview Simplifying Somnia smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/somnia/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/somnia/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/somnia/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # somnia.traces_decoded Source: https://docs.dune.com/data-catalog/evm/somnia/decoded/traces-decoded ABI-decoded function calls on Somnia — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from somnia transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/somnia/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=traces_decoded) # Somnia Overview Source: https://docs.dune.com/data-catalog/evm/somnia/overview Somnia data on Dune ## What is Somnia? Somnia is a high-performance, cost-efficient EVM-compatible Layer 1 blockchain capable of processing over 1,000,000 transactions per second (TPS) with sub-second finality. It is suitable for serving millions of users and building real-time mass-consumer applications like games, social applications, metaverses, and more, all fully on-chain. ## Key Features * **Ultra-High Performance**: Capable of processing over 1,000,000 TPS with sub-second finality * **EVM-Compatible**: Full compatibility with Ethereum smart contracts and tooling * **Mass-Consumer Focus**: Designed for real-time applications serving millions of users * **Cost-Efficient**: Optimized for high-throughput, low-cost transactions * **Gaming & Metaverse Ready**: Specialized infrastructure for gaming and metaverse applications * **Social Applications**: Built to support large-scale social platforms and applications ## Performance Benchmarks * **1,050,000 TPS**: Achieved with ERC-20 transfers between several hundred thousand accounts * **50,000 Uniswaps per second**: Running Uniswap V3 with several hundred thousand accounts trading one LP pool * **300,000 NFT mints per second**: Supporting 100,000 accounts minting NFTs simultaneously ## Ecosystem Highlights * High-performance infrastructure for mass-consumer applications * Gaming and metaverse platform capabilities * Social application support at scale * Real-time transaction processing * Support for various application types including: * Games * Social applications * Metaverses * Real-time consumer applications * High-throughput DeFi protocols ## Data on Dune > [card] [Raw Data](/data-catalog/evm/somnia/raw/blocks) > > Access to raw blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/evm/somnia/decoded/overview) > > Human-readable contract interactions and events ## Resources > [card] [Somnia Documentation](https://docs.somnia.network/) > > Official documentation for developers building on Somnia # somnia.blocks Source: https://docs.dune.com/data-catalog/evm/somnia/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Somnia. ## Table description The `somnia.blocks` table contains information about blocks in the somnia blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM somnia.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM somnia.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM somnia.blocks
  GROUP BY 1 
  LIMIT 10`
# somnia.creation_traces Source: https://docs.dune.com/data-catalog/evm/somnia/raw/creation-traces Contract deployment records on Somnia — deployer address, factory context, and deployed bytecode. ## Table Description The `somnia.creation_traces` table contains information about the creation of smart contracts on the somnia blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the somnia blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the somnia blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM somnia.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM somnia.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM somnia.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# somnia.logs Source: https://docs.dune.com/data-catalog/evm/somnia/raw/logs Smart contract event logs on Somnia — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `somnia.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/somnia/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM somnia.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM somnia.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM somnia.logs
WHERE evt_block_number = 1000000`
# somnia.traces Source: https://docs.dune.com/data-catalog/evm/somnia/raw/traces Internal transaction traces on Somnia — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `somnia.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/somnia/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM somnia.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# somnia.transactions Source: https://docs.dune.com/data-catalog/evm/somnia/raw/transactions Every transaction on Somnia — from, to, value, gas, calldata, and receipt status. ## Table Description The `somnia.transactions` table contains information about all transactions on the somnia blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the somnia blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/somnia/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=somnia\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM somnia.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM somnia.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM somnia.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on sonic Source: https://docs.dune.com/data-catalog/evm/sonic/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Sonic — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for sonic transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on sonic. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=sonic](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=sonic) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sonic\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sonic\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on sonic Source: https://docs.dune.com/data-catalog/evm/sonic/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on sonic. > [!NOTE] > > This is a cross-chain table but can be filtered for sonic transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on sonic. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=sonic](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=sonic) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sonic\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sonic\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on sonic Source: https://docs.dune.com/data-catalog/evm/sonic/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on sonic. > [!NOTE] > > This is a cross-chain table but can be filtered for sonic transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on sonic. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=sonic](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=sonic) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sonic\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sonic\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Sonic Call Tables Source: https://docs.dune.com/data-catalog/evm/sonic/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Sonic network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # sonic.contracts Source: https://docs.dune.com/data-catalog/evm/sonic/decoded/contracts Verified contract registry on Sonic — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the sonic blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/sonic/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # sonic.logs_decoded Source: https://docs.dune.com/data-catalog/evm/sonic/decoded/logs-decoded ABI-decoded event logs on Sonic — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from sonic transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/sonic/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on sonic?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for sonic on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=logs_decoded) # Sonic Decoded Overview Source: https://docs.dune.com/data-catalog/evm/sonic/decoded/overview Simplifying Sonic smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/sonic/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/sonic/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/sonic/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # sonic.traces_decoded Source: https://docs.dune.com/data-catalog/evm/sonic/decoded/traces-decoded ABI-decoded function calls on Sonic — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from sonic transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/sonic/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=traces_decoded) # Sonic Overview Source: https://docs.dune.com/data-catalog/evm/sonic/overview Sonic data on Dune Sonic is an EVM layer-1 blockchain platform that offers developers attractive incentives and powerful infrastructure, powering the next generation of decentralized applications. The platform features exceptional performance metrics including 10,000 transactions per second and sub-second finality while maintaining full EVM compatibility. **High Scalability and Efficiency:** Sonic delivers exceptional performance with: * 10,000 Transactions per Second * Sub-Second Finality * Low Transaction Costs * Full EVM Compatibility **Strong Security and Ethereum Compatibility:** Sonic maintains robust security through its aBFT (asynchronous Byzantine Fault Tolerance) consensus while offering full EVM compatibility. This allows developers to easily port their Ethereum applications to Sonic or build new ones using familiar tools and languages. **Developer-Friendly Environment:** Sonic provides developers with powerful incentives and infrastructure including: * Fee Monetization: Earn up to 90% of the fees your apps generate * Innovator Fund: Up to 200 million S to support new ventures * Solidity/Vyper Support * Comprehensive development tooling > [card] [Sonic documentation](https://docs.soniclabs.com/sonic/overview) > > Access comprehensive documentation for Sonic, providing detailed insights into its consensus mechanism, architecture, and development resources. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, offering insights into contract interactions and network activities on Sonic. > [card] [Blocks](./raw/blocks) > > Information on blocks processed through Sonic's Lachesis consensus, demonstrating the network's high throughput and fast finality. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the high-performance and cost-effective nature of operations on Sonic. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and deeper understanding of smart contract executions on the Sonic network. # sonic.blocks Source: https://docs.dune.com/data-catalog/evm/sonic/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Sonic. ## Table description The `sonic.blocks` table contains information about blocks in the sonic blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM sonic.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM sonic.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM sonic.blocks
  GROUP BY 1 
  LIMIT 10`
# sonic.creation_traces Source: https://docs.dune.com/data-catalog/evm/sonic/raw/creation-traces Contract deployment records on Sonic — deployer address, factory context, and deployed bytecode. ## Table Description The `sonic.creation_traces` table contains information about the creation of smart contracts on the sonic blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the sonic blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the sonic blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM sonic.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM sonic.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM sonic.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# sonic.logs Source: https://docs.dune.com/data-catalog/evm/sonic/raw/logs Smart contract event logs on Sonic — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `sonic.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sonic/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM sonic.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM sonic.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM sonic.logs
WHERE evt_block_number = 1000000`
# sonic.traces Source: https://docs.dune.com/data-catalog/evm/sonic/raw/traces Internal transaction traces on Sonic — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `sonic.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sonic/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM sonic.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# sonic.transactions Source: https://docs.dune.com/data-catalog/evm/sonic/raw/transactions Every transaction on Sonic — from, to, value, gas, calldata, and receipt status. ## Table Description The `sonic.transactions` table contains information about all transactions on the sonic blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the sonic blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sonic/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sonic\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM sonic.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM sonic.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM sonic.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on sophon Source: https://docs.dune.com/data-catalog/evm/sophon/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Sophon — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for sophon transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on sophon. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=sophon](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=sophon) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sophon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sophon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on sophon Source: https://docs.dune.com/data-catalog/evm/sophon/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on sophon. > [!NOTE] > > This is a cross-chain table but can be filtered for sophon transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on sophon. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=sophon](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=sophon) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sophon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sophon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on sophon Source: https://docs.dune.com/data-catalog/evm/sophon/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on sophon. > [!NOTE] > > This is a cross-chain table but can be filtered for sophon transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on sophon. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=sophon](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=sophon) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sophon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=sophon\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Sophon Call Tables Source: https://docs.dune.com/data-catalog/evm/sophon/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Sophon network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # sophon.contracts Source: https://docs.dune.com/data-catalog/evm/sophon/decoded/contracts Verified contract registry on Sophon — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the sophon blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/sophon/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # sophon.logs_decoded Source: https://docs.dune.com/data-catalog/evm/sophon/decoded/logs-decoded ABI-decoded event logs on Sophon — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from sophon transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/sophon/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on sophon?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for sophon on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=logs_decoded) # Sophon Decoded Overview Source: https://docs.dune.com/data-catalog/evm/sophon/decoded/overview Simplifying Sophon smart contract analysis through human-readable tables. > [!WARNING] > > Due to bugs in the Sophon client, some contract creation traces are missing, and data in the code field is incomplete for certain blocks. Consequently, we cannot support factory and bytecode matching for this chain. Once the bugs are addressed, we will work to restore this functionality. We apologize for the inconvenience. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/sophon/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/sophon/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/sophon/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # sophon.traces_decoded Source: https://docs.dune.com/data-catalog/evm/sophon/decoded/traces-decoded ABI-decoded function calls on Sophon — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from sophon transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/sophon/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=traces_decoded) # Sophon Overview Source: https://docs.dune.com/data-catalog/evm/sophon/overview Sophon data on Dune Sophon is a ZK chain that redefines onchain experiences by combining real applications with a simple user experience and high scalability. Built on ZK technology, Sophon aims to bring crypto accessibility to a wider audience while maintaining robust security and performance. **Architecture and Technology:** Sophon is built on three key technological pillars: * **Validiums**: A ZK-based scaling solution that provides high throughput and security * **The ZK Stack**: A comprehensive infrastructure that powers the network * **Native Account Abstraction**: Built-in support for smart accounts and improved user experience * **Paymasters**: Advanced fee abstraction mechanisms for better user onboarding **Enhanced User Experience:** Sophon focuses on simplifying the blockchain experience while maintaining high performance. The platform is designed to make crypto applications accessible to everyday users while providing the tools and infrastructure developers need to build sophisticated applications. **Developer-Centric Approach:** The platform provides a comprehensive environment for developers to build and deploy applications, with native support for advanced features like account abstraction and paymaster functionality, enabling more sophisticated and user-friendly dApps. > [card] [Sophon documentation](https://docs.sophon.xyz/welcome) > > Access the official documentation for Sophon to explore its architecture, features, and development resources. ## Data Catalog > [card] [Logs](./raw/logs) > > Event logs from smart contracts, providing insights into interactions and activities on the Sophon network. > [card] [Blocks](./raw/blocks) > > Information on blocks processed using Sophon's ZK technology, reflecting the network's capacity for high transaction throughput. > [card] [Transactions](./raw/transactions) > > Detailed transaction data, showcasing the operational efficiency and cost-effectiveness of Sophon's validium solution. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and better understanding of smart contract executions on Sophon. # sophon.blocks Source: https://docs.dune.com/data-catalog/evm/sophon/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Sophon. ## Table description The `sophon.blocks` table contains information about blocks in the sophon blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM sophon.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM sophon.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM sophon.blocks
  GROUP BY 1 
  LIMIT 10`
# sophon.creation_traces Source: https://docs.dune.com/data-catalog/evm/sophon/raw/creation-traces Contract deployment records on Sophon — deployer address, factory context, and deployed bytecode. ## Table Description The `sophon.creation_traces` table contains information about the creation of smart contracts on the sophon blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the sophon blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the sophon blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM sophon.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM sophon.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM sophon.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# sophon.logs Source: https://docs.dune.com/data-catalog/evm/sophon/raw/logs Smart contract event logs on Sophon — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `sophon.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sophon/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM sophon.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM sophon.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM sophon.logs
WHERE evt_block_number = 1000000`
# sophon.traces Source: https://docs.dune.com/data-catalog/evm/sophon/raw/traces Internal transaction traces on Sophon — cross-contract calls, delegate calls, and value transfers with full call stack context. > [!WARNING] > > You may see duplicate records in the `traces` table for the Sophon chain. This is not a bug, but a result of trace calls appearing twice within the same transaction. These consecutive calls—an outer and an inner call—are identical except for their gas values. They share the same `from`, `to`, `input`, `output`, `success`, and `value` fields. ## Table Description The `sophon.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sophon/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM sophon.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# sophon.transactions Source: https://docs.dune.com/data-catalog/evm/sophon/raw/transactions Every transaction on Sophon — from, to, value, gas, calldata, and receipt status. ## Table Description The `sophon.transactions` table contains information about all transactions on the sophon blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the sophon blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/sophon/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sophon\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM sophon.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM sophon.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM sophon.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on story Source: https://docs.dune.com/data-catalog/evm/story/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on story. > [!NOTE] > > This is a cross-chain table but can be filtered for story transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on story. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=story](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=story) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=story\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=story\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Story Call Tables Source: https://docs.dune.com/data-catalog/evm/story/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Story network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # story.contracts Source: https://docs.dune.com/data-catalog/evm/story/decoded/contracts Verified contract registry on Story — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the story blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/story/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # story.logs_decoded Source: https://docs.dune.com/data-catalog/evm/story/decoded/logs-decoded ABI-decoded event logs on Story — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from story transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/story/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on story?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for story on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=logs_decoded) # Story Decoded Overview Source: https://docs.dune.com/data-catalog/evm/story/decoded/overview Simplifying Story smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/story/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/story/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/story/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # story.traces_decoded Source: https://docs.dune.com/data-catalog/evm/story/decoded/traces-decoded ABI-decoded function calls on Story — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from story transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/story/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=traces_decoded) # Story Overview Source: https://docs.dune.com/data-catalog/evm/story/overview Story data on Dune ## What is Story? Story is the world's IP blockchain - a purpose-built layer 1 blockchain designed specifically for intellectual property. You can register your IP on-chain and add usage terms to it in seconds, massively lowering the barrier to the currently complex & antiquated legal system for IP. By making IP programmable on the blockchain, it becomes a transparent & decentralized global IP repository where AI agents (or any other software) and humans alike can transact on & monetize IP with a simple API call. ## Key Features and Advantages ### The World's IP Blockchain Story Network is a purpose-built layer 1 blockchain achieving the best of EVM and Cosmos SDK. It is 100% EVM-compatible alongside deep execution layer optimizations to support graph data structures, purpose-built for handling complex data structures like IP quickly and cost-efficiently. ### Proof-of-Creativity Protocol The "Proof-of-Creativity" Protocol, made up of smart contracts written in Solidity, are natively deployed on Story Network and allow anyone to onramp IP to Story. * **IP Assets**: Creators register their IP as IP Assets on Story. IP could be an image, a song, an RWA, AI training data, or anything in-between. * **Modules**: You use Modules to interact with IP Assets. For example: * **Licensing Module**: Enforcing proper usage of your IP * **Royalty Module**: Paying & claiming revenue * **Dispute Module**: Disputing infringing IP * **Ownership**: Each IP Asset has an associated ERC721 NFT, which represents ownership over the IP. This means IP ownership can be bought & sold. * **IPFi**: The licenses minted from an IP are also ERC721 NFTs, meaning you can buy & sell the rights to use an IP under certain terms, unlocking a new realm of IP Finance. ### Programmable IP License (PIL) Although on-chain, an IP's usage terms and minted licenses are enforced by an off-chain legal contract called the Programmable IP License (PIL). The PIL allows anyone to offramp tokenized IP on Story into the "real world" legal system and outlines real legal terms for how creators can remix, monetize, and create derivatives of their IP. ### Network Specifications * **Technology Stack**: EVM-compatible Layer 1 with Cosmos SDK * **Gas Token**: \$IP * **Network Type**: EVM-compatible Layer 1 * **Consensus**: CometBFT-based consensus layer for fast finality and cheap transactions * **Optimizations**: Precompiled primitives to traverse complex data structures like IP graphs within seconds at marginal costs ### Developer Tools & Infrastructure * **Full EVM Compatibility**: Support for standard Ethereum development tools * **Smart Contract Development**: Solidity smart contracts * **Graph Data Structures**: Purpose-built for handling complex IP data structures * **Infrastructure**: * Cross-chain bridges (Stargate, deBridge, Orbiter Finance) * Stablecoin support (bridged USDC.e) * Wallet support (MetaMask, OKX, and other EVM-based wallets) > [card] [Story Documentation](https://docs.story.foundation/introduction) > > Official documentation for developers building on Story ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through event logs > [card] [Blocks](./raw/blocks) > > Information on blocks processed on Story > [card] [Transactions](./raw/transactions) > > Detailed data on transactions > [card] [decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis # story.blocks Source: https://docs.dune.com/data-catalog/evm/story/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Story. ## Table description The `story.blocks` table contains information about blocks in the story blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM story.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM story.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM story.blocks
  GROUP BY 1 
  LIMIT 10`
# story.creation_traces Source: https://docs.dune.com/data-catalog/evm/story/raw/creation-traces Contract deployment records on Story — deployer address, factory context, and deployed bytecode. ## Table Description The `story.creation_traces` table contains information about the creation of smart contracts on the story blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the story blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the story blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM story.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM story.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM story.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# story.logs Source: https://docs.dune.com/data-catalog/evm/story/raw/logs Smart contract event logs on Story — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `story.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/story/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM story.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM story.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM story.logs
WHERE evt_block_number = 1000000`
# story.traces Source: https://docs.dune.com/data-catalog/evm/story/raw/traces Internal transaction traces on Story — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `story.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/story/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM story.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# story.transactions Source: https://docs.dune.com/data-catalog/evm/story/raw/transactions Every transaction on Story — from, to, value, gas, calldata, and receipt status. ## Table Description The `story.transactions` table contains information about all transactions on the story blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the story blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/story/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=story\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM story.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM story.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM story.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on superseed Source: https://docs.dune.com/data-catalog/evm/superseed/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on superseed. > [!NOTE] > > This is a cross-chain table but can be filtered for superseed transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on superseed. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=superseed](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=superseed) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=superseed\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=superseed\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Hemi Call Tables Source: https://docs.dune.com/data-catalog/evm/superseed/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Hemi network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # superseed.contracts Source: https://docs.dune.com/data-catalog/evm/superseed/decoded/contracts Verified contract registry on Superseed — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the superseed blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=contracts) # superseed.event_logs Source: https://docs.dune.com/data-catalog/evm/superseed/decoded/event-logs Smart contract event logs on Superseed — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # superseed.logs_decoded Source: https://docs.dune.com/data-catalog/evm/superseed/decoded/logs-decoded ABI-decoded event logs on Superseed — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from superseed transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/superseed/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on superseed?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for superseed on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=logs_decoded) # Superseed Decoded Overview Source: https://docs.dune.com/data-catalog/evm/superseed/decoded/overview Simplifying Superseed smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/superseed/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/superseed/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/superseed/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # superseed.traces_decoded Source: https://docs.dune.com/data-catalog/evm/superseed/decoded/traces-decoded ABI-decoded function calls on Superseed — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from superseed transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/superseed/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=traces_decoded) # Superseed Overview Source: https://docs.dune.com/data-catalog/evm/superseed/overview Superseed data on Dune ## What is Superseed? Superseed is a network that transforms Ethereum scaling into self-repaying loans. Built on the OP Stack, Superseed is an optimistic rollup that extends Ethereum's ability to enable financial freedom by maximizing capital efficiency and returning 100% of protocol revenue to users. ## Key Features * **Zero Interest Yield**: Access yield at zero percent interest, with loans repaid effortlessly through protocol-generated fees * **Proof-of-Repayment**: A unique programmatic reward mechanism where a small percentage of the native token's total supply is distributed daily through an auction, with proceeds used to repay Supercollateral users * **Supercollateral**: Superseed's governance token plays a special role within the CDP protocol, allowing borrowers who meet safety requirements (e.g., a collateralization ratio of 500%) to secure loans without interest * **Dynamic Repayment Vault**: Channels protocol fees into a smart contract that systematically burns debt, stabilizing the repayment rate for Supercollateral users * **Native CDP Platform**: A Collateralized Debt Position platform enshrined in the rollup protocol * **Superseed Stablecoin**: An overcollateralized stablecoin generated when users borrow against their assets, requiring collateral value to exceed 150% of the stablecoin's value ## Protocol Components * **General-purpose Ethereum Layer 2**: Built on the OP stack, open-source, permissionless, and Ethereum-equivalent * **CDP Protocol**: Native collateralized debt position platform integrated into the rollup * **Revenue Sources**: Sequencer profits, CDP interest, and inflationary rewards * **Automatic Loan Repayment**: All fees generated across the network are used to burn the debt of Supercollateral users ## Data on Dune > [card] [Raw Data](/data-catalog/evm/superseed/raw/blocks) > > Access to raw blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/evm/superseed/decoded/overview) > > Human-readable contract interactions and events ## Resources > [card] [Superseed Documentation](https://docs.superseed.xyz/) > > Official documentation for developers building on Superseed # superseed.blocks Source: https://docs.dune.com/data-catalog/evm/superseed/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Superseed. ## Table description The `superseed.blocks` table contains information about blocks in the superseed blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM superseed.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM superseed.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM superseed.blocks
  GROUP BY 1 
  LIMIT 10`
# superseed.creation_traces Source: https://docs.dune.com/data-catalog/evm/superseed/raw/creation-traces Contract deployment records on Superseed — deployer address, factory context, and deployed bytecode. ## Table Description The `superseed.creation_traces` table contains information about the creation of smart contracts on the superseed blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the superseed blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the superseed blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM superseed.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM superseed.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM superseed.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# superseed.logs Source: https://docs.dune.com/data-catalog/evm/superseed/raw/logs Smart contract event logs on Superseed — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `superseed.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/superseed/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM superseed.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM superseed.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM superseed.logs
WHERE evt_block_number = 1000000`
# superseed.traces Source: https://docs.dune.com/data-catalog/evm/superseed/raw/traces Internal transaction traces on Superseed — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `superseed.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/superseed/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM superseed.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# superseed.transactions Source: https://docs.dune.com/data-catalog/evm/superseed/raw/transactions Every transaction on Superseed — from, to, value, gas, calldata, and receipt status. ## Table Description The `superseed.transactions` table contains information about all transactions on the superseed blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the superseed blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/superseed/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=superseed\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM superseed.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM superseed.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM superseed.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on tac Source: https://docs.dune.com/data-catalog/evm/tac/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on tac. > [!NOTE] > > This is a cross-chain table but can be filtered for tac transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on tac. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=tac](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=tac) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=tac\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=tac\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # TAC Call Tables Source: https://docs.dune.com/data-catalog/evm/tac/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the TAC network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # tac.contracts Source: https://docs.dune.com/data-catalog/evm/tac/decoded/contracts Verified contract registry on Tac — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the tac blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=contracts) # tac.event_logs Source: https://docs.dune.com/data-catalog/evm/tac/decoded/event-logs Smart contract event logs on Tac — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # tac.logs_decoded Source: https://docs.dune.com/data-catalog/evm/tac/decoded/logs-decoded ABI-decoded event logs on Tac — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from tac transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/tac/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on tac?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for tac on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=logs_decoded) # TAC Decoded Overview Source: https://docs.dune.com/data-catalog/evm/tac/decoded/overview Simplifying TAC smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/tac/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/tac/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/tac/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # tac.traces_decoded Source: https://docs.dune.com/data-catalog/evm/tac/decoded/traces-decoded ABI-decoded function calls on Tac — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from tac transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/tac/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=traces_decoded) # TAC Overview Source: https://docs.dune.com/data-catalog/evm/tac/overview TAC data on Dune ## What is TAC? TAC (The Asset Chain) is a Layer 2 blockchain built on Ethereum that provides a secure, scalable, and efficient platform for real-world asset tokenization and trading. It enables the seamless integration of traditional financial assets into the blockchain ecosystem, offering institutional-grade infrastructure for asset management and trading. ## Key Features * **Real-World Asset Focus**: Specialized infrastructure for tokenizing and trading real-world assets * **Ethereum L2**: Built on Ethereum for security and composability * **Institutional Grade**: Designed to meet regulatory and institutional requirements * **High Performance**: Optimized for high-throughput trading and asset management * **Composability**: Seamless integration with the broader Ethereum ecosystem ## Ecosystem Highlights * Advanced infrastructure for real-world asset tokenization * Institutional-grade trading and settlement capabilities * Regulatory-compliant framework for asset management * Support for various asset classes including: * Real estate * Commodities * Private equity * Fixed income instruments * Alternative investments ## Data on Dune > [card] [Raw Data](/data-catalog/evm/tac/raw/blocks) > > Access to raw blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/evm/tac/decoded/overview) > > Human-readable contract interactions and events ## Resources > [card] [TAC Documentation](https://docs.tac.build/core-concepts/overview/what-is-tac) > > Official documentation for developers building on TAC # tac.blocks Source: https://docs.dune.com/data-catalog/evm/tac/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Tac. ## Table description The `tac.blocks` table contains information about blocks in the tac blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM tac.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM tac.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM tac.blocks
  GROUP BY 1 
  LIMIT 10`
# tac.creation_traces Source: https://docs.dune.com/data-catalog/evm/tac/raw/creation-traces Contract deployment records on Tac — deployer address, factory context, and deployed bytecode. ## Table Description The `tac.creation_traces` table contains information about the creation of smart contracts on the tac blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the tac blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the tac blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM tac.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM tac.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM tac.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# tac.logs Source: https://docs.dune.com/data-catalog/evm/tac/raw/logs Smart contract event logs on Tac — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `tac.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/tac/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM tac.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM tac.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM tac.logs
WHERE evt_block_number = 1000000`
# tac.traces Source: https://docs.dune.com/data-catalog/evm/tac/raw/traces Internal transaction traces on Tac — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `tac.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/tac/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM tac.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# tac.transactions Source: https://docs.dune.com/data-catalog/evm/tac/raw/transactions Every transaction on Tac — from, to, value, gas, calldata, and receipt status. ## Table Description The `tac.transactions` table contains information about all transactions on the tac blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the tac blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/tac/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tac\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM tac.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM tac.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM tac.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on taiko Source: https://docs.dune.com/data-catalog/evm/taiko/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on taiko. > [!NOTE] > > This is a cross-chain table but can be filtered for taiko transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on taiko. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=taiko](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=taiko) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=taiko\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=taiko\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Taiko Call Tables Source: https://docs.dune.com/data-catalog/evm/taiko/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Taiko network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # taiko.contracts Source: https://docs.dune.com/data-catalog/evm/taiko/decoded/contracts Verified contract registry on Taiko — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the taiko blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=contracts) # taiko.event_logs Source: https://docs.dune.com/data-catalog/evm/taiko/decoded/event-logs Smart contract event logs on Taiko — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # taiko.logs_decoded Source: https://docs.dune.com/data-catalog/evm/taiko/decoded/logs-decoded ABI-decoded event logs on Taiko — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from taiko transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/taiko/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on taiko?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for taiko on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=logs_decoded) # Taiko Decoded Overview Source: https://docs.dune.com/data-catalog/evm/taiko/decoded/overview Simplifying Taiko smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/taiko/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/taiko/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/taiko/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # taiko.traces_decoded Source: https://docs.dune.com/data-catalog/evm/taiko/decoded/traces-decoded ABI-decoded function calls on Taiko — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from taiko transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/taiko/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=traces_decoded) # Taiko Overview Source: https://docs.dune.com/data-catalog/evm/taiko/overview Taiko data on Dune ## What is Taiko? Taiko is a decentralized, Ethereum-equivalent ZK-Rollup that provides a seamless and secure scaling solution for Ethereum. Built with the Taiko Alethia Protocol, it offers full EVM compatibility while maintaining the security and decentralization of Ethereum through zero-knowledge proofs. ## Key Features * **Ethereum-Equivalent**: Full EVM compatibility with no modifications required * **ZK-Rollup Technology**: Secure scaling through zero-knowledge proofs * **Decentralized**: Maintains Ethereum's security and decentralization principles * **High Performance**: Significantly higher throughput than Ethereum mainnet * **Gas Efficiency**: Reduced transaction costs while maintaining security ## Ecosystem Highlights * Based on the Taiko Alethia Protocol for secure and efficient scaling * Full compatibility with existing Ethereum tools and infrastructure * Decentralized sequencer network for enhanced security * Support for all Ethereum smart contracts and dApps * Advanced ZK-proof generation for transaction validation ## Data on Dune > [card] [Raw Data](/data-catalog/evm/taiko/raw/blocks) > > Access to raw blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/evm/taiko/decoded/overview) > > Human-readable contract interactions and events ## Resources > [card] [Taiko Documentation](https://docs.taiko.xyz/taiko-alethia-protocol/what-is-taiko-alethia) > > Official documentation for developers building on Taiko # taiko.blocks Source: https://docs.dune.com/data-catalog/evm/taiko/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Taiko. ## Table description The `taiko.blocks` table contains information about blocks in the taiko blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM taiko.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM taiko.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM taiko.blocks
  GROUP BY 1 
  LIMIT 10`
# taiko.creation_traces Source: https://docs.dune.com/data-catalog/evm/taiko/raw/creation-traces Contract deployment records on Taiko — deployer address, factory context, and deployed bytecode. ## Table Description The `taiko.creation_traces` table contains information about the creation of smart contracts on the taiko blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the taiko blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the taiko blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM taiko.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM taiko.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM taiko.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# taiko.logs Source: https://docs.dune.com/data-catalog/evm/taiko/raw/logs Smart contract event logs on Taiko — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `taiko.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/taiko/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM taiko.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM taiko.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM taiko.logs
WHERE evt_block_number = 1000000`
# taiko.traces Source: https://docs.dune.com/data-catalog/evm/taiko/raw/traces Internal transaction traces on Taiko — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `taiko.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/taiko/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM taiko.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# taiko.transactions Source: https://docs.dune.com/data-catalog/evm/taiko/raw/transactions Every transaction on Taiko — from, to, value, gas, calldata, and receipt status. ## Table Description The `taiko.transactions` table contains information about all transactions on the taiko blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the taiko blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/taiko/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=taiko\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM taiko.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM taiko.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM taiko.transactions
ORDER BY gas_price DESC
LIMIT 10`
# Tempo Call Tables Source: https://docs.dune.com/data-catalog/evm/tempo/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Tempo network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # tempo.contracts Source: https://docs.dune.com/data-catalog/evm/tempo/decoded/contracts Verified contract registry on Tempo — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the tempo blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=contracts) # Event Logs - Tempo Source: https://docs.dune.com/data-catalog/evm/tempo/decoded/event-logs Smart contracts on Tempo emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # tempo.logs_decoded Source: https://docs.dune.com/data-catalog/evm/tempo/decoded/logs-decoded ABI-decoded event logs on Tempo — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from tempo transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/tempo/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on tempo?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for tempo on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=logs_decoded) # Tempo Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/tempo/decoded/overview Simplifying Tempo Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/tempo/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/tempo/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/tempo/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # tempo.traces_decoded Source: https://docs.dune.com/data-catalog/evm/tempo/decoded/traces-decoded ABI-decoded function calls on Tempo — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from tempo transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/tempo/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=traces_decoded) # Tempo Chain Overview Source: https://docs.dune.com/data-catalog/evm/tempo/overview Tempo blockchain data on Dune ## What is Tempo? Tempo is a Layer 1 blockchain purpose-built for stablecoin payments at scale. Incubated by Paradigm and Stripe, Tempo is built on Paradigm's high-performance Ethereum client Reth and uses Simplex BFT consensus for sub-second, deterministic finality. It is fully EVM-compatible, allowing developers to use familiar Solidity tooling like Foundry and Hardhat. Tempo is often referred to as a "stablechain" because its entire design is optimized around stablecoin-based payments rather than general-purpose computation. ## Key Features of Tempo ### **No Native Gas Token** Unlike virtually every other blockchain, Tempo has no native cryptocurrency. Gas fees are paid directly in USD-denominated stablecoins (USDC, USDT, etc.) via a Fee AMM that converts user-selected fee tokens to validator-preferred assets. This means `value` fields in transactions and traces behave differently than on other EVM chains — there is no native ETH-like asset being transferred. ### **Sub-Second Finality** Tempo produces blocks every \~0.5 seconds with deterministic, immediate finality powered by Simplex BFT consensus. Once a block is committed, it is final with no re-orgs or probabilistic finality. ### **Ultra-Low Fees** Transaction costs target under \$0.001 per transaction, with dedicated payment lanes that reserve blockspace for payment transactions to ensure low fees even during congestion. ### **TIP-20 Token Standard** Tempo extends ERC-20 with its own TIP-20 standard, adding currency identifiers (USD, EUR), gas payment capability, a 32-byte memo field for invoice IDs and metadata, reward distribution mechanisms, and compliance policy integration. TIP-20 events are indexed on Dune under `tip20_tempo.*` tables alongside standard ERC-20 tables. ### **Built-in StablecoinDEX** A native decentralized exchange optimized for stablecoin conversions and tokenized deposits. The StablecoinDEX is decoded on Dune under `tempoexchange_tempo.stablecoindex_*` tables. ## EVM Differences Impacting Data While Tempo is EVM-compatible, several design choices affect how data appears compared to standard EVM chains: * **No native token**: The `value` field in transactions and traces is not meaningful in the traditional sense since there is no native gas token. Token transfers happen via TIP-20/ERC-20 events instead. * **TIP-20 events**: In addition to standard ERC-20 `Transfer` and `Approval` events, Tempo tokens emit TIP-20-specific events like `TransferWithMemo`, `RewardDistributed`, `QuoteTokenUpdate`, `TransferPolicyUpdate`, and `SupplyCapUpdate`. * **Gas paid in stablecoins**: Gas fee fields (`gas_price`, `max_fee_per_gas`) denominate fees in stablecoins rather than a native token, which affects `gas.fees` computations. > [card] [Tempo documentation](https://docs.tempo.xyz) > > Access full documentation for Tempo, including architecture, token standards, and developer guides. ## Data Catalog > [card] [Logs](./raw/logs) > > Smart contract event logs on Tempo. > [card] [Blocks](./raw/blocks) > > Information on processed blocks, highlighting Tempo's sub-second throughput. > [card] [Transactions](./raw/transactions) > > Data on transactions, illustrating Tempo's ultra-low-cost stablecoin payments. > [card] [Decoded](./decoded/overview) > > Decoded transaction data for in-depth analysis of contract executions including the native StablecoinDEX and Uniswap deployments. # tempo.blocks Source: https://docs.dune.com/data-catalog/evm/tempo/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Tempo. ## Table description The `tempo.blocks` table contains information about blocks in the tempo blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM tempo.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM tempo.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM tempo.blocks
  GROUP BY 1 
  LIMIT 10`
# tempo.creation_traces Source: https://docs.dune.com/data-catalog/evm/tempo/raw/creation-traces Contract deployment records on Tempo — deployer address, factory context, and deployed bytecode. ## Table Description The `tempo.creation_traces` table contains information about the creation of smart contracts on the tempo blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the tempo blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the tempo blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM tempo.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM tempo.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM tempo.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# tempo.logs Source: https://docs.dune.com/data-catalog/evm/tempo/raw/logs Smart contract event logs on Tempo — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `tempo.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/tempo/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM tempo.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM tempo.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM tempo.logs
WHERE evt_block_number = 1000000`
# tempo.traces Source: https://docs.dune.com/data-catalog/evm/tempo/raw/traces Internal transaction traces on Tempo — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `tempo.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/tempo/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM tempo.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# tempo.transactions Source: https://docs.dune.com/data-catalog/evm/tempo/raw/transactions Every transaction on Tempo — from, to, value, gas, calldata, and receipt status. ## Table Description The `tempo.transactions` table contains information about all transactions on the tempo blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the tempo blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/tempo/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tempo\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM tempo.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM tempo.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM tempo.transactions
ORDER BY gas_price DESC
LIMIT 10`
# Tezos EVM Call Tables Source: https://docs.dune.com/data-catalog/evm/tezos_evm/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Tezos EVM network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # tezos_evm.contracts Source: https://docs.dune.com/data-catalog/evm/tezos_evm/decoded/contracts Verified contract registry on Tezos EVM — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the tezos_evm blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=contracts) # Event Logs - Tezos EVM Source: https://docs.dune.com/data-catalog/evm/tezos_evm/decoded/event-logs Smart contracts on Tezos EVM emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # tezos_evm.logs_decoded Source: https://docs.dune.com/data-catalog/evm/tezos_evm/decoded/logs-decoded ABI-decoded event logs on Tezos EVM — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from tezos_evm transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/tezos_evm/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on tezos_evm?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for tezos_evm on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=logs_decoded) # Tezos EVM Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/tezos_evm/decoded/overview Simplifying Tezos EVM smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/tezos_evm/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/tezos_evm/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/tezos_evm/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # tezos_evm.traces_decoded Source: https://docs.dune.com/data-catalog/evm/tezos_evm/decoded/traces-decoded ABI-decoded function calls on Tezos EVM — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from tezos_evm transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/tezos_evm/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=traces_decoded) # Tezos EVM Chain Overview Source: https://docs.dune.com/data-catalog/evm/tezos_evm/overview Tezos EVM blockchain data on Dune ## What is Tezos EVM? Tezos EVM is the EVM-compatible execution environment running as an L2 rollup on Tezos. It is an optimistic rollup that posts proofs back to Tezos L1 for settlement and uses Tezos' Smart Rollup framework for data availability. Standard Ethereum tooling (Solidity, Foundry, Hardhat, MetaMask, etc.) works without modification, while transaction costs and finality benefit from Tezos' underlying consensus. ## Key Features * **EVM compatibility**: Full bytecode compatibility — Solidity contracts deploy with no source changes; Ethereum wallets and RPC clients work out of the box. * **Tezos-backed settlement**: An optimistic rollup anchored to Tezos L1. Sequencing and DA leverage Tezos' Smart Rollup primitives, with fraud-proof–style dispute resolution on L1. * **Sub-second blocks**: The chain produces a new block every \~2 seconds on average (verified against `tezos_evm.blocks` time deltas), enabling fast UX for trading and other latency-sensitive use cases. * **Native gas token**: Gas is paid in XTZ (Tezos' native token) bridged into the EVM context, not ETH — be careful when comparing fee data with other EVM chains. ## Data on Dune > [card] [Raw Data](/data-catalog/evm/tezos_evm/raw/blocks) > > Block, transaction, log, and trace data indexed directly from Tezos EVM nodes. > [card] [Decoded Data](/data-catalog/evm/tezos_evm/decoded/overview) > > ABI-decoded contract interactions and events from verified Tezos EVM contracts. ## Resources > [card] [Tezos EVM](https://www.etherlink.com/) > > Project home page. > [card] [Tezos EVM Documentation](https://docs.etherlink.com/) > > Architecture, tooling, and developer guides. # tezos_evm.blocks Source: https://docs.dune.com/data-catalog/evm/tezos_evm/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Tezos EVM. ## Table description The `tezos_evm.blocks` table contains information about blocks in the tezos_evm blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM tezos_evm.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM tezos_evm.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM tezos_evm.blocks
  GROUP BY 1 
  LIMIT 10`
# tezos_evm.creation_traces Source: https://docs.dune.com/data-catalog/evm/tezos_evm/raw/creation-traces Contract deployment records on Tezos EVM — deployer address, factory context, and deployed bytecode. ## Table Description The `tezos_evm.creation_traces` table contains information about the creation of smart contracts on the tezos_evm blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the tezos_evm blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the tezos_evm blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM tezos_evm.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM tezos_evm.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM tezos_evm.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# tezos_evm.logs Source: https://docs.dune.com/data-catalog/evm/tezos_evm/raw/logs Smart contract event logs on Tezos EVM — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `tezos_evm.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/tezos_evm/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM tezos_evm.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM tezos_evm.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM tezos_evm.logs
WHERE evt_block_number = 1000000`
# tezos_evm.traces Source: https://docs.dune.com/data-catalog/evm/tezos_evm/raw/traces Internal transaction traces on Tezos EVM — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `tezos_evm.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/tezos_evm/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM tezos_evm.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# tezos_evm.transactions Source: https://docs.dune.com/data-catalog/evm/tezos_evm/raw/transactions Every transaction on Tezos EVM — from, to, value, gas, calldata, and receipt status. ## Table Description The `tezos_evm.transactions` table contains information about all transactions on the tezos_evm blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the tezos_evm blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/tezos_evm/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=tezos_evm\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM tezos_evm.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM tezos_evm.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM tezos_evm.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on unichain Source: https://docs.dune.com/data-catalog/evm/unichain/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Unichain — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for unichain transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on unichain. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=unichain](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=unichain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=unichain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=unichain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on unichain Source: https://docs.dune.com/data-catalog/evm/unichain/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on unichain. > [!NOTE] > > This is a cross-chain table but can be filtered for unichain transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on unichain. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=unichain](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=unichain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=unichain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=unichain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on unichain Source: https://docs.dune.com/data-catalog/evm/unichain/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on unichain. > [!NOTE] > > This is a cross-chain table but can be filtered for unichain transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on unichain. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=unichain](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=unichain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=unichain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=unichain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Unichain Call Tables Source: https://docs.dune.com/data-catalog/evm/unichain/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Unichain network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # unichain.contracts Source: https://docs.dune.com/data-catalog/evm/unichain/decoded/contracts Verified contract registry on Unichain — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the unichain blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/unichain/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # unichain.logs_decoded Source: https://docs.dune.com/data-catalog/evm/unichain/decoded/logs-decoded ABI-decoded event logs on Unichain — human-readable event names and parsed parameters from verified contracts. ## Table Description The `logs_decoded` table contains decoded logs from unichain transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches `topic0` to the event signature and the corresponding event name. On unichain, this table also exposes the full event payload via the `decoded_json` column, so you can read every event parameter directly from this table without joining the per-event tables described in [Event Logs](/data-catalog/evm/unichain/decoded/event-logs). > [!NOTE] > > **Coverage is limited to decoded contracts.** Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can [submit it for decoding](/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. > [!NOTE] > > **unichain.logs_decoded includes the `decoded_json` column.** Each row contains the fully decoded event parameters as a JSON object (parameter name → value), so you can read event payloads on this chain directly without joining the per-event tables. Because the table only contains logs from decoded contracts, `decoded_json` is populated for every row. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that emitted the event
`contract_address``varbinary`Address of the contract that emitted the event
`tx_hash``varbinary`Hash of the transaction containing this log
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`index``integer`Position of the log within the block
`signature``varbinary`Event signature hash (topic0)
`event_name``varchar`Decoded name of the event
`decoded_json``varchar`Full event parameters as a JSON object (parameter name → value). Populated for every row, since the table only contains logs from decoded contracts.
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=logs_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=logs_decoded) # Unichain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/unichain/decoded/overview Simplifying Unichain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/unichain/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/unichain/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/unichain/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # unichain.traces_decoded Source: https://docs.dune.com/data-catalog/evm/unichain/decoded/traces-decoded ABI-decoded function calls on Unichain — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from unichain transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/unichain/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=traces_decoded) # Unichain Overview Source: https://docs.dune.com/data-catalog/evm/unichain/overview Unichain data on Dune Unichain is a DeFi-native Ethereum Layer 2 solution designed to be the home for cross-chain liquidity. It aims to revolutionize DeFi by providing the fastest, most cost-effective Layer 2 network for uniting fragmented blockchain ecosystems. **Key Features:** **Instant Transactions:** Unichain launches with 1-second block times, with plans to achieve 250ms block times. This reduced latency significantly improves market efficiency by increasing arbitrage frequency and reducing MEV impact. **Cost-Effective & Decentralized:** Built to leverage Ethereum's scaling roadmap, Unichain reduces transaction costs by approximately 95% in the short term, with further reductions expected over time. While utilizing a single sequencer for efficiency, it enhances decentralization through full node block verification. **Cross-Chain Liquidity:** As part of the Superchain ecosystem, Unichain supports native interoperability across dozens of chains, making it seamless to access liquidity regardless of users' origin chains. Uniswap Labs continues to pioneer standards for seamless cross-chain interoperability. > [card] [Unichain documentation](https://docs.unichain.org/docs) > > Explore comprehensive documentation on Unichain, including technical details and developer resources. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, providing insights into interactions within the Unichain network. > [card] [Blocks](./raw/blocks) > > Information on blocks, illustrating the operational capacity and activity levels on Unichain. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the efficiency and execution of operations on Unichain. > [card] [decoded](./decoded/overview) > > Enhanced transaction data decoded for better analysis and understanding of contract executions. # unichain.blocks Source: https://docs.dune.com/data-catalog/evm/unichain/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Unichain. ## Table description The `unichain.blocks` table contains information about blocks in the unichain blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM unichain.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM unichain.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM unichain.blocks
  GROUP BY 1 
  LIMIT 10`
# unichain.creation_traces Source: https://docs.dune.com/data-catalog/evm/unichain/raw/creation-traces Contract deployment records on Unichain — deployer address, factory context, and deployed bytecode. ## Table Description The `unichain.creation_traces` table contains information about the creation of smart contracts on the unichain blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the unichain blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the unichain blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM unichain.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM unichain.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM unichain.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# unichain.logs Source: https://docs.dune.com/data-catalog/evm/unichain/raw/logs Smart contract event logs on Unichain — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `unichain.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/unichain/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM unichain.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM unichain.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM unichain.logs
WHERE evt_block_number = 1000000`
# unichain.traces Source: https://docs.dune.com/data-catalog/evm/unichain/raw/traces Internal transaction traces on Unichain — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `unichain.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/unichain/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM unichain.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# unichain.transactions Source: https://docs.dune.com/data-catalog/evm/unichain/raw/transactions Every transaction on Unichain — from, to, value, gas, calldata, and receipt status. ## Table Description The `unichain.transactions` table contains information about all transactions on the unichain blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the unichain blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/unichain/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=unichain\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM unichain.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM unichain.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM unichain.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on viction Source: https://docs.dune.com/data-catalog/evm/viction/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on viction. > [!NOTE] > > This is a cross-chain table but can be filtered for viction transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on viction. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=viction](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=viction) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=viction\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=viction\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on viction Source: https://docs.dune.com/data-catalog/evm/viction/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on viction. > [!NOTE] > > This is a cross-chain table but can be filtered for viction transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on viction. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=viction](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=viction) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=viction\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=viction\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Viction Call Tables Source: https://docs.dune.com/data-catalog/evm/viction/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Viction network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # viction.contracts Source: https://docs.dune.com/data-catalog/evm/viction/decoded/contracts Verified contract registry on Viction — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the viction blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/viction/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # viction.logs_decoded Source: https://docs.dune.com/data-catalog/evm/viction/decoded/logs-decoded ABI-decoded event logs on Viction — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from viction transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/viction/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on viction?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for viction on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=logs_decoded) # Viction Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/viction/decoded/overview Simplifying Viction Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/viction/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/viction/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/viction/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # viction.traces_decoded Source: https://docs.dune.com/data-catalog/evm/viction/decoded/traces-decoded ABI-decoded function calls on Viction — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from viction transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/viction/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=traces_decoded) # Viction Chain Overview Source: https://docs.dune.com/data-catalog/evm/viction/overview Viction blockchain data on Dune ## What is Viction? Viction is a people-centric blockchain designed to make Web3 accessible and secure for all users. With zero-gas transactions and enhanced security, Viction empowers a wide range of applications, from decentralized finance to social networks and beyond. Viction introduces the **Viction World Wide Chain**, a groundbreaking network of app chains anchored by a common settlement layer, enabling extensive scalability and a seamless user experience. ## Key Features of Viction Viction’s infrastructure centers around security, scalability, and ease of use, ensuring a smooth experience for both developers and end-users across the Web3 ecosystem. ### **Zero-Gas Transactions** Viction removes cost barriers for users, enabling frequent and effortless in-chain transactions without the need for gas fees, making it an ideal platform for consumer-facing applications. ### **App Chain Scalability** The Viction World Wide Chain supports a network of app chains that operate concurrently, anchored to Viction’s main chain. This allows each app chain to scale independently, enhancing overall network capacity while maintaining secure, frictionless interactions across chains. ### **EVM Compatibility** With support for all EVM-compatible smart contracts, Viction allows Ethereum-based developers to build seamlessly on its platform, leveraging familiar tools like Solidity, Hardhat, and Remix. ## Network Architecture Viction’s architecture is optimized for high performance, low-latency transactions, and robust security, accommodating a diverse ecosystem of decentralized applications. * **150 Masternode Network:** Viction operates through a Proof-of-Stake Voting (PoSV) consensus with 150 masternodes, providing stability and incentivizing participation. * **Interchain Connectivity via WWCP:** The Viction World Wide Chain Protocol (WWCP) facilitates seamless asset and data transfer between app chains, creating a cohesive ecosystem. ## Consensus Mechanism Viction’s PoSV consensus combines security and scalability, incentivizing active participation from token holders and ensuring an equitable validation process. * **Double Validation:** This feature enhances security by requiring each block to be validated by two independent masternodes, reducing the risk of forks and other attacks. * **Fair Voting Mechanism:** All Viction token holders have the power to vote for masternodes, supporting a community-driven governance structure that aligns with Viction’s decentralized mission. ## Security and Reliability Viction incorporates advanced security measures, including slashing and bailout options, to maintain network reliability and incentivize responsible behavior among validators. * **Randomization for Security:** Randomized validator selection further secures the network by preventing collusion and increasing resilience to targeted attacks. * **Validator Slashing and Bailout:** Misbehaving validators face slashing penalties, while a credit system allows recovery from unexpected downtime, promoting stability across the ecosystem. ## Token Economy The native **VIC** token powers Viction’s economy, supporting staking rewards, governance, and ecosystem incentives. * **Staking and Rewards:** Validators and delegators receive rewards for participating in block production and governance, encouraging ongoing involvement. * **Governance Participation:** VIC token holders can delegate their stake to preferred masternode candidates, helping shape the future of the Viction network. > [card] [Viction Documentation](https://docs.viction.xyz/) > > Explore the complete documentation for Viction, covering consensus mechanisms, security features, and developer resources. ## Data Catalog > [card] [Logs](./raw/logs) > > Access transaction logs and other activities on Viction, providing transparency into the chain’s operational data. > [card] [Blocks](./raw/blocks) > > Information on block production and finality, demonstrating Viction's capacity for high-throughput operations. > [card] [Transactions](./raw/transactions) > > Transaction data showcasing Viction’s zero-gas approach, enabling low-cost interactions across applications. > [card] [Decoded](./decoded/overview) > > Decoded transaction data, facilitating insights into Viction’s app chain interactions and economic activity. # viction.blocks Source: https://docs.dune.com/data-catalog/evm/viction/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Viction. ## Table description The `viction.blocks` table contains information about blocks in the viction blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM viction.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM viction.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM viction.blocks
  GROUP BY 1 
  LIMIT 10`
# viction.creation_traces Source: https://docs.dune.com/data-catalog/evm/viction/raw/creation-traces Contract deployment records on Viction — deployer address, factory context, and deployed bytecode. ## Table Description The `viction.creation_traces` table contains information about the creation of smart contracts on the viction blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the viction blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the viction blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM viction.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM viction.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM viction.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# viction.logs Source: https://docs.dune.com/data-catalog/evm/viction/raw/logs Smart contract event logs on Viction — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `viction.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/viction/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM viction.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM viction.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM viction.logs
WHERE evt_block_number = 1000000`
# viction.traces Source: https://docs.dune.com/data-catalog/evm/viction/raw/traces Internal transaction traces on Viction — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `viction.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/viction/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM viction.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# viction.transactions Source: https://docs.dune.com/data-catalog/evm/viction/raw/transactions Every transaction on Viction — from, to, value, gas, calldata, and receipt status. ## Table Description The `viction.transactions` table contains information about all transactions on the viction blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the viction blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/viction/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=viction\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM viction.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM viction.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM viction.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on worldchain Source: https://docs.dune.com/data-catalog/evm/worldchain/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on World Chain — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for worldchain transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on worldchain. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=worldchain](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=worldchain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=worldchain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=worldchain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on worldchain Source: https://docs.dune.com/data-catalog/evm/worldchain/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on worldchain. > [!NOTE] > > This is a cross-chain table but can be filtered for worldchain transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on worldchain. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=worldchain](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=worldchain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=worldchain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=worldchain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on worldchain Source: https://docs.dune.com/data-catalog/evm/worldchain/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on worldchain. > [!NOTE] > > This is a cross-chain table but can be filtered for worldchain transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on worldchain. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=worldchain](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=worldchain) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=worldchain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=worldchain\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # World Chain Call Tables Source: https://docs.dune.com/data-catalog/evm/worldchain/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the World Chain network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # worldchain.contracts Source: https://docs.dune.com/data-catalog/evm/worldchain/decoded/contracts Verified contract registry on World Chain — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the worldchain blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/worldchain/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # worldchain.logs_decoded Source: https://docs.dune.com/data-catalog/evm/worldchain/decoded/logs-decoded ABI-decoded event logs on World Chain — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from worldchain transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/worldchain/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on worldchain?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for worldchain on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=logs_decoded) # World Chain Decoded Overview Source: https://docs.dune.com/data-catalog/evm/worldchain/decoded/overview Simplifying World Chain smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/worldchain/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/worldchain/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/worldchain/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # worldchain.traces_decoded Source: https://docs.dune.com/data-catalog/evm/worldchain/decoded/traces-decoded ABI-decoded function calls on World Chain — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from worldchain transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/worldchain/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=traces_decoded) # World Chain Overview Source: https://docs.dune.com/data-catalog/evm/worldchain/overview World Chain data on Dune World Chain is a blockchain for humans, designed to empower developers with unique primitives and enable never-before-seen applications. By offering free gas fees to all verified humans, native mobile distribution through mini apps, and sybil resistance via World ID, World Chain is set to revolutionize the blockchain landscape for a global audience. **Human-Centric Primitives:** World Chain provides a set of powerful tools for developers: * **Free Gas for Verified Humans:** Eliminating transaction fees for verified users. * **Native Mobile Mini Apps:** Seamlessly distribute mini apps to all World App users, unlocking new opportunities for global reach and engagement. * **Sybil Resistance:** Built-in World ID technology ensures that developers can trust the unique identity of their users, reducing fraud and increasing transparency. **Scalable and Decentralized:** World Chain is **built on the Superchain**, a horizontally scalable network of OP Chains that share security, governance, and a communication layer. By leveraging the OP Stack, World Chain benefits from decentralized scalability while maintaining ease of integration for developers. **Mini Apps:** World Chain supports mini apps, allowing third-party developers to create native-like applications within World App. This opens the door to global payments, sign-in with Ethereum, and other crypto transactions. Developers can access a rapidly growing user network and monetize via WLD and USDC through mini apps. **Worldcoin and World ID:** * **Worldcoin Token (WLD):** The first token to be freely distributed globally for both utility and governance, rewarding users just for being verified as unique individuals. * **World ID:** A privacy-preserving digital identity that proves you are a real and unique person, forming the foundation for sybil-resistant applications and secure digital interactions. > [card] [World Chain documentation](https://world-id-docs-git-world-chain-docs-main-worldcoin.vercel.app/world-chain) > > Explore comprehensive documentation of World Chain, detailing its architecture, protocol, and resources for developers. ## Data Catalog > [card] [Logs](./raw/logs) > > Detailed event logs from smart contracts, providing insights into interactions within the World Chain network. > [card] [Blocks](./raw/blocks) > > Information on blocks, illustrating the operational capacity and activity levels on World Chain. > [card] [Transactions](./raw/transactions) > > Extensive transaction data, showcasing the efficiency and execution of operations on World Chain. > [card] [decoded](./decoded/overview) > > Enhanced transaction data decoded for better analysis and understanding of contract executions. # worldchain.blocks Source: https://docs.dune.com/data-catalog/evm/worldchain/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for World Chain. ## Table description The `worldchain.blocks` table contains information about blocks in the worldchain blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM worldchain.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM worldchain.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM worldchain.blocks
  GROUP BY 1 
  LIMIT 10`
# worldchain.creation_traces Source: https://docs.dune.com/data-catalog/evm/worldchain/raw/creation-traces Contract deployment records on World Chain — deployer address, factory context, and deployed bytecode. ## Table Description The `worldchain.creation_traces` table contains information about the creation of smart contracts on the worldchain blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the worldchain blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the worldchain blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM worldchain.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM worldchain.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM worldchain.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# worldchain.logs Source: https://docs.dune.com/data-catalog/evm/worldchain/raw/logs Smart contract event logs on World Chain — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `worldchain.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/worldchain/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM worldchain.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM worldchain.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM worldchain.logs
WHERE evt_block_number = 1000000`
# worldchain.traces Source: https://docs.dune.com/data-catalog/evm/worldchain/raw/traces Internal transaction traces on World Chain — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `worldchain.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/worldchain/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM worldchain.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# worldchain.transactions Source: https://docs.dune.com/data-catalog/evm/worldchain/raw/transactions Every transaction on World Chain — from, to, value, gas, calldata, and receipt status. ## Table Description The `worldchain.transactions` table contains information about all transactions on the worldchain blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the worldchain blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/worldchain/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=worldchain\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM worldchain.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM worldchain.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM worldchain.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex.trades on xlayer Source: https://docs.dune.com/data-catalog/evm/xlayer/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on xlayer. > [!NOTE] > > This is a cross-chain table but can be filtered for xlayer transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on xlayer. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=xlayer](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=xlayer) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=xlayer\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=xlayer\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # X Layer Call Tables Source: https://docs.dune.com/data-catalog/evm/xlayer/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the X Layer network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # xlayer.contracts Source: https://docs.dune.com/data-catalog/evm/xlayer/decoded/contracts Verified contract registry on X Layer — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the xlayer blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/xlayer/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # xlayer.logs_decoded Source: https://docs.dune.com/data-catalog/evm/xlayer/decoded/logs-decoded ABI-decoded event logs on X Layer — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from xlayer transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/xlayer/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on xlayer?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for xlayer on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=logs_decoded) # X Layer Decoded Overview Source: https://docs.dune.com/data-catalog/evm/xlayer/decoded/overview Simplifying X Layer smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/xlayer/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/xlayer/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/xlayer/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # xlayer.traces_decoded Source: https://docs.dune.com/data-catalog/evm/xlayer/decoded/traces-decoded ABI-decoded function calls on X Layer — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from xlayer transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/xlayer/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=traces_decoded) # X Layer Overview Source: https://docs.dune.com/data-catalog/evm/xlayer/overview X Layer data on Dune ## What is X Layer? X Layer is an Ethereum Layer 2 (L2) network, built by OKX on an enhanced Optimism Stack, designed to provide developers with a superior environment for scaling applications. It uses an optimistic rollup architecture where transactions are considered valid by default, with a 7-day challenge period for fraud proofs. ## Key Features and Advantages ### Full EVM Equivalence * Deploy existing Ethereum applications without any code modifications * Complete compatibility with standard Ethereum development tools * Seamless migration from Ethereum mainnet ### Exceptional Performance * Support for up to 5,000 transactions per second (TPS) * Negligible gas fees for cost-effective transactions * 1-second block times for fast execution * Immediate transaction finality on L2 for most operations ### Battle-Tested Security * Leverages robust optimistic rollup architecture * Inherits security guarantees of Ethereum * Cryptographic fraud proofs when needed * All L2 data published to L1, ensuring trustless and censorship-resistant operation ### Enterprise-Grade Reliability * Conductor high-availability cluster ensures sequencer redundancy * 99.9% uptime for production-ready dApps * Continuous synchronization between L2 and L1 ### Network Specifications * **Technology Stack**: Enhanced OP Stack * **Gas Token**: OKB * **Network Type**: EVM-compatible Layer 2 * **Base Chain**: Ethereum * **Consensus**: Optimistic Rollup with 7-day challenge period ### Architecture Components * **Virtual Machine**: EVM-equivalent * **Sequencer**: Trusted (op-node in sequencer mode with op-geth via Engine API) * **Bridge Service**: Monitors and syncs L1/L2 contract events * **AggLayer Integration**: ZK proof generation for cross-chain settlement > [card] [X Layer Documentation](https://web3.okx.com/xlayer/docs/developer/build-on-xlayer/about-xlayer) > > Official documentation for developers building on X Layer ## Data Catalog > [card] [Logs](./raw/logs) > > Insights into smart contract interactions through event logs > [card] [Blocks](./raw/blocks) > > Information on blocks processed on X Layer > [card] [Transactions](./raw/transactions) > > Detailed data on transactions > [card] [Decoded](./decoded/overview) > > Decoded transaction information for enhanced analysis # xlayer.blocks Source: https://docs.dune.com/data-catalog/evm/xlayer/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for X Layer. ## Table description The `xlayer.blocks` table contains information about blocks in the xlayer blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM xlayer.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM xlayer.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM xlayer.blocks
  GROUP BY 1 
  LIMIT 10`
# xlayer.creation_traces Source: https://docs.dune.com/data-catalog/evm/xlayer/raw/creation-traces Contract deployment records on X Layer — deployer address, factory context, and deployed bytecode. ## Table Description The `xlayer.creation_traces` table contains information about the creation of smart contracts on the xlayer blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the xlayer blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the xlayer blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM xlayer.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM xlayer.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM xlayer.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# xlayer.logs Source: https://docs.dune.com/data-catalog/evm/xlayer/raw/logs Smart contract event logs on X Layer — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `xlayer.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/xlayer/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM xlayer.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM xlayer.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM xlayer.logs
WHERE evt_block_number = 1000000`
# xlayer.traces Source: https://docs.dune.com/data-catalog/evm/xlayer/raw/traces Internal transaction traces on X Layer — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `xlayer.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/xlayer/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM xlayer.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# xlayer.transactions Source: https://docs.dune.com/data-catalog/evm/xlayer/raw/transactions Every transaction on X Layer — from, to, value, gas, calldata, and receipt status. ## Table Description The `xlayer.transactions` table contains information about all transactions on the xlayer blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the xlayer blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/xlayer/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=xlayer\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM xlayer.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM xlayer.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM xlayer.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on zksync Source: https://docs.dune.com/data-catalog/evm/zksync/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on zkSync — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for zksync transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on zksync. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=zksync](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=zksync) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zksync\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zksync\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on zksync Source: https://docs.dune.com/data-catalog/evm/zksync/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on zksync. > [!NOTE] > > This is a cross-chain table but can be filtered for zksync transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on zksync. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=zksync](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=zksync) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zksync\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zksync\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on zksync Source: https://docs.dune.com/data-catalog/evm/zksync/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on zksync. > [!NOTE] > > This is a cross-chain table but can be filtered for zksync transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on zksync. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=zksync](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=zksync) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zksync\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zksync\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # zkSync Call Tables Source: https://docs.dune.com/data-catalog/evm/zksync/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the zkSync network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # zksync.contracts Source: https://docs.dune.com/data-catalog/evm/zksync/decoded/contracts Verified contract registry on zkSync — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the zksync blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/zksync/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # zksync.logs_decoded Source: https://docs.dune.com/data-catalog/evm/zksync/decoded/logs-decoded ABI-decoded event logs on zkSync — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from zksync transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/zksync/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on zksync?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for zksync on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=logs_decoded) # zkSync Decoded Overview Source: https://docs.dune.com/data-catalog/evm/zksync/decoded/overview Simplifying zkSync smart contract analysis through human-readable tables. > [!WARNING] > > Due to bugs in the zkSync client, some contract creation traces are missing, and data in the code field is incomplete for certain blocks. Consequently, we cannot support factory and bytecode matching for this chain. Once the bugs are addressed, we will work to restore this functionality. We apologize for the inconvenience. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/zksync/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/zksync/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/zksync/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # zksync.traces_decoded Source: https://docs.dune.com/data-catalog/evm/zksync/decoded/traces-decoded ABI-decoded function calls on zkSync — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from zksync transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/zksync/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=traces_decoded) # zkSync Overview Source: https://docs.dune.com/data-catalog/evm/zksync/overview zkSync data on Dune zkSync is a Layer 2 scaling solution for Ethereum that utilizes zk-Rollups technology to offer low-cost, high-speed transactions with strong security guarantees. By employing zero-knowledge proofs, zkSync ensures data availability and correctness without compromising the underlying security of the Ethereum mainnet. **Enhanced Scalability and Efficiency:** zkSync enhances Ethereum's scalability by aggregating multiple transactions into a single rollup block. This process significantly reduces transaction costs and increases processing speed, making it ideal for high-throughput applications. **Robust Security and Ethereum Compatibility:** zkSync maintains a high level of security through its use of zero-knowledge proofs, which verify the validity of transactions without revealing any underlying data. Furthermore, zkSync is fully compatible with Ethereum, allowing for seamless migration of existing dApps and smart contracts. **Developer-Friendly Platform:** zkSync provides a supportive environment for developers with comprehensive tooling and resources designed to facilitate the development and deployment of Ethereum-compatible applications on its Layer 2 platform. > [card] [zkSync documentation](https://docs.zksync.io) > > Access the official documentation for zkSync, offering extensive information on its technology, platform capabilities, and development resources. ## Data Catalog > [card] [Logs](./raw/logs) > > Event logs from smart contracts, providing insights into interactions and activities on the zkSync network. > [card] [Blocks](./raw/blocks) > > Information on blocks processed using zkSync’s technology, reflecting the network's capacity for high transaction throughput. > [card] [Transactions](./raw/transactions) > > Detailed transaction data, showcasing the operational efficiency and cost-effectiveness of zkSync’s rollup solution. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and better understanding of smart contract executions on zkSync. # zksync.blocks Source: https://docs.dune.com/data-catalog/evm/zksync/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for zkSync. ## Table description The `zksync.blocks` table contains information about blocks in the zksync blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM zksync.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM zksync.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM zksync.blocks
  GROUP BY 1 
  LIMIT 10`
# zksync.creation_traces Source: https://docs.dune.com/data-catalog/evm/zksync/raw/creation-traces Contract deployment records on zkSync — deployer address, factory context, and deployed bytecode. ## Table Description The `zksync.creation_traces` table contains information about the creation of smart contracts on the zksync blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the zksync blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the zksync blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM zksync.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM zksync.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM zksync.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# zksync.logs Source: https://docs.dune.com/data-catalog/evm/zksync/raw/logs Smart contract event logs on zkSync — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `zksync.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/zksync/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM zksync.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM zksync.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM zksync.logs
WHERE evt_block_number = 1000000`
# zksync.traces Source: https://docs.dune.com/data-catalog/evm/zksync/raw/traces Internal transaction traces on zkSync — cross-contract calls, delegate calls, and value transfers with full call stack context. > [!WARNING] > > You may see duplicate records in the `traces` table for the zkSync chain. This is not a bug, but a result of trace calls appearing twice within the same transaction. These consecutive calls—an outer and an inner call—are identical except for their gas values. They share the same `from`, `to`, `input`, `output`, `success`, and `value` fields. ## Table Description The `zksync.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/zksync/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM zksync.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# zksync.transactions Source: https://docs.dune.com/data-catalog/evm/zksync/raw/transactions Every transaction on zkSync — from, to, value, gas, calldata, and receipt status. ## Table Description The `zksync.transactions` table contains information about all transactions on the zksync blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the zksync blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/zksync/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zksync\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM zksync.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM zksync.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM zksync.transactions
ORDER BY gas_price DESC
LIMIT 10`
# dex_aggregator.trades on zora Source: https://docs.dune.com/data-catalog/evm/zora/curated-data/dex/dex-aggregator-trades DEX aggregator swaps on Zora — trades routed through aggregators like 1inch, Paraswap, and CoW Swap with pricing and routing details. > [!NOTE] > > This table is a cross-chain table but can be filtered for zora transactions. ## Table Description The `dex_aggregator.trades` table captures high-level data on trades executed via decentralized exchange (DEX) aggregators. These aggregators aggregate liquidity from multiple DEXs to provide users with the best possible trade execution. Unlike the `dex.trades` table, which records each intermediary step of a trade, `dex_aggregator.trades` condenses the trade data to reflect the user's intended trade, presenting it as a single entry. ## Functional Overview Users can expect the `dex_aggregator.trades` table to provide a high-level view of DEX trades facilitated by aggregators. This table simplifies trade records by showing a single entry for trades that may involve multiple DEXs and liquidity pools. For instance, a user might initiate a trade to swap USDC for PEPE via a DEX aggregator. The aggregator might route this trade through several liquidity pools such as WETH-USDC and WETH-PEPE, but `dex_aggregator.trades` will record it as a single USDC → PEPE trade. Complimentary to `dex_aggregator.trades` is the `dex.trades` table, where detailed trade executions are recorded. This table captures the granular steps of each trade, including interactions with different liquidity pools. The volume routed through aggregators is also recorded in the `dex.trades` table. One row in `dex_aggregator.trades` corresponds to one or more rows in `dex.trades`, providing a comprehensive view of the detailed execution path that aggregated trades take. ## Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on zora. [https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=zora](https://dune.com/embeds/3762297/6327689?blockchain_t6c1ea=zora) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`Aggregator project name (e.g., 1inch, paraswap)
`version``varchar`Version of the aggregator protocol
`block_date``timestamp`Date of the block
`block_month``timestamp`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`trace_address``array(bigint)`Path of the trace within the call tree
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zora\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zora\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex_aggregator) # dex.trades on zora Source: https://docs.dune.com/data-catalog/evm/zora/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on zora. > [!NOTE] > > This is a cross-chain table but can be filtered for zora transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on zora. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=zora](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=zora) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zora\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zora\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # NFT.trades on zora Source: https://docs.dune.com/data-catalog/evm/zora/curated-data/nft/nft-trades The `nft.trades` table captures detailed data on NFT marketplaces, recording all trade events across various protocols on zora. > [!NOTE] > > This is a cross-chain table but can be filtered for zora transactions. ## Table Description The `nft.trades` table on Dune Analytics is central to capturing and analyzing Non-Fungible Token (NFT) transactions across various marketplaces. It is a pivotal resource for dissecting the intricacies of NFT trade execution, market behavior, and collector activity within the NFT space. ## Usage The `nft.trades` table serves as an essential tool for delving into the NFT market's complexities. It offers a detailed snapshot of each NFT transaction, encompassing data points such as sale price, transaction timestamp, buyer and seller addresses, and the specific NFT assets involved. This table allows analysts to explore trends in NFT valuation, trading volumes, and marketplace dynamics, providing insights into the evolving landscape of digital collectibles and art. ## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on zora. [https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=zora](https://dune.com/embeds/3796770/6383301?blockchain_t6c1ea=zora) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, polygon)
`project``varchar`NFT marketplace name (e.g., opensea, blur)
`version``varchar`Version of the marketplace protocol
`block_date``date`Date of the block (UTC)
`block_month``date`Month of the block (for partitioning)
`block_time``timestamp`Timestamp of the block containing this trade
`token_id``uint256`Token ID of the NFT traded
`collection``varchar`Name of the NFT collection
`amount_usd``double`Trade value in USD
`token_standard``varchar`Token standard (ERC-721, ERC-1155)
`trade_type``varchar`Type of trade (buy, sell, offer accepted)
`number_of_items``uint256`Number of items in the trade
`trade_category``varchar`Category of the trade
`evt_type``varchar`Event type
`seller``varbinary`Address of the seller
`buyer``varbinary`Address of the buyer
`amount_original``double`Trade amount in the payment currency
`amount_raw``uint256`Raw trade amount (no decimal adjustment)
`currency_symbol``varchar`Symbol of the payment currency
`currency_contract``varbinary`Contract address of the payment currency
`nft_contract_address``varbinary`Contract address of the NFT collection
`project_contract_address``varbinary`Address of the marketplace contract
`aggregator_name``varchar`Name of the aggregator (if trade was via aggregator)
`aggregator_address``varbinary`Address of the aggregator contract
`tx_hash``varbinary`Hash of the transaction containing this trade
`block_number``bigint`Block number containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`platform_fee_amount_raw``uint256`Raw platform fee amount
`platform_fee_amount``double`Decimal-adjusted platform fee amount
`platform_fee_amount_usd``double`Platform fee in USD
`platform_fee_percentage``double`Platform fee as a percentage of the trade
`royalty_fee_receive_address``varbinary`Address receiving the royalty fee
`royalty_fee_currency_symbol``varchar`Symbol of the royalty fee currency
`royalty_fee_amount_raw``uint256`Raw royalty fee amount
`royalty_fee_amount``double`Decimal-adjusted royalty fee amount
`royalty_fee_amount_usd``double`Royalty fee in USD
`royalty_fee_percentage``double`Royalty fee as a percentage of the trade
`unique_trade_id``varchar`Unique identifier for the trade
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zora\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=zora\&table_name_t6c1ea=trades\&table_schema_t6c1ea=nft) # Zora Call Tables Source: https://docs.dune.com/data-catalog/evm/zora/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Zora network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # zora.contracts Source: https://docs.dune.com/data-catalog/evm/zora/decoded/contracts Verified contract registry on Zora — contract name, namespace, ABI, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the zora blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=contracts) # Event Logs Source: https://docs.dune.com/data-catalog/evm/zora/decoded/event-logs Smart Contracts emit event logs when certain predefined actions are completed. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # zora.logs_decoded Source: https://docs.dune.com/data-catalog/evm/zora/decoded/logs-decoded ABI-decoded event logs on Zora — human-readable event names and parsed parameters from verified contracts. \## Table Description The \`logs_decoded\` table contains decoded logs from zora transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/zora/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on zora?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for zora on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=logs_decoded) # Zora Decoded Overview Source: https://docs.dune.com/data-catalog/evm/zora/decoded/overview Simplifying Zora smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/zora/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/zora/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/zora/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # zora.traces_decoded Source: https://docs.dune.com/data-catalog/evm/zora/decoded/traces-decoded ABI-decoded function calls on Zora — parsed function names, inputs, and outputs from verified contracts. ## Table Description The `traces_decoded` table contains decoded traces from zora transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/zora/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=traces_decoded) # Zora Overview Source: https://docs.dune.com/data-catalog/evm/zora/overview Zora data on Dune > [!WARNING] > > Starting from the 8th of October 2025 Dune is not live ingesting and indexing Zora data. The historical data of the chain will remain available to be used. Zora is a blockchain platform designed specifically to support digital creators and the broader creative economy. Leveraging the power of decentralized technology, Zora Chain facilitates the minting, buying, and trading of digital assets, including NFTs, with enhanced scalability and reduced transaction costs. Zora is based on the OP stack and uses Ether as its native currency. **Creative Economy Focused:** Zora Chain is built to cater to the needs of digital artists, musicians, and other creators, providing them with a blockchain infrastructure that supports direct and fair monetization of their work. **Low-Cost Transactions:** By optimizing transaction efficiency, Zora Chain minimizes the costs associated with minting and trading digital assets, making it more accessible for creators and collectors alike. **Scalability and Performance:** Designed for high throughput, Zora Chain ensures that the growing demand for NFTs and digital goods doesn't compromise performance, enabling a seamless user experience. > [card] [Zora documentation](https://docs.zora.co) > > Explore comprehensive documentation for Zora Chain, including detailed guides on its architecture, features, and how creators can leverage the platform for their digital assets. ## Data Catalog > [card] [Logs](./raw/logs) > > Event logs from smart contracts, offering insights into interactions and activities within the Zora Chain network. > [card] [Blocks](./raw/blocks) > > Data on blocks processed on Zora Chain, reflects the network's capacity for handling large volumes of transactions efficiently. > [card] [Transactions](./raw/transactions) > > Comprehensive transaction data, showcasing the operational efficiency and reduced costs achieved through Zora Chain’s optimized blockchain solutions. > [card] [decoded](./decoded/overview) > > Decoded transaction data for easier analysis and a better understanding of smart contract executions on Zora. # zora.blocks Source: https://docs.dune.com/data-catalog/evm/zora/raw/blocks Block headers, timestamps, gas limits, base fees, and validator/miner data for Zora. ## Table description The `zora.blocks` table contains information about blocks in the zora blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM zora.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM zora.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM zora.blocks
  GROUP BY 1 
  LIMIT 10`
# zora.creation_traces Source: https://docs.dune.com/data-catalog/evm/zora/raw/creation-traces Contract deployment records on Zora — deployer address, factory context, and deployed bytecode. ## Table Description The `zora.creation_traces` table contains information about the creation of smart contracts on the zora blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the zora blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the zora blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM zora.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM zora.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM zora.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# zora.logs Source: https://docs.dune.com/data-catalog/evm/zora/raw/logs Smart contract event logs on Zora — indexed topics and data fields from token transfers, swaps, and protocol actions. ## Table Description The `zora.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/zora/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM zora.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM zora.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM zora.logs
WHERE evt_block_number = 1000000`
# zora.traces Source: https://docs.dune.com/data-catalog/evm/zora/raw/traces Internal transaction traces on Zora — cross-contract calls, delegate calls, and value transfers with full call stack context. ## Table Description The `zora.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/zora/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM zora.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# zora.transactions Source: https://docs.dune.com/data-catalog/evm/zora/raw/transactions Every transaction on Zora — from, to, value, gas, calldata, and receipt status. ## Table Description The `zora.transactions` table contains information about all transactions on the zora blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the zora blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/zora/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=zora\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM zora.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM zora.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM zora.transactions
ORDER BY gas_price DESC
LIMIT 10`
# flow.cadence_blocks Source: https://docs.dune.com/data-catalog/flow/cadence/blocks Flow Cadence block data — block details specific to Flow's Cadence execution environment. ## Table Description The `flow.cadence_blocks` table contains block-level data from the Flow Cadence blockchain including block headers, timestamps, and network fee information. ## Column Descriptions | Column | Type | Description | | - | - | - | | block_date | date | The date of the block | | timestamp | timestamp | Timestamp when the block was created | | block_hash | string | Unique hash identifier for the block | | block_height | bigint | The block number/height | | parent_block_hash | string | Hash of the parent block | | slot | bigint | Slot number | | difficulty | decimal(38,9) | Block difficulty | | total_difficulty | decimal(38,9) | Cumulative difficulty | | network_fee_used | decimal(38,9) | Network fee consumed in this block | | network_fee_limit | decimal(38,9) | Maximum network fee limit for the block | | chain_specific | string | Chain-specific metadata in JSON format | | \_updated_at | timestamp | Timestamp when the record was last updated | | \_ingested_at | timestamp | Timestamp when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_blocks) # flow.cadence_contracts Source: https://docs.dune.com/data-catalog/flow/cadence/contracts Flow Cadence contract deployments — contract code and account bindings. ## Table Description The `flow.cadence_contracts` table contains Cadence smart contract deployment data on the Flow blockchain including contract code and metadata. ## Column Descriptions | Column | Type | Description | | - | - | - | | block_date | date | The date of the contract deployment | | timestamp | timestamp | Timestamp when the contract was deployed | | transaction_hash | string | Hash of the deployment transaction | | contract_address | string | Address where the contract is deployed | | valid_from | long | Block height from which the contract is valid | | code | binary | The contract bytecode | | name | string | Name of the contract | | chain_specific | string | Chain-specific metadata in JSON format | | \_updated_at | timestamp | Timestamp when the record was last updated | | \_ingested_at | timestamp | Timestamp when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_contracts) # flow.cadence_events Source: https://docs.dune.com/data-catalog/flow/cadence/events Flow Cadence events — structured events emitted by Cadence smart contracts. ## Table Description The `flow.cadence_events` table contains event logs emitted by Cadence smart contracts on the Flow blockchain. ## Column Descriptions | Column | Type | Description | | - | - | - | | block_date | date | The date of the event | | timestamp | timestamp | Timestamp when the event was emitted | | block_height | bigint | The block number containing this event | | block_hash | string | Hash of the block containing this event | | transaction_hash | string | Hash of the transaction that emitted this event | | log_index | bigint | Index of the event within the transaction | | topics | array\ | Array of indexed event topics | | data | string | Event data payload | | chain_specific | string | Chain-specific metadata in JSON format | | \_updated_at | timestamp | Timestamp when the record was last updated | | \_ingested_at | timestamp | Timestamp when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_events) # flow.cadence_native_token_balances Source: https://docs.dune.com/data-catalog/flow/cadence/native-token-balances Flow native FLOW token balances — account holdings over time. ## Table Description The `flow.cadence_native_token_balances` table contains FLOW native token balance snapshots for addresses on the Flow Cadence blockchain. ## Column Descriptions | Column | Type | Description | | - | - | - | | block_date | date | The date of the balance snapshot | | timestamp | timestamp | Timestamp of the balance snapshot | | address | string | Address holding the FLOW tokens | | amount | decimal(38,9) | Balance amount in FLOW | | transaction_hash | string | Hash of the transaction that affected this balance | | block_height | bigint | Block height at the time of the snapshot | | block_hash | string | Hash of the block at the time of the snapshot | | chain_specific | string | Chain-specific metadata in JSON format | | \_updated_at | timestamp | Timestamp when the record was last updated | | \_ingested_at | timestamp | Timestamp when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_native_token_balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_native_token_balances) # flow.cadence_participations Source: https://docs.dune.com/data-catalog/flow/cadence/participations Flow network participations — staking, delegation, and epoch participation records. ## Table Description The `flow.cadence_participations` table contains staking and validator participation data on the Flow Cadence blockchain. This table tracks delegator participations in the Flow staking system. ## Column Descriptions | Column | Type | Description | | - | - | - | | block_date | date | The date of the participation record | | timestamp | timestamp | Timestamp of the participation event | | delegator_id | string | Unique identifier for the delegator | | node_id | string | Identifier of the validator node | | amount | decimal | Amount of FLOW tokens staked | | action | string | Type of participation action (stake, unstake, withdraw) | | transaction_hash | string | Hash of the transaction | | chain_specific | string | Chain-specific metadata in JSON format | | \_updated_at | timestamp | Timestamp when the record was last updated | | \_ingested_at | timestamp | Timestamp when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_participations](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_participations) # flow.cadence_token_collections Source: https://docs.dune.com/data-catalog/flow/cadence/token-collections Flow Cadence NFT collections — collection metadata and token types. ## Table Description The `flow.cadence_token_collections` table contains token collection metadata for NFT and fungible token contracts on the Flow Cadence blockchain. ## Column Descriptions | Column | Type | Description | | - | - | - | | block_date | date | The date of the collection record | | timestamp | timestamp | Timestamp when the collection was created/updated | | transaction_hash | string | Hash of the transaction that created/updated the collection | | contract_address | string | Address of the token contract | | token_id | string | Identifier for the token collection | | symbol | string | Symbol of the token collection | | name | string | Name of the token collection | | description | string | Description of the collection | | url | string | URL to the collection metadata | | decimals | decimal(38,9) | Number of decimals for fungible tokens | | total_supply | decimal(38,9) | Total supply of tokens in the collection | | category | string | Category of the token (NFT, FT, etc.) | | chain_specific | string | Chain-specific metadata in JSON format | | \_updated_at | timestamp | Timestamp when the record was last updated | | \_ingested_at | timestamp | Timestamp when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_token_collections](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_token_collections) # flow.cadence_token_transfers Source: https://docs.dune.com/data-catalog/flow/cadence/token-transfers Flow Cadence token transfers — fungible and NFT movement events. ## Table Description The `flow.cadence_token_transfers` table contains token transfer events on the Flow Cadence blockchain including NFT and fungible token transfers. ## Column Descriptions | Column | Type | Description | | - | - | - | | block_date | date | The date of the transfer | | timestamp | timestamp | Timestamp when the transfer occurred | | block_height | bigint | The block number containing this transfer | | block_hash | string | Hash of the block containing this transfer | | transaction_hash | string | Hash of the transaction containing this transfer | | contract_address | string | Address of the token contract | | token_id | string | Identifier of the token being transferred | | from | string | Address of the sender | | to | string | Address of the recipient | | amount | decimal(38,9) | Amount of tokens transferred | | chain_specific | string | Chain-specific metadata in JSON format | | \_updated_at | timestamp | Timestamp when the record was last updated | | \_ingested_at | timestamp | Timestamp when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_token_transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_token_transfers) # flow.cadence_tokens Source: https://docs.dune.com/data-catalog/flow/cadence/tokens Flow Cadence token metadata — fungible and non-fungible token type definitions. ## Table Description The `flow.cadence_tokens` table contains token metadata for NFTs and fungible tokens on the Flow Cadence blockchain. ## Column Descriptions | Column | Type | Description | | - | - | - | | block_date | date | The date of the token record | | timestamp | timestamp | Timestamp when the token was created/updated | | token_id | string | Unique identifier for the token | | contract_address | string | Address of the token contract | | name | string | Name of the token | | description | string | Description of the token | | content_url | string | URL to the token content/media | | chain_specific | string | Chain-specific metadata in JSON format | | \_updated_at | timestamp | Timestamp when the record was last updated | | \_ingested_at | timestamp | Timestamp when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_tokens](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_tokens) # flow.cadence_transaction_receipts Source: https://docs.dune.com/data-catalog/flow/cadence/transaction-receipts Flow Cadence transaction receipts — execution results, events, and status. ## Table Description The `flow.cadence_transaction_receipts` table contains transaction receipt data from the Flow Cadence blockchain including execution status and fee information. ## Column Descriptions | Column | Type | Description | | - | - | - | | block_date | date | The date of the transaction | | timestamp | timestamp | Timestamp when the transaction was executed | | block_height | bigint | The block number containing this transaction | | block_hash | string | Hash of the block containing this transaction | | transaction_hash | string | Unique hash identifier for the transaction | | success | boolean | Whether the transaction executed successfully | | status_message | string | Status message or error description | | network_fee_used | decimal(38,9) | Actual network fee consumed | | cost_per_network_fee | decimal(38,9) | Cost per unit of network fee | | chain_specific | string | Chain-specific metadata in JSON format | | \_updated_at | timestamp | Timestamp when the record was last updated | | \_ingested_at | timestamp | Timestamp when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_transaction_receipts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_transaction_receipts) # flow.cadence_transactions Source: https://docs.dune.com/data-catalog/flow/cadence/transactions Flow Cadence transactions — script and transaction interactions with the Cadence runtime. ## Table Description The `flow.cadence_transactions` table contains transaction data from the Flow Cadence blockchain including sender, receiver, and transaction payload information. ## Column Descriptions | Column | Type | Description | | - | - | - | | block_date | date | The date of the transaction | | timestamp | timestamp | Timestamp when the transaction was executed | | block_height | bigint | The block number containing this transaction | | block_hash | string | Hash of the block containing this transaction | | transaction_hash | string | Unique hash identifier for the transaction | | transaction_index | bigint | Index of the transaction within the block | | from | string | Address of the transaction sender | | to | string | Address of the transaction recipient | | sequence_number | bigint | Sequence number of the transaction | | data | string | Transaction payload data | | network_fee_limit | decimal(38,9) | Maximum network fee for this transaction | | max_network_fee_unit_price | decimal(38,9) | Maximum price per unit of network fee | | chain_specific | string | Chain-specific metadata in JSON format | | \_updated_at | timestamp | Timestamp when the record was last updated | | \_ingested_at | timestamp | Timestamp when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=cadence_transactions) # dex.trades on flow Source: https://docs.dune.com/data-catalog/flow/curated-data/dex/dex-trades The `dex.trades` table captures detailed data on decentralized exchange (DEX) trades, recording all raw trade events across various protocols on flow. > [!NOTE] > > This is a cross-chain table but can be filtered for flow transactions. ## Table Description The `dex.trades` table captures detailed data on trades executed via decentralized exchanges (DEXs). This table captures all raw trade events that happen across all liqudity pools. It provides a comprehensive view of the entire trade execution process, detailing the specific paths and liquidity sources utilized. ## Functional Overview The `dex.trades` table provides an in-depth view of trades on decentralized exchanges like Uniswap or Curve. This table includes entries for each segment of a trade that passes through different liquidity pools, as well as single-step trades. For example, a user may initiate a trade to swap USDC for PEPE. If this trade is executed through multiple liquidity pools, such as USDC-WETH and WETH-PEPE, the `dex.trades` table will record each segment of the trade as a separate entry. Conversely, a single-step trade, such as directly swapping USDC for ETH, will be recorded as a single entry. This detailed approach allows for granular analysis of trade execution paths, enabling users to:
  • **Analyze Liquidity Sources:** Understand which liquidity pools are used and how they interact in both single-step and multi-step trades.
  • **Track Trade Execution Paths:** Follow the exact route a trade takes across different DEXs and liquidity pools
  • **Assess Slippage and Execution Quality:** Evaluate the impact of each step on the overall trade execution, including slippage and price changes.
  • **Monitor Market Dynamics:** Gain insights into the behavior and dynamics of different liquidity pools and DEXs over time.
## Table Coverage The following table shows which projects and versions of those projects are covered in the `dex.trades` table on flow. [https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=flow](https://dune.com/embeds/3740060/6289929?blockchain_t6c1ea=flow) ## Column Descriptions
ColumnTypeDescription
`blockchain``varchar`Blockchain network (e.g., ethereum, arbitrum)
`project``varchar`DEX project name (e.g., uniswap, curve)
`version``varchar`Version of the DEX protocol
`block_month``date`Month of the block (for partitioning)
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trade
`block_number``bigint`Block number containing this trade
`token_bought_symbol``varchar`Symbol of the token bought
`token_sold_symbol``varchar`Symbol of the token sold
`token_pair``varchar`Token pair (e.g., WETH-USDC)
`token_bought_amount``double`Decimal-adjusted amount of the token bought
`token_sold_amount``double`Decimal-adjusted amount of the token sold
`token_bought_amount_raw``uint256`Raw amount of the token bought (no decimal adjustment)
`token_sold_amount_raw``uint256`Raw amount of the token sold (no decimal adjustment)
`amount_usd``double`Trade value in USD
`token_bought_address``varbinary`Contract address of the token bought
`token_sold_address``varbinary`Contract address of the token sold
`taker``varbinary`Address of the trade taker
`maker``varbinary`Address of the trade maker (liquidity provider)
`project_contract_address``varbinary`Address of the DEX contract (pool/router)
`tx_hash``varbinary`Hash of the transaction containing this trade
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`evt_index``bigint`Index of the event log within the transaction
## Table Sample [https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=flow\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex](https://dune.com/embeds/3793075/6376888?param_col_t6c1ea=blockchain\¶m_value_t6c1ea=flow\&table_name_t6c1ea=trades\&table_schema_t6c1ea=dex) # Flow EVM Call Tables Source: https://docs.dune.com/data-catalog/flow/decoded/call-tables On Dune, we parse all message calls and transactions made to smart contracts on the Flow EVM network in their own tables. ## Overview On Dune, we parse all message calls and transactions made to smart contracts in their own tables. This allows us to isolate the logic of a specific smart contract and analyze how it interacts with other smart contracts. The data is stored in the format: `[projectname_blockchain].[contractName]_call_[functionName]` This allows us to analyze how a specific function is used in a smart contract, and how often it is called, as well as how it interacts with other smart contracts. Call tables always originate from the `traces` table, which contains all the transactions and message calls on the Ethereum network. We parse the `data` field of the `traces` table to decode the function call and parameters. ## Decoding When a transaction is sent to a smart contract on the Ethereum network, it contains a `data` field. This `data` field is the encoded function call and parameters. Dune decodes this data and stores it in the corresponding table. For example, when a transaction is sent to the [Uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) contract on the Ethereum network, Dune will decode the `data` field and store it in the table: `uniswap_v3_ethereum.Factory_call_createPool` [https://dune.com/embeds/3456944/5809273](https://dune.com/embeds/3456944/5809273) ## Multiple Instances For a contract where multiple instances exist, we will decode all calls to all instances of this smart contract into one table. If there are transactions calling the `swap` function of any instance of the [Uniswap v3 pair](https://etherscan.io/address/0x8f8ef111b67c04eb1641f5ff19ee54cda062f163#writeContract) contract, we will decode this data into the table `uniswap_v3_ethereum.Pair_call_swap`. The `pair` contract is a template contract and there are many instances of it, each with its own address. The column `contract_address` will indicate the address of the instance of the pair contract that was called. [https://dune.com/embeds/3456960/5809303](https://dune.com/embeds/3456960/5809303) ## Common misconceptions One thing to keep in mind here is that [web3.js](https://web3js.readthedocs.io), [web3.py](https://web3py.readthedocs.io/en/stable) and all other methods of (locally) calling a `pure`, `read`, or `constant` function do not broadcast or publish anything on the blockchain and are therefore not recorded in Dune. However, if one of these functions is invoked by another smart contract in the context of a transaction, this will be broadcast on the chain and therefore accessible in Dune. In short: **State data stored in the memory of a smart contract is not available on Dune!** A good example of this is the function `decimals` of the [erc20 token contract](https://etherscan.io/token/0x1f9840a85d5af5bf1d1762f925bdaddc4201f984#readContract) `Uni` which is a `constant` state variable that is able to be accessed through an automatically created "[getter function](https://docs.soliditylang.org/en/v0.7.4/contracts.html#getter-functions)". Should a smart contract invoke this function in the context of transaction, this message call will be recorded in the Dune table [`uniswap."UNI_call_decimals"`](https://dune.com/queries/741354). This is in contrast to anyone calling this function locally using web3.py/web3.js or using the Etherscan frontend to access this state. These local calls are not recorded in Dune. ## Further Reading > [card] [What is the difference between a transaction and a call?](https://ethereum.stackexchange.com/questions/765/what-is-the-difference-between-a-transaction-and-a-call) > [card] [Soliditylang.org documentation](https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility) > [card] [How Calldata is Encoded](https://degatchi.com/articles/reading-raw-evm-calldata) # flow.contracts Source: https://docs.dune.com/data-catalog/flow/decoded/contracts Verified contract registry on Flow — contract name, code, and deployment metadata. ## Table Description This table contains information about the contracts Dune has decoded on the flow blockchain. ## Column Descriptions
ColumnTypeDescription
`abi_id``varchar`Unique identifier for the ABI
`abi``array(varchar)`Contract ABI (Application Binary Interface)
`address``varbinary`Contract address
`from``varbinary`Address that deployed the contract
`code``varbinary`Deployed bytecode of the contract
`name``varchar`Name of the contract
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`dynamic``boolean`Whether the contract was dynamically detected
`base``boolean`Whether this is the base contract submission
`factory``boolean`Whether this contract is a factory contract
`detection_source``varchar`How the contract was detected (manual, factory, etc.)
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=contracts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=contracts) # flow.event_logs Source: https://docs.dune.com/data-catalog/flow/decoded/event-logs Smart contract event logs on Flow — indexed topics and data fields emitted during transaction execution. ## Overview Smart contracts emit event logs when certain predefined actions are completed. The emitted event logs are stored on the blockchain and are publicly accessible. Event logs are an important tool for smart contract developers to communicate with the outside world, as well as for data analysts to keep track of what happens inside of a smart contract. For example, the ERC20 standard defines the `Transfer` event, which is emitted every time a token transfer occurs. The event log contains the sender, the recipient and the amount of tokens transferred. ```solidity theme={null} event Transfer(address indexed from, address indexed to, uint256 value); ``` Decoded event logs always originate from the fields `topic0`, `topic1`, `topic2`, `topic3` and `data` in the `logs` table. ## Event Logs in Dune In Dune, we store all event logs of decoded smart contracts in separate tables. The structure published in these logs is predefined by the developer of the smart contract, the content is dynamically created during the transaction. Logs are useful for monitoring, alerting and in general keeping track of what happens inside of a smart contract. Logs are your best friend as a data analyst since they reliably present you with data that is intended to be analyzed post factum. If you ever want to see which logs *can* be emitted by a smart contract, you can simply search for the keyword `emit` in the source code of the smart contract. We will decode all event logs for smart contracts into tables named accordingly to this schema: `[projectname_blockchain].[contractName]_evt_[eventName]` ## Example Let's take the [uniswap v3 factory](https://etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984#code) as an example and look at the event that gets emitted upon the creation of a new pool. The event is called `PoolCreated` and gets emitted every time somebody successfully deploys a new Uniswap V3 pool by calling the function `createPool`. The event will readily give us information like the tokens in the pool, the fee tier of this pool and the tick spacing. In Etherscan, you can easily look at the event logs of transaction by opening the [logs tab](https://etherscan.io/tx/0xdeb368592f3de0f2840754bce61d2c3f29cdb3407c63c699052e68a854c71eaa#eventlog). In Dune, this particular event will be stored in the table: `uniswap_v3_ethereum.Factory_evt_PoolCreated` [https://dune.com/embeds/3456741/5808942](https://dune.com/embeds/3456741/5808942) ## Multiple Instances If there is multiple instances of a contract we will collect all event logs across all instances of this smart contract in one table. For example, all uniswap v3 pool `swap` events (on ethereum) are stored in the table: `uniswap_v3_ethereum.Pair_evt_Swap` The column `contract_address` indicates as to which smart contract emitted this event. [https://dune.com/embeds/3456754/5808958](https://dune.com/embeds/3456754/5808958) ## Further Reading * [Understanding event logs on the Ethereum blockchain](https://medium.com/mycrypto/understanding-event-logs-on-the-ethereum-blockchain-f4ae7ba50378) * [Everything You Ever Wanted to Know About Events and Logs on Ethereum](https://medium.com/linum-labs/everything-you-ever-wanted-to-know-about-events-and-logs-on-ethereum-fec84ea7d0a5) > [card] [Submit any contract for decoding](/web-app/decoding/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/ethereum/decoded/contracts) # flow.logs_decoded Source: https://docs.dune.com/data-catalog/flow/decoded/logs-decoded ABI-decoded Flow event logs — parsed event names and parameters. \## Table Description The \`logs_decoded\` table contains decoded logs from flow transactions — that is, only logs emitted by contracts whose ABI has been registered with Dune. The table matches \`topic0\` to the event signature and the corresponding event name. The table does not contain the full event data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in \[Event Logs]\(/data-catalog/evm/flow/decoded/event-logs). \> \[!NOTE] \> \> \*\*Coverage is limited to decoded contracts.\*\* Logs from contracts whose ABI has not been submitted to Dune do not appear in this table at all (the rows are missing, not just empty). If a contract you care about is not decoded yet, anyone can \[submit it for decoding]\(/web-app/decoding/decoding-contracts) — once accepted, its logs start showing up here automatically. This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. \> \[!TIP] \> \> \*\*Need \`decoded_json\` on flow?\*\* Some chains expose a \`decoded_json\` column on \`logs_decoded\` that contains the full event payload as JSON, removing the need to join the per-event tables. We can enable it for flow on request — reach out via the \[Dune enterprise contact form]\(https\://dune.com/enterprise#contact-form). \## Column Descriptions \\\\\\\\ \\\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\ \\\\\\\
Column\Type\Description\
\`block_date\`\\`date\`\Date of the block (UTC)\
\`block_time\`\\`timestamp\`\Timestamp of the block containing this log\
\`block_number\`\\`bigint\`\Block number containing this log\
\`namespace\`\\`varchar\`\Project namespace (e.g., uniswap_v3)\
\`contract_name\`\\`varchar\`\Name of the contract that emitted the event\
\`contract_address\`\\`varbinary\`\Address of the contract that emitted the event\
\`tx_hash\`\\`varbinary\`\Hash of the transaction containing this log\
\`tx_from\`\\`varbinary\`\Address that initiated the transaction\
\`tx_to\`\\`varbinary\`\Address the transaction was sent to\
\`tx_index\`\\`integer\`\Position of the transaction within the block\
\`index\`\\`integer\`\Position of the log within the block\
\`signature\`\\`varbinary\`\Event signature hash (topic0)\
\`event_name\`\\`varchar\`\Decoded name of the event\
\`created_at\`\\`timestamp\`\When this record was created in Dune\
\## Table Sample \[https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=logs_decoded]\(https\://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=logs_decoded) # Flow EVM Decoded Overview Source: https://docs.dune.com/data-catalog/flow/decoded/overview Simplifying Flow EVM smart contract analysis through human-readable tables. ## Overview of Dune's Decoded Data Approach Dune uses the ABI (Application Binary Interface) of smart contracts to decode blockchain transactions into structured tables. Each event log and function call from the ABI are parsed into their own tables. This decoding process transforms the raw, encoded data on the blockchain into human-readable tables, simplifying the analysis of smart contract data. Dune's decoded data approach offers several benefits:
  • **Enhanced Readability:** The decoded data tables provide a clear and intuitive representation of smart contract activities.
  • **Efficient Analysis:** The structured tables enable efficient querying and analysis of smart contract data.
  • **Handling Multiple Contract Instances:** For smart contracts with multiple instances, Dune aggregates the data from these instances into a single table, simplifying the analysis process.
  • **Collaborative Mapping:** Dune's smart contract library is continuously expanded through the active participation of the Dune community, ensuring that the decoding coverage remains comprehensive and current.
> [card] [Explore decoded logs](/data-catalog/evm/flow/decoded/event-logs) > [card] [Explore decoded traces](/data-catalog/evm/flow/decoded/call-tables) ## Which contracts have decoded data? Contract submission on Dune are driven by the community. Usually, the odds are good that the contract you are looking at is already decoded, but especially for new projects or new contracts, it might be that the contract is not decoded yet. In those cases, you can submit the contract to be decoded. Decoding usually takes about 24 hours, in special cases it might take longer. You can check if contracts are already decoded by querying the `[blockchain].contracts` tables, the [data explorer](/web-app/query-editor/data-explorer), or use [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2). > [card] [Submit any contract for decoding](/web-app/decoding-contracts) > [card] [Explore already decoded contracts](/data-catalog/evm/flow/decoded/contracts) ## How does decoding work? Smart Contracts on any EVM blockchain are mostly written in high-level languages like [Solidity](https://docs.soliditylang.org/en/v0.8.2) or [Vyper](https://vyper.readthedocs.io/en/stable). In order for them to be deployed to an EVM execution environment, they need to be compiled to EVM executable bytecode. Once deployed, the bytecode gets associated with an address on the respective chain and is permanently stored in the chain's state storage. To be able to interact with this smart contract, which is now just bytecode, we need a guide to call the functions defined in the high-level languages. This translation of names and arguments into byte representation is done using an **Application Binary Interface (ABI)**. The ABI documents names, types, and arguments precisely, which allows us to interact with the smart contract using a somewhat human-readable format. The ABI can be compiled using the high-level language source code. **The ABI is used to call a smart contract or interpret the data it emits.** ![Decoding process illustration](/data-catalog/images/decoding.png) ## Decoding Example We are going to look at an event log of an ERC20 transfer event from the [smart contract](https://etherscan.io/token/0x429881672B9AE42b8EbA0E26cD9C73711b891Ca5#readContract) that represents the \$PICKLE token. On [Etherscan](https://etherscan.io/tx/0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5#eventlog), the undecoded event looks like this: ![Etherscan event log screenshot](/data-catalog/images/etherscan.png) If we query for this transaction in the `ethereum.logs` table in the Dune database, we will receive the same encoded bytecode as our result dataset.
`SELECT *
FROM ethereum.logs
WHERE tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455255/5806543](https://dune.com/embeds/3455255/5806543) We could make short work of this encoded bytecode by using [DuneSQL Varbinary functions](/query-engine/Functions-and-operators/varbinary) to decode it, but having the contract's ABI at hand makes this process much easier. This contract is decoded in Dune, so we can use the `pickle_finance_ethereum.PickleToken_evt_Transfer` table to access the decoded event log.
`SELECT *
FROM pickle_finance_ethereum.PickleToken_evt_Transfer
WHERE evt_tx_hash = 0x2bb7c8283b782355875fa37d05e4bd962519ea294678a3dcf2fdffbbd0761bc5`
[https://dune.com/embeds/3455274/5806581](https://dune.com/embeds/3455274/5806581) **Now this is actually useful for analyzing this transaction!** This data is much more readable and understandable than the encoded bytecode. We can see the sender, receiver, and the amount of tokens transferred in this event log. ## How do I understand decoded data? Decoded data is the high level programming language representation of two pieces of software talking to each other via the blockchain. It's not always easy for a human to understand what exactly is going on in these interactions, but most of the time, looking at column names and the data that is transmitted within them should help you to understand what is happening within that specific log or call. If you are not able to make sense of the data by just searching the tables, it usually helps to look at single transactions using the transaction hash and [Etherscan](https://etherscan.io). Furthermore, going into the code of the smart contract (our favorite way to do this is [DethCode](https://etherscan.deth.net)) to read the comments or the actual logic can help to understand the smart contract's emitted data. If that also doesn't lead to satisfactory results, scouring the relevant docs and GitHub of the project can lead you to the desired answers. Furthermore, talking to the developers and core community of a project can also help you to get an understanding of the smart contracts. # flow.traces_decoded Source: https://docs.dune.com/data-catalog/flow/decoded/traces-decoded ABI-decoded Flow function calls — parsed function names and arguments. ## Table Description The `traces_decoded` table contains decoded traces from flow transactions. The table matches `MethodID`, which consists of the first 4 bytes of any eth call, to the trace signature and the corresponding Method name. The table does not contain the full trace data and is not suitable for analysis of smart contract level data. For that, use the specific event tables as described in [Call-tables](/data-catalog/evm/flow/decoded/traces-decoded). This table is great for gaining a high level understanding of the types of events that are being emitted by a smart contract or smart contracts of a certain protocol. ## Column Descriptions
ColumnTypeDescription
`block_date``date`Date of the block (UTC)
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`namespace``varchar`Project namespace (e.g., uniswap_v3)
`contract_name``varchar`Name of the contract that was called
`to``varbinary`Address of the contract that was called
`trace_address``array(bigint)`Path of this trace within the call tree
`tx_hash``varbinary`Hash of the parent transaction
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`tx_index``integer`Position of the transaction within the block
`success``boolean`Whether this trace executed successfully
`signature``varbinary`Function signature (first 4 bytes of calldata)
`function_name``varchar`Decoded name of the function called
`created_at``timestamp`When this record was created in Dune
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=traces_decoded](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=traces_decoded) # Flow Overview Source: https://docs.dune.com/data-catalog/flow/overview Flow blockchain data on Dune - EVM and Cadence ## What is Flow? Flow is a fast, decentralized, and developer-friendly blockchain designed for the next generation of apps, games, and digital assets. Flow features a unique multi-node architecture that enables high throughput while maintaining decentralization and security. **On Dune, Flow data is available for both execution environments:** * **Flow EVM** - Ethereum-compatible environment for Solidity developers * **Flow Cadence** - Flow's native smart contract environment with resource-oriented programming ## Flow EVM vs Cadence: Key Differences | Aspect | Flow EVM | Flow Cadence | | - | - | - | | **Smart Contract Language** | Solidity | Cadence | | **Compatibility** | Full EVM equivalence | Native Flow | | **Developer Tooling** | Ethereum toolchain (Hardhat, Foundry, etc.) | Flow CLI, Cadence tools | | **Account Model** | EOA + Contract accounts | Resource-oriented accounts | | **Gas Token** | FLOW | FLOW | | **Interoperability** | Cross-VM bridge to Cadence | Cross-VM bridge to EVM | Both environments share the same underlying Flow blockchain and use FLOW as the native gas token, enabling seamless cross-VM interactions. ## Flow EVM Flow EVM is a fast EVM equivalent blockchain with low fees, making it an ideal **Ethereum alternative for apps** that need both performance and affordability. With EVM equivalency, Solidity developers can deploy existing contracts on Flow without rewriting code. ### EVM Key Features * **EVM Equivalence**: Full compatibility with Ethereum smart contracts and tooling * **Ultra-Fast Performance**: Transaction throughput peaked to 2M daily transactions * **Low Gas Fees**: Ultra-low cost gas fees with support for gasless experiences * **MEV Resilience**: Robust design offering improved market efficiency and fairness * **Cross-VM Integration**: Seamless token transfers between EVM and Cadence ### EVM Data on Dune > [card] [Raw Data](/data-catalog/flow/raw/blocks) > > Access to raw EVM blockchain data including blocks, transactions, logs, and traces > [card] [Decoded Data](/data-catalog/flow/decoded/overview) > > Human-readable EVM contract interactions and events ## Flow Cadence Flow Cadence is Flow's native smart contract environment using the resource-oriented Cadence programming language. It offers unique capabilities for digital ownership, NFTs, and complex on-chain logic. ### Cadence Key Features * **Resource-Oriented Programming**: First-class digital ownership at the language level * **Account Linking**: Advanced account abstraction enabling smooth user onboarding * **Native NFT Support**: Purpose-built for digital collectibles and assets * **Upgradeable Contracts**: Safe contract upgrade patterns * **Multi-Role Node Architecture**: Heterogeneous node roles ensuring security ### Cadence Data on Dune > [card] [Blocks](/data-catalog/flow/cadence/blocks) > > Cadence block data including headers and network fees > [card] [Transactions](/data-catalog/flow/cadence/transactions) > > Cadence transaction data with sender and payload info > [card] [Transaction Receipts](/data-catalog/flow/cadence/transaction-receipts) > > Execution status and fee information > [card] [Events](/data-catalog/flow/cadence/events) > > Events emitted by Cadence smart contracts > [card] [Contracts](/data-catalog/flow/cadence/contracts) > > Cadence contract deployments and code > [card] [Token Transfers](/data-catalog/flow/cadence/token-transfers) > > NFT and fungible token transfers > [card] [Token Collections](/data-catalog/flow/cadence/token-collections) > > Token collection metadata > [card] [Tokens](/data-catalog/flow/cadence/tokens) > > Individual token metadata > [card] [Native Balances](/data-catalog/flow/cadence/native-token-balances) > > FLOW token balance snapshots ## Resources > [card] [Flow Documentation](https://developers.flow.com) > > Official Flow developer documentation > [card] [Flow EVM Documentation](https://developers.flow.com/build/evm/about) > > Documentation for building on Flow EVM > [card] [Cadence Documentation](https://cadence-lang.org) > > Cadence programming language documentation # flow.blocks Source: https://docs.dune.com/data-catalog/flow/raw/blocks Flow block data — block height, timestamp, and collection guarantees. ## Table description The `flow.blocks` table contains information about blocks in the flow blockchain. A block is a collection of transactions that are hashed and added to the blockchain. Each block contains a reference to the previous block, known as the parent hash, and a timestamp. The table contains information about each block, such as the block number, the block hash, the block size, the number of transactions, and the gas used. ## Column Descriptions
ColumnTypeDescription
`time``timestamp`The time when the block was mined
`number``bigint`The block number (height)
`gas_limit``decimal`Maximum gas allowed in the block
`gas_used``decimal`Total gas used by all transactions in the block
`difficulty``bigint`Mining difficulty of the block
`total_difficulty``decimal`Cumulative difficulty of the chain up to this block
`size``bigint`Size of the block in bytes
`base_fee_per_gas``bigint`Base fee per gas unit (EIP-1559)
`hash``varbinary`Hash of the block
`parent_hash``varbinary`Hash of the parent block
`miner``varbinary`Address of the miner/validator
`nonce``varbinary`Nonce used in mining the block
`date``date`Date of the block (UTC)
`blob_gas_used``bigint`Total blob gas used in the block (EIP-4844)
`excess_blob_gas``bigint`Excess blob gas for fee calculation (EIP-4844)
`parent_beacon_block_root``varbinary`Root of the parent beacon block
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=blocks) ## Examples ### Show the most recent blocks
`SELECT
    number,
    hash, 
    size,
    gas_used
  FROM flow.blocks
  ORDER BY number DESC
  LIMIT 10`
### Show the number of blocks mined each day
`SELECT
    date_trunc('day', time) AS day,
    count(distinct number)
  FROM flow.blocks
  GROUP BY day
  ORDER BY day DESC`
### Show the number of transactions in each block
`SELECT
    number,
    count(*)
  FROM flow.blocks
  GROUP BY 1 
  LIMIT 10`
# flow.creation_traces Source: https://docs.dune.com/data-catalog/flow/raw/creation-traces Flow contract deployment records — deployer and deployed contract details. ## Table Description The `flow.creation_traces` table contains information about the creation of smart contracts on the flow blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the flow blockchain. > [!TIP] > > This table is a subset of the `traces` table, which contains information about all traces on the flow blockchain. The `creation_traces` table is filtered to only include traces that create new smart contracts. The filter for this is `type = 'create'`. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this creation trace
`block_number``bigint`Block number containing this creation trace
`tx_hash``varbinary`Hash of the transaction that created the contract
`address``varbinary`Address of the newly created contract
`from``varbinary`Address that deployed the contract
`code``varbinary`Bytecode of the deployed contract
`block_month``date`Month of the block (for partitioning)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=creation_traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=creation_traces) ## Examples ### Show the creation of a specific smart contract
`SELECT * FROM flow.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`
### Show the creation of smart contracts by a specific creator
`SELECT * FROM flow.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`
### Show the creation of smart contracts in the last 10 days
`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM flow.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
# flow.logs Source: https://docs.dune.com/data-catalog/flow/raw/logs Flow event logs — events emitted during Cadence smart contract execution. ## Table Description The `flow.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:
  • topic list: a list of 0 to 3 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
  • data: contains non-indexed data.
> [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/flow/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this log
`block_number``bigint`Block number containing this log
`block_hash``varbinary`Hash of the block containing this log
`contract_address``varbinary`Address of the contract that emitted the log
`topic0``varbinary`Event signature hash (first indexed topic)
`topic1``varbinary`First indexed event parameter
`topic2``varbinary`Second indexed event parameter
`topic3``varbinary`Third indexed event parameter
`data``varbinary`Non-indexed event data
`tx_hash``varbinary`Hash of the transaction that generated this log
`index``integer`Position of the log within the block
`tx_index``integer`Position of the transaction within the block
`block_date``date`Date of the block (UTC)
`tx_from``varbinary`Address that initiated the transaction
`tx_to``varbinary`Address the transaction was sent to
`blob_gas_price``bigint`Blob gas price of the transaction (EIP-4844)
`blob_gas_used``bigint`Blob gas used by the transaction (EIP-4844)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=logs) ## Examples ### Filter the logs for a specific contract
`SELECT *
FROM flow.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`
### Filter the logs for a specific topic
`SELECT *
FROM flow.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
### Show the logs of a specific block
`SELECT *
FROM flow.logs
WHERE evt_block_number = 1000000`
# flow.traces Source: https://docs.dune.com/data-catalog/flow/raw/traces Flow execution traces — internal call data during transaction processing. ## Table Description The `flow.traces` table contains the traces of the transactions executed on the Ethereum Virtual Machine (EVM). It includes the traces of the transaction and the traces of the internal transactions. Traces are the result of the execution of the transaction and are used to debug and understand the execution of the transaction. They are also known as `internal transactions` and can be used to understand the execution of a transaction. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/flow/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this trace
`block_number``bigint`Block number containing this trace
`value``uint256`Amount of native token transferred (in wei)
`gas``bigint`Gas provided for this trace
`gas_used``bigint`Gas consumed by this trace
`block_hash``varbinary`Hash of the block containing this trace
`success``boolean`Whether this trace executed successfully
`tx_index``integer`Position of the transaction within the block
`sub_traces``bigint`Number of child traces spawned by this trace
`error``varchar`Error message if the trace failed
`tx_success``boolean`Whether the parent transaction succeeded
`tx_hash``varbinary`Hash of the parent transaction
`from``varbinary`Address that initiated this trace
`to``varbinary`Address the trace was sent to
`trace_address``array(bigint)`Path of this trace within the call tree
`type``varchar`Type of trace (call, create, suicide, reward)
`address``varbinary`Address of the contract created (for create traces)
`code``varbinary`Bytecode of the contract created
`call_type``varchar`Type of call (call, delegatecall, staticcall)
`input``varbinary`Input data for the trace
`output``varbinary`Output data from the trace
`refund_address``varbinary`Address receiving refund (for selfdestruct)
`block_date``date`Date of the block (UTC)
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=traces) ## Example ### Querying traces for a specific transaction hash
`SELECT *
FROM flow.traces
WHERE tx_hash = 0xb30d6d67cf7d148c2257bf598c5f5cdf5912a3d05c7d3b000398d675d2fa912c`
# flow.transactions Source: https://docs.dune.com/data-catalog/flow/raw/transactions Flow transaction records — authorizers, payer, gas limit, and execution status. ## Table Description The `flow.transactions` table contains information about all transactions on the flow blockchain. Each row represents a single transaction and includes information such as block number, hash, timestamp, sender, recipient, value, gas, gas price, and more. Transactions are the fundamental unit of interaction with the flow blockchain. Transactions are created by users and are used to send value, deploy smart contracts, and interact with smart contracts. > [!TIP] > > This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see [call tables](/data-catalog/evm/flow/decoded/call-tables) section. If this is a Hosted chain, decoded call tables will not be available. ## Column Descriptions
ColumnTypeDescription
`block_time``timestamp`Timestamp of the block containing this transaction
`block_number``bigint`Block number containing this transaction
`value``decimal`Amount of native token transferred (in wei)
`gas_limit``bigint`Maximum gas the sender is willing to use
`gas_price``bigint`Price per gas unit (in wei)
`gas_used``bigint`Actual gas consumed by the transaction
`max_fee_per_gas``bigint`Maximum total fee per gas (EIP-1559)
`max_priority_fee_per_gas``bigint`Maximum priority fee (tip) per gas (EIP-1559)
`priority_fee_per_gas``bigint`Actual priority fee per gas paid
`nonce``bigint`Transaction count of the sender before this transaction
`index``bigint`Position of the transaction within the block
`success``boolean`Whether the transaction executed successfully
`from``varbinary`Address of the transaction sender
`to``varbinary`Address of the transaction recipient
`block_hash``varbinary`Hash of the block containing this transaction
`data``varbinary`Calldata sent with the transaction
`hash``varbinary`Unique hash of the transaction
`type``varchar`Transaction type (legacy, EIP-2930, EIP-1559, EIP-4844)
`access_list``array(row)`List of addresses and storage keys accessed (EIP-2930)
`block_date``date`Date of the block (UTC)
`blob_versioned_hashes``array(varbinary)`Versioned hashes of blobs (EIP-4844)
`max_fee_per_blob_gas``bigint`Maximum fee per blob gas (EIP-4844)
`authorization_list``array(row)`Authorization list for EIP-7702 transactions
## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=flow\&table_name_t6f0df=transactions) ## Examples ### Show all transactions sent by a specific address
`SELECT * 
FROM flow.transactions WHERE "from" = '0x50A1b5c358F8D34F0d35aA2f10742c46054E247e'`
### Count the number of transactions per block
`SELECT 
    block_number, 
    COUNT(*)
FROM flow.transactions
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`
### Show the top 10 transactions with the highest gas price
`SELECT 
    hash, 
    gas_price
FROM flow.transactions
ORDER BY gas_price DESC
LIMIT 10`
# Blocks Source: https://docs.dune.com/data-catalog/fuel/blocks Fuel blockchain blocks data # Table Description This table contains data about blocks in the Fuel blockchain, including block headers, consensus data, and transaction information. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **block_time** | bigint | Block creation timestamp | | **block_date** | date | Block creation date | | **height** | bigint | Block height/number | | **time** | bigint | Unix timestamp | | **transactions_count** | bigint | Number of transactions | | **transactions_root** | binary | Merkle root of transactions | | **application_hash** | binary | Application state hash | | **consensus_parameters_version** | bigint | Consensus parameters version | | **da_height** | bigint | Data availability height | | **event_inbox_root** | binary | Event inbox Merkle root | | **id** | binary | Block identifier | | **message_outbox_root** | binary | Message outbox Merkle root | | **message_receipt_count** | bigint | Number of message receipts | | **prev_root** | binary | Previous block root | | **state_transition_bytecode_version** | bigint | State transition version | | **version** | string | Block version | | **consensus_type** | string | Consensus mechanism type | | **poa_consensus_data_signature** | binary | PoA consensus signature | | **producer** | binary | Block producer address | | **\_updated_at** | timestamp | Last update timestamp | | **\_ingested_at** | timestamp | Ingestion timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fuel\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fuel\&table_name_t6f0df=blocks) # Fuel Data Source: https://docs.dune.com/data-catalog/fuel/overview Fuel blockchain data on Dune ## What is Fuel? Fuel is an operating system purpose built for Ethereum Rollups. It implements improvements suggested to the Ethereum VM (EVM) for many years that couldn't be implemented due to the need to maintain backward compatibility, including parallel transaction execution and multiple native assets. Fuel delivers unmatched processing capacity through its ability to execute transactions in parallel by using strict state access lists in the form of a UTXO model. With the FuelVM, Fuel full nodes identify the accounts a transaction touches, mapping out dependencies before execution. ## Key Features * **Parallel Transaction Execution**: Fuel can execute transactions in parallel, significantly increasing throughput * **UTXO Model**: Uses a strict state access list model for efficient transaction processing * **Multiple Native Assets**: Supports multiple native assets natively * **FuelVM**: A purpose-built virtual machine that improves upon the EVM * **Sway Language**: A domain-specific language based on Rust for smart contract development ## Fuel Data on Dune Fuel blockchain data is organized into several key tables that capture different aspects of on-chain activity: > [card] [Blocks](/data-catalog/fuel/blocks) > > Core block data including block headers, validators, and block statistics. > [card] [Transactions](/data-catalog/fuel/transactions) > > Detailed transaction data including computation, actions, and state changes. > [card] [Receipts](/data-catalog/fuel/receipts) > > Transaction receipts containing execution results and event logs. # Receipts Source: https://docs.dune.com/data-catalog/fuel/receipts Fuel blockchain receipts data # Table Description This table contains data about transaction receipts in the Fuel blockchain, including execution results, gas usage, and associated metadata. ## Column Description | Column Name | Data Type | Description | | - | - | - | | **block_time** | bigint | Block creation timestamp | | **block_height** | bigint | Block height/number | | **block_version** | string | Block version | | **block_producer** | binary | Block producer address | | **transaction_id** | binary | Transaction identifier | | **amount** | bigint | Token amount | | **asset_id** | binary | Asset identifier | | **contract_id** | binary | Contract identifier | | **data** | string | Receipt data | | **digest** | binary | Receipt hash | | **gas** | bigint | Gas limit | | **gas_used** | bigint | Gas consumed | | **id** | string | Receipt identifier | | **is** | bigint | State indicator | | **len** | bigint | Data length | | **nonce** | binary | Transaction nonce | | **param1** | bigint | Parameter 1 | | **param2** | bigint | Parameter 2 | | **ptr** | bigint | Pointer value | | **ra** | bigint | Register A | | **rb** | bigint | Register B | | **rc** | bigint | Register C | | **rd** | bigint | Register D | | **reason_reason** | int | Failure reason code | | **reason_instruction** | bigint | Failed instruction | | **receipt_type** | string | Receipt type | | **recipient** | binary | Recipient address | | **result** | bigint | Execution result | | **sender** | binary | Sender address | | **sub_id** | binary | Sub-identifier | | **to** | binary | Destination address | | **to_address** | string | Destination address string | | **val** | bigint | Value amount | | **\_updated_at** | timestamp | Last update timestamp | | **\_ingested_at** | timestamp | Ingestion timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fuel\&table_name_t6f0df=receipts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fuel\&table_name_t6f0df=receipts) # Transactions Source: https://docs.dune.com/data-catalog/fuel/transactions Fuel blockchain transactions data # Table Description This table contains data about transactions in the Fuel blockchain, including transaction details, inputs, outputs, and associated metadata. Fuel transactions can be of different types: Script, Create, Mint, or Upgrade transactions. ## Column Description | Column Name | Data Type | Description | | - | - | - | | **block_height** | bigint | The height of the block containing this transaction | | **block_time** | bigint | The timestamp when the block was created | | **block_id** | binary | The unique identifier of the block | | **block_version** | string | The version of the block | | **block_producer** | binary | The address of the block producer | | **status** | string | The status of the transaction (Success/Failure) | | **id** | binary | The unique identifier of the transaction | | **type** | string | The type of transaction (Script/Create/Mint/Upgrade) | | **tx_pointer_block_height** | bigint | Block height for UTXO validation | | **tx_pointer_tx_index** | int | Transaction index for UTXO validation | | **tx_pointer** | struct | Reference to previous transaction in UTXO model | | **bytecode_root** | binary | Root hash of script bytecode | | **bytecode_witness_index** | bigint | Index in witnesses array | | **blob_id** | binary | Identifier for blob transactions | | **maturity** | bigint | Minimum block height for execution | | **mint_amount** | bigint | Amount of tokens to mint | | **mint_asset_id** | binary | Asset identifier for minting | | **mint_gas_price** | bigint | Gas price for minting | | **receipts_root** | binary | Merkle root of transaction receipts | | **salt** | binary | Unique value for transaction | | **script_gas_limit** | bigint | Maximum gas for script execution | | **subsection_index** | bigint | Index in multi-section transaction | | **subsections_number** | bigint | Total sections in transaction | | **input_asset_ids** | array(binary) | Asset IDs used as inputs | | **proof_set** | array(binary) | Zero-knowledge proofs for validation | | **input_contract** | struct | Input contract data (balances, state, UTXO) | | **output_contract** | struct | Output contract data (new balances, state) | | **policies** | struct | Transaction policies (maturity, fees, limits) | | **raw_payload** | binary | Raw transaction data | | **script** | binary | Compiled script bytecode | | **script_data** | binary | Script input data | | **storage_slots** | array(struct) | Contract storage updates | | **upgrade_purpose** | struct | Contract upgrade details | | **witnesses** | array(binary) | Transaction validation data | | **script_length** | bigint | Script bytecode length | | **script_data_length** | bigint | Script input data length | | **storage_slots_count** | bigint | Number of storage updates | | **proof_set_count** | bigint | Number of validation proofs | | **witnesses_count** | bigint | Number of witnesses | | **inputs_count** | bigint | Number of inputs | | **outputs_count** | bigint | Number of outputs | | **is_create** | boolean | Contract creation flag | | **is_mint** | boolean | Minting transaction flag | | **is_script** | boolean | Script transaction flag | | **is_upgrade** | boolean | Contract upgrade flag | | **is_upload** | boolean | Bytecode upload flag | | **is_blob** | boolean | Blob transaction flag | | **\_updated_at** | timestamp | Last update timestamp | | **\_ingested_at** | timestamp | Ingestion timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fuel\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=fuel\&table_name_t6f0df=transactions) # Balances Source: https://docs.dune.com/data-catalog/initia/balances Initia blockchain account balances data # Table Description This table contains data about account balances in the Initia blockchain, including token holdings and balance snapshots. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the balance was recorded. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **address** | varchar | The account address. | | **denom** | varchar | The denomination of the token. | | **amount** | decimal(38, 0) | The balance amount. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=balances) # Block Events Source: https://docs.dune.com/data-catalog/initia/block_events Initia blockchain block events data # Table Description This table contains data about block-level events and attributes in the Initia blockchain, including event types, sources, and associated metadata. The schema is modeled after Cosmos block events. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the event occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the block belongs. | | **event_index** | bigint | A unique index for events within the block. | | **event_type** | varchar | The type of event that was triggered. | | **event_source** | varchar | The source of the event. | | **attribute_key** | varchar | The key of the event attribute. | | **attribute_value** | varchar | The value of the event attribute. | | **attribute_index** | bigint | A unique index for attributes within the event. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=block_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=block_events) # Blocks Source: https://docs.dune.com/data-catalog/initia/blocks Initia blockchain blocks data # Table Description This table contains data about blocks in the Initia blockchain, including block headers, consensus data, and transaction information. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block, a unique identifier for each block. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the block belongs. | | **proposer_address** | varchar | The address of the validator proposing the block. | | **validators_hash** | varchar | The hash of the validators set for the block. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=blocks) # Bridge Transfers Source: https://docs.dune.com/data-catalog/initia/bridge_transfers Initia blockchain cross-chain bridge transfer data # Table Description This table contains data about cross-chain bridge transfers in the Initia blockchain, including transfer details, source and destination chains, and transfer status. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the transfer occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **tx_id** | varchar | The unique ID of the transaction. | | **tx_index** | bigint | The index of the transaction in the block. | | **message_index** | bigint | The index of the message in the transaction. | | **event_index** | bigint | The index of the event in the message. | | **action_index** | bigint | The index of the action in the event. | | **sender** | varchar | The address of the sender. | | **receiver** | varchar | The address of the receiver. | | **token_amount** | decimal(38, 0) | The amount of tokens transferred. | | **token_denom** | varchar | The denomination of the token. | | **src_domain** | varchar | The source domain of the transfer. | | **dst_domain** | varchar | The destination domain of the transfer. | | **protocol** | varchar | The protocol used for the transfer. | | **protocol_metadata** | varchar | Additional metadata related to the protocol. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=bridge_transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=bridge_transfers) # Message Events Source: https://docs.dune.com/data-catalog/initia/message_events Initia blockchain message events data # Table Description This table contains data about message-related events in the Initia blockchain, including message types, attributes, and associated metadata. ## Table Schema | Column name | Description | Type | | - | - | - | | **block_date** | The date of the block. | date | | **block_height** | The height of the block where the event occurred. | bigint | | **block_timestamp** | Timestamp when the block was validated. | timestamp(3) with time zone | | **chain_id** | The ID of the chain where the block belongs. | varchar | | **tx_id** | The hash of the transaction where the event occurred. | varchar | | **tx_index** | The index of the transaction in the block. | bigint | | **message_index** | The index of the message in the transaction. | bigint | | **event_index** | A unique index for events within the message. | bigint | | **event_type** | The type of event that was triggered. | varchar | | **attribute_key** | The key of the event attribute. | varchar | | **attribute_value** | The value of the event attribute. | varchar | | **attribute_index** | A unique index for attributes within the event. | bigint | | **updated_at** | Timestamp of when the record was last updated. | timestamp(3) with time zone | | **ingested_at** | Timestamp of when the record was ingested into Dune. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=message_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=message_events) # Initia Data Source: https://docs.dune.com/data-catalog/initia/overview Initia blockchain data on Dune ## What is Initia? Initia's core philosophy is to make opinionated decisions on the underlying infrastructure such as data availability, interoperability, and oracles. By reducing decision fatigue, the Interwoven Stack empowers developers with the tools to craft application-specific environments while maintaining un-fragmented accessibility to the application ecosystem. Initia provides a framework that powers all of Initia's rollups through the Interwoven Stack, featuring enshrined liquidity solutions for bootstrapping cross-chain liquidity while maintaining network security. The platform includes InitiaDEX, Minitswap, and a Vested Interest Program (VIP) that aims to foster long-term ecosystem-wide alignment. ## Key Features * **Interwoven Stack**: Framework that powers all of Initia's rollups, enabling developers to craft application-specific environments * **Enshrined Liquidity**: Solution for bootstrapping cross-chain liquidity while maintaining network security * **VIP Program**: Incentive program that aims to foster long-term ecosystem-wide alignment * **InitiaDEX**: Decentralized exchange built on the Initia network * **Minitswap**: Swap functionality integrated into the ecosystem * **Developer-Friendly**: Tools and infrastructure that reduce decision fatigue for developers ## Initia Data on Dune Initia blockchain data is organized into several key tables that capture different aspects of on-chain activity: > [card] [Balances](/data-catalog/initia/balances) > > Account balance snapshots and token holdings > [card] [Blocks](/data-catalog/initia/blocks) > > Contains each validated block in the chain > [card] [Block Events](/data-catalog/initia/block_events) > > Contains all block-level events and attributes in the chain, partitioned by event_index > [card] [Bridge Transfers](/data-catalog/initia/bridge_transfers) > > Cross-chain bridge transfer data > [card] [Message Events](/data-catalog/initia/message_events) > > Contains all events and their corresponding attributes partitioned by message_index > [card] [Swaps](/data-catalog/initia/swaps) > > Token swap and liquidity pool data > [card] [Transactions](/data-catalog/initia/transactions) > > Contains relevant data associated with each transaction > [card] [Transaction Messages](/data-catalog/initia/tx_messages) > > Contains all messages submitted to the blockchain > [card] [Validators](/data-catalog/initia/validators) > > Maps validator addresses to monikers (human-readable description) and other metadata # Swaps Source: https://docs.dune.com/data-catalog/initia/swaps Initia blockchain token swap transactions data # Table Description This table contains data about token swap transactions in the Initia blockchain, including swap details, token pairs, and execution status. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the swap occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **tx_id** | varchar | The unique ID of the transaction. | | **tx_index** | bigint | The index of the transaction in the block. | | **message_index** | bigint | The index of the message in the transaction. | | **event_index** | bigint | The index of the event in the message. | | **action_index** | bigint | The index of the action in the event. | | **sender** | varchar | The address of the sender. | | **token_amount_in** | decimal(38, 0) | The amount of tokens swapped in. | | **token_denom_in** | varchar | The denomination of the token swapped in. | | **token_amount_out** | decimal(38, 0) | The amount of tokens swapped out. | | **token_denom_out** | varchar | The denomination of the token swapped out. | | **routes** | varchar | The routes used for the swap. | | **fees** | varchar | The fees associated with the swap. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=swaps](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=swaps) # Transactions Source: https://docs.dune.com/data-catalog/initia/transactions Initia blockchain transactions data # Table Description This table contains data about transactions in the Initia blockchain, including transaction details, gas usage, and execution status. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_height** | bigint | The height of the block where the transaction occurred. | | **chain_id** | varchar | The ID of the chain where the transaction occurred. | | **tx_id** | varchar | The unique ID of the transaction. | | **tx_info** | varchar | Information related to the transaction. | | **tx_log_message** | varchar | The log message associated with the transaction. | | **memo** | varchar | A memo associated with the transaction. | | **fee** | varchar | The fee associated with the transaction. | | **tx_code** | bigint | The result code of the transaction. | | **tx_index** | bigint | The index of the transaction within the block. | | **gas_used** | bigint | The amount of gas used by the transaction. | | **gas_wanted** | bigint | The amount of gas requested by the transaction. | | **schema_version** | bigint | The schema version for the transaction data. | | **fee_coins** | varchar | The coins used to pay the transaction fee. | | **fee_granter** | varchar | The address granting the fee for the transaction. | | **fee_payer** | varchar | The address paying the fee for the transaction. | | **gas_limit** | bigint | The gas limit set for the transaction. | | **single_sign_mode** | bigint | The signing mode for single-signature transactions. | | **multi_sign_json** | varchar | JSON structure for multi-signature transactions. | | **timeout_height** | varchar | The timeout height set for the transaction. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=transactions) # Transaction Messages Source: https://docs.dune.com/data-catalog/initia/tx_messages Initia blockchain transaction messages data # Table Description This table contains data about messages contained within transactions in the Initia blockchain, including message types, content, and associated metadata. > [!TIP] > > On execution, transactions from Cosmos emit data in two formats: > > * Messages (`initia.tx_messages`): These provide a high-level, readable summary of actions, such as "send money" or "execute contract." They are easier to understand and track transaction types. > * Events (`initia.message_events`): These capture detailed, low-level changes at the chain level, including underlying blockchain modifications that may not always be directly related to state changes. > * Use Messages for a general overview and Events when you need detailed insights. The two tables are complementary. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the message occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the message belongs. | | **tx_id** | varchar | The hash of the transaction containing the message. | | **tx_index** | bigint | The index of the transaction in the block. | | **message_index** | bigint | The index of the message in the transaction. | | **message_type** | varchar | The type of message. | | **message** | varchar | The value/content of the message. | | **schema_version** | bigint | The version of the schema in provider database. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=tx_messages](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=tx_messages) # Validators Source: https://docs.dune.com/data-catalog/initia/validators Initia blockchain validators data # Table Description This table contains data about validators in the Initia blockchain, including their performance metrics, voting power, and status. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **operator_address** | varchar | The operator address of the validator. | | **account_address** | varchar | The account address of the validator. | | **consensus_pubkey** | varchar | The consensus public key of the validator. | | **jailed** | boolean | Indicates whether the validator is jailed. | | **status** | varchar | The status of the validator (e.g., active, inactive). | | **tokens** | varchar | The number of tokens held by the validator. | | **moniker** | varchar | The moniker or name of the validator. | | **identity** | varchar | The identity information of the validator. | | **website** | varchar | The website of the validator. | | **security_contact** | varchar | The security contact information for the validator. | | **details** | varchar | Additional details about the validator. | | **unbonding_height** | bigint | The block height at which the validator started unbonding. | | **unbonding_time** | varchar | The time when the validator will complete unbonding. | | **commission_rate** | double | The commission rate charged by the validator. | | **commission_max_rate** | double | The maximum commission rate allowed for the validator. | | **commission_max_change_rate** | double | The maximum rate at which the validator can change its commission. | | **commission_update_time** | varchar | The time when the validator last updated its commission. | | **min_self_delegation** | varchar | The minimum self-delegation required for the validator. | | **snapshot_height** | bigint | The block height at which the snapshot was taken. | | **snapshot_time** | varchar | The time when the snapshot was taken. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=validators](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=initia\&table_name_t6f0df=validators) # kalshi.market_report Source: https://docs.dune.com/data-catalog/kalshi/market_report Kalshi market metadata — event contract details, categories, settlement rules, and current status. The `kalshi.market_report` table contains market data and information about event contracts on Kalshi. Each row represents market statistics and metrics for a specific event contract ticker. ## Table Schema | Column Name | Data Type | Description | | - | - | - | | block_volume | double | Trading volume for the block period | | category | string | Category of the event contract (e.g., Politics, Economics, Sports, etc.) | | daily_volume | double | Total trading volume for the day | | date | string | Date of the market report | | high | double | Highest price reached during the reporting period | | low | double | Lowest price reached during the reporting period | | open_interest | double | Total number of outstanding contracts | | payout_type | string | Type of payout for the event contract | | report_ticker | string | Unique ticker identifier for the market report | | status | string | Current status of the event contract market | | ticker_name | string | Name or description of the event contract ticker | | \_updated_at | timestamp | Last update timestamp | | \_ingested_at | timestamp | Ingestion timestamp | # Kalshi Source: https://docs.dune.com/data-catalog/kalshi/overview Kalshi event contracts data on Dune Kalshi is the first CFTC regulated exchange dedicated to trading on the outcome of future events. From inflation, to fed rates, to unemployment, to will the government shut down, Kalshi allows people to trade on a broad range of topics. Kalshi has developed a new asset class, event contracts, where you can buy Yes or No positions with respect to whether an event will happen or not. Kalshi's vision is to allow people to capitalize on their opinions, trade in the domain of every day, and hedge risks that relate to them. ## Event Contracts Kalshi's Event Contracts give people the ability to trade based on their opinions about a specific yes-or-no question. For example, if you have student debt and are worried about relief not passing, you can purchase a contract and get a payout even if it doesn't pass. If you're worried about the economic fallout of the government shutting down, you can place a trade to hedge against it. If you've developed a model on inflation, you can profit from that and maybe even offset your rising costs. Event Contracts have an interesting side effect - the price that a given event contract trades at is actually the market's assessment of the probability that the event will happen. Kalshi's inflation and federal rate forecasts have been more accurate than economists, pundits, and traditional news outlets over the past year. Kalshi offers Event Contracts on a wide range of topics, including economics, culture, weather, scientific advancements, and traditional financial markets such as commodities, forex, S\&P, and NASDAQ indices. ## Key Features * **CFTC Regulated**: Kalshi is regulated by the Commodity Futures Trading Commission (CFTC) as a Designated Contract Market (DCM) * **Event-Based Trading**: Trade on the outcome of future events with Yes or No positions * **Broad Market Coverage**: Event contracts on economics, politics, sports, culture, crypto, climate, health, and more * **Market Probability Assessment**: Event contract prices reflect the market's assessment of event probability * **Risk Hedging**: Ability to hedge against everyday risks and economic events * **Election Trading**: First fully regulated platform in over a century to offer legal election trading in the United States ## Company History Kalshi was founded in 2018 by Tarek Mansour and Luana Lopes Lara, who met while studying at the Massachusetts Institute of Technology (MIT). During their early careers at financial institutions like Goldman Sachs, Citadel, and Bridgewater, Tarek and Luana observed that many financial decisions were driven by predictions about future events. However, they noticed a gap in the market: there was no straightforward way for people to trade directly on event outcomes. In 2019, Kalshi was accepted into Y Combinator's Winter batch, where the team further developed the platform. In 2020, Kalshi made history by becoming the first fully regulated financial exchange in the U.S. specifically for event contracts, officially designated as a Designated Contract Market (DCM) by the CFTC. In 2024, Kalshi achieved a historic milestone by becoming the first fully regulated platform in over a century to offer legal election trading in the United States, following a federal appeals court ruling that upheld Kalshi's right to list contracts on political outcomes. ## Kalshi Data on Dune > [card] [Market Report](/data-catalog/kalshi/market_report) > > Contains market data and information about event contracts > [card] [Trade Report](/data-catalog/kalshi/trade_report) > > Contains trade execution data and transaction information > [card] [Kalshi Website](https://kalshi.com/about) > > Learn more about Kalshi, event contracts, and the platform # kalshi.trade_report Source: https://docs.dune.com/data-catalog/kalshi/trade_report Kalshi trade data — individual trades on event contracts with price, size, and execution details. The `kalshi.trade_report` table contains trade execution data and transaction information for event contracts on Kalshi. Each row represents a trade execution for a specific event contract ticker. ## Table Schema | Column Name | Data Type | Description | | - | - | - | | contracts_traded | double | Number of contracts traded in the transaction | | date | string | Date of the trade report | | price | double | Price at which the contracts were traded | | report_ticker | string | Unique ticker identifier for the trade report | | ticker_name | string | Name or description of the event contract ticker | | \_updated_at | timestamp | Last update timestamp | | \_ingested_at | timestamp | Ingestion timestamp | # layerzero.messages Source: https://docs.dune.com/data-catalog/layerzero/messages LayerZero cross-chain messages — message payloads, endpoints, and routing data. The `layerzero.messages` table contains all cross-chain messages sent through the LayerZero protocol. Each message represents a cross-chain communication event between source and destination chains. ## Table Schema | Column Name | Data Type | Description | | - | - | - | | timestampUpdated | timestamp | Timestamp of the last update | | primary_key | string | Unique identifier for the message | | transfer_foreign_key | string | Foreign key reference to the transfer | | tx_hash_source | string | Transaction hash on the source chain | | tx_hash_destination | string | Transaction hash on the destination chain | | ts_source | timestamp | Timestamp of the message on source chain | | ts_destination | timestamp | Timestamp of the message on destination chain | | block_number_source | decimal(38,0) | Block number on the source chain | | block_number_destination | decimal(38,0) | Block number on the destination chain | | addr_from | string | Address of the message sender | | usd_dvn_fee | double | USD value of the DVN fee | | usd_executor_fee | double | USD value of the executor fee | | usd_value | double | Total USD value of the message | | source_contract | string | Contract address on the source chain | | source_chain | string | Source chain identifier | | source_chain_key | string | Source chain key | | source_layer | string | Source chain layer | | destination_contract | string | Contract address on the destination chain | | destination_chain | string | Destination chain identifier | | destination_chain_key | string | Destination chain key | | destination_layer | string | Destination chain layer | | project | string | Project identifier | | state | string | Current state of the message | | layerzero_version | string | Version of LayerZero protocol used | | uln_version | string | Version of ULN used | | \_updated_at | timestamp | Last update timestamp | | \_ingested_at | timestamp | Ingestion timestamp | ## Sample Query ```sql theme={null} -- Get the total number of messages and total value transferred per chain pair SELECT source_chain, destination_chain, COUNT(*) as message_count, SUM(usd_value) as total_value_usd FROM layerzero.messages WHERE ts_source >= NOW() - INTERVAL '7' DAY GROUP BY source_chain, destination_chain ORDER BY total_value_usd DESC LIMIT 10; ``` # LayerZero Source: https://docs.dune.com/data-catalog/layerzero/overview LayerZero crosschain data on Dune LayerZero is a cross-chain messaging protocol that enables the transfer of messages and assets between different blockchain networks. It provides a secure and efficient way for applications to communicate and transfer value across chains. ## Key Features * **Omnichain Interoperability**: Enables seamless communication between different blockchain networks * **Security**: Uses a decentralized network of oracles and validators * **Efficiency**: Optimized for gas efficiency and fast message delivery * **Developer-Friendly**: Simple integration with existing applications * **Wide Chain Support**: Compatible with major EVM and non-EVM chains ## LayerZero Data on Dune > [card] [Messages](/data-catalog/layerzero/messages) > > Contains all cross-chain messages sent through the LayerZero protocol > [card] [Transfers](/data-catalog/layerzero/transfers) > > Contains all cross-chain transfers executed through the LayerZero protocol > [card] [LayerZero Documentation](https://docs.layerzero.network/v2) > > The official documentation for LayerZero, providing detailed information on the protocol, architecture, and developer resources # layerzero.transfers Source: https://docs.dune.com/data-catalog/layerzero/transfers LayerZero cross-chain token transfers — bridged assets with source/destination chain details. The `layerzero.transfers` table contains all cross-chain transfers executed through the LayerZero protocol. Each transfer represents a value transfer event between source and destination chains. ## Table Schema | Column Name | Data Type | Description | | - | - | - | | timestampUpdated | timestamp | Timestamp of the last update | | primary_key | string | Unique identifier for the transfer | | messages_foreign_key | string | Foreign key reference to the associated message | | addr_to | string | Recipient address | | type_transfer | string | Type of transfer | | symbol | string | Token symbol | | token | string | Token address | | usd_value | double | USD value of the transfer | | \_updated_at | timestamp | Last update timestamp | | \_ingested_at | timestamp | Ingestion timestamp | ## Sample Query ```sql theme={null} -- Get the top tokens by volume transferred in the last 24 hours SELECT symbol, COUNT(*) as transfer_count, SUM(usd_value) as total_volume_usd FROM layerzero.transfers WHERE timestampUpdated >= NOW() - INTERVAL '24' HOUR GROUP BY symbol ORDER BY total_volume_usd DESC LIMIT 10; ``` # Blocks Source: https://docs.dune.com/data-catalog/midnight/blocks Midnight blockchain blocks data # Table Description This table contains block-level data for the Midnight blockchain, including height, hash, parent hash, author, and protocol version. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **id** | bigint | Internal block identifier. | | **hash** | varchar | Hash uniquely identifying the block. | | **height** | bigint | Block height (sequential number) in the chain. | | **protocol_version** | bigint | Protocol version active for this block. | | **parent_hash** | varchar | Hash of the parent block. | | **author** | varchar | Block author / producer identifier. | | **block_time** | timestamp | Timestamp when the block was produced. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=blocks) # cNIGHT Registrations Source: https://docs.dune.com/data-catalog/midnight/cnight_registrations Midnight cNIGHT registration data # Table Description This table contains cNIGHT registrations linking Cardano addresses to Midnight DUST addresses for cross-chain NIGHT / DUST flows. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **id** | bigint | Internal registration identifier. | | **cardano_address** | varchar | Cardano address associated with the registration. | | **dust_address** | varchar | Midnight DUST address linked to the registration. | | **valid** | boolean | Whether the registration is currently valid. | | **registered_at** | bigint | Registration time (network time representation). | | **removed_at** | bigint | Removal time, if the registration was removed. | | **block_id** | bigint | Block id associated with the registration update. | | **utxo_tx_hash** | varchar | Cardano UTXO transaction hash for the registration. | | **utxo_output_index** | bigint | Cardano UTXO output index for the registration. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=cnight_registrations](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=cnight_registrations) # Committee Membership Source: https://docs.dune.com/data-catalog/midnight/committee_membership Midnight committee membership data # Table Description This table records committee membership for SPOs by epoch, including position and expected slots. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **spo_sk** | varchar | Stake pool operator key / identifier. | | **sidechain_pubkey** | varchar | Sidechain public key for the committee member. | | **epoch_no** | bigint | Epoch number. | | **position** | bigint | Position of the member in the committee. | | **expected_slots** | bigint | Expected slots assigned to the member. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=committee_membership](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=committee_membership) # Contract Actions Source: https://docs.dune.com/data-catalog/midnight/contract_actions Midnight contract actions data # Table Description This table contains smart contract actions on Midnight, including contract address, action variant, and attributes. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **id** | bigint | Internal contract action identifier. | | **transaction_id** | bigint | Foreign key to `midnight.transactions.id`. | | **variant** | varchar | Contract action variant / type. | | **address** | varchar | Contract address. | | **attributes_json** | varchar | Action attributes encoded as JSON. | | **action_ordinal** | bigint | Ordinal position of the action within the transaction. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=contract_actions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=contract_actions) # DUST Generation Info Source: https://docs.dune.com/data-catalog/midnight/dust_generation_info Midnight DUST generation info data # Table Description This table describes NIGHT UTXO state used to generate DUST, including owner, value, and merkle index. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **id** | bigint | Internal record identifier. | | **night_utxo_hash** | varchar | Hash of the NIGHT UTXO generating DUST. | | **value** | decimal(38,0) | NIGHT value associated with the UTXO. | | **owner** | varchar | Owner of the NIGHT UTXO. | | **nonce** | varchar | Nonce for the generation entry. | | **ctime** | bigint | Creation time of the generation entry. | | **dtime** | bigint | Dust-related time field for the entry. | | **merkle_index** | bigint | Merkle index of the UTXO in the generation tree. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=dust_generation_info](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=dust_generation_info) # Ledger Events Source: https://docs.dune.com/data-catalog/midnight/ledger_events Midnight ledger events data # Table Description This table contains ledger events emitted in Midnight transactions, including variant, grouping, and JSON attributes. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **id** | bigint | Internal ledger event identifier. | | **transaction_id** | bigint | Foreign key to `midnight.transactions.id`. | | **variant** | varchar | Event variant / type. | | **grouping** | varchar | Logical grouping for the event. | | **attributes_json** | varchar | Event attributes encoded as JSON. | | **event_ordinal** | bigint | Ordinal position of the event within the transaction. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=ledger_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=ledger_events) # Midnight Data Source: https://docs.dune.com/data-catalog/midnight/overview Midnight blockchain data on Dune ## What is Midnight? Midnight is a privacy-focused partner chain of Cardano. It uses zero-knowledge proofs and the Compact language for programmable privacy, with a dual-ledger model that supports both shielded (private) and unshielded (public) state. Midnight separates value from network capacity: **NIGHT** is the unshielded native utility and governance token, and holding NIGHT generates **DUST**, a shielded, non-transferable resource consumed to pay transaction fees. The network inherits security properties from Cardano through the partner-chain framework while running its own consensus and application layer. ## Key Features * **Programmable privacy**: Zero-knowledge smart contracts written in Compact * **Dual ledger**: Shielded and unshielded state on the same network * **NIGHT + DUST**: NIGHT for utility/governance; DUST for fee payment * **Cardano partner chain**: Linked to Cardano for settlement and staking-related flows (including cNIGHT registrations) * **UTXO-style unshielded outputs**: Public UTXO tracking alongside private ledger events ## Midnight Data on Dune Midnight data on Dune is a custom (non-EVM) schema under `midnight.*`. Tables cover blocks, transactions, ledger events, contract actions, unshielded UTXOs, DUST generation, cNIGHT registrations, and stake-pool / committee metadata. > [card] [Blocks](/data-catalog/midnight/blocks) > > Block headers, height, author, and protocol version. > [card] [Transactions](/data-catalog/midnight/transactions) > > Transaction records linked to blocks, including variant and hash. > [card] [Regular Transactions](/data-catalog/midnight/regular_transactions) > > Fee and merkle-tree details for regular (user) transactions. > [card] [Ledger Events](/data-catalog/midnight/ledger_events) > > Ledger events emitted by transactions (variant, grouping, attributes). > [card] [Contract Actions](/data-catalog/midnight/contract_actions) > > Smart contract actions with address and attributes JSON. > [card] [Unshielded UTXOs](/data-catalog/midnight/unshielded_utxos) > > Public unshielded UTXO creates and spends. > [card] [cNIGHT Registrations](/data-catalog/midnight/cnight_registrations) > > Cardano ↔ Midnight cNIGHT / DUST address registrations. > [card] [DUST Generation Info](/data-catalog/midnight/dust_generation_info) > > NIGHT UTXO state used for DUST generation. > [card] [SPO History](/data-catalog/midnight/spo_history) > > Stake pool operator status history by epoch. > [card] [SPO Identity](/data-catalog/midnight/spo_identity) > > Stake pool identity keys and pool IDs. > [card] [SPO Stake History](/data-catalog/midnight/spo_stake_history) > > Live and active stake snapshots for pools. > [card] [SPO Epoch Performance](/data-catalog/midnight/spo_epoch_performance) > > Expected vs produced blocks per SPO per epoch. > [card] [Committee Membership](/data-catalog/midnight/committee_membership) > > Committee membership and expected slots by epoch. > [card] [Pool Metadata Cache](/data-catalog/midnight/pool_metadata_cache) > > Cached pool display metadata (name, ticker). > [card] [Midnight documentation](https://docs.midnight.network/) > > Official Midnight developer and protocol documentation. > [card] [Network overview](https://midnight.network/overview) > > High-level overview of Midnight network design and tokenomics. # Pool Metadata Cache Source: https://docs.dune.com/data-catalog/midnight/pool_metadata_cache Midnight pool metadata cache # Table Description This table caches display metadata for Midnight stake pools (name and ticker). ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **pool_id** | varchar | Pool identifier. | | **hex_id** | varchar | Hex-encoded pool identifier. | | **name** | varchar | Human-readable pool name. | | **ticker** | varchar | Pool ticker symbol. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=pool_metadata_cache](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=pool_metadata_cache) # Regular Transactions Source: https://docs.dune.com/data-catalog/midnight/regular_transactions Midnight regular transaction fee and merkle details # Table Description This table extends regular (user) transactions with result status, merkle tree bounds, and fee fields. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **id** | bigint | Transaction id (joins to `midnight.transactions.id`). | | **transaction_result** | varchar | Execution result of the transaction. | | **merkle_tree_root** | varchar | Merkle tree root associated with the transaction. | | **start_index** | bigint | Start index in the merkle tree range. | | **end_index** | bigint | End index in the merkle tree range. | | **paid_fees** | decimal(38,0) | Fees paid for the transaction. | | **estimated_fees** | decimal(38,0) | Estimated fees for the transaction. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=regular_transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=regular_transactions) # SPO Epoch Performance Source: https://docs.dune.com/data-catalog/midnight/spo_epoch_performance Midnight SPO epoch performance data # Table Description This table compares expected versus produced blocks for each SPO in an epoch. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **spo_sk** | varchar | Stake pool operator key / identifier. | | **epoch_no** | bigint | Epoch number. | | **identity_label** | varchar | Identity label for the SPO in the epoch. | | **expected_blocks** | bigint | Expected number of blocks for the SPO. | | **produced_blocks** | bigint | Number of blocks produced by the SPO. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=spo_epoch_performance](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=spo_epoch_performance) # SPO History Source: https://docs.dune.com/data-catalog/midnight/spo_history Midnight stake pool operator history # Table Description This table contains historical status records for stake pool operators (SPOs) by epoch. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **spo_hist_sk** | bigint | Primary key for the SPO history row. | | **spo_sk** | varchar | Stake pool operator key / identifier. | | **epoch_no** | bigint | Epoch number for this status record. | | **status** | varchar | SPO status in the epoch. | | **valid_from** | bigint | Start of validity for this status. | | **valid_to** | bigint | End of validity for this status. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=spo_history](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=spo_history) # SPO Identity Source: https://docs.dune.com/data-catalog/midnight/spo_identity Midnight stake pool operator identity # Table Description This table maps stake pool operators to pool IDs and consensus public keys. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **spo_sk** | varchar | Stake pool operator key / identifier. | | **pool_id** | varchar | Pool identifier. | | **sidechain_pubkey** | varchar | Sidechain public key. | | **mainchain_pubkey** | varchar | Mainchain (Cardano) public key. | | **aura_pubkey** | varchar | AURA consensus public key. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=spo_identity](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=spo_identity) # SPO Stake History Source: https://docs.dune.com/data-catalog/midnight/spo_stake_history Midnight stake pool stake history # Table Description This table contains stake snapshots for Midnight pools, including live and active stake and delegator counts. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **id** | bigint | Internal stake history identifier. | | **pool_id** | varchar | Pool identifier. | | **mainchain_epoch** | bigint | Mainchain epoch associated with the snapshot. | | **live_stake** | decimal(38,0) | Live stake for the pool. | | **active_stake** | decimal(38,0) | Active stake for the pool. | | **live_delegators** | bigint | Number of live delegators. | | **live_saturation** | double | Live saturation ratio for the pool. | | **declared_pledge** | decimal(38,0) | Declared pledge amount. | | **live_pledge** | decimal(38,0) | Live pledge amount. | | **recorded_at** | timestamp | Timestamp when the snapshot was recorded. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=spo_stake_history](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=spo_stake_history) # Transactions Source: https://docs.dune.com/data-catalog/midnight/transactions Midnight blockchain transactions data # Table Description This table contains transaction-level records on Midnight, including the parent block, transaction variant, hash, and protocol version. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **id** | bigint | Internal transaction identifier. | | **block_id** | bigint | Foreign key to `midnight.blocks.id`. | | **variant** | varchar | Transaction variant / type. | | **hash** | varchar | Transaction hash. | | **protocol_version** | bigint | Protocol version for the transaction. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=transactions) # Unshielded UTXOs Source: https://docs.dune.com/data-catalog/midnight/unshielded_utxos Midnight unshielded UTXO data # Table Description This table tracks unshielded (public) UTXOs on Midnight, including create/spend transactions, owner, token type, and value. ## Column Descriptions | Column Name | Data Type | Description | | - | - | - | | **id** | bigint | Internal UTXO identifier. | | **creating_transaction_id** | bigint | Transaction that created the UTXO. | | **spending_transaction_id** | bigint | Transaction that spent the UTXO (null if unspent). | | **owner** | varchar | Owner address of the UTXO. | | **token_type** | varchar | Token type held by the UTXO. | | **value** | decimal(38,0) | Token amount held by the UTXO. | | **intent_hash** | varchar | Intent hash associated with the output. | | **output_index** | bigint | Output index within the creating transaction. | | **ctime** | bigint | Creation time of the UTXO (network time representation). | | **initial_nonce** | varchar | Initial nonce for the UTXO. | | **registered_for_dust_generation** | boolean | Whether the UTXO is registered for DUST generation. | | **\_updated_at** | timestamp | Timestamp when this record was last updated. | | **\_ingested_at** | timestamp | Timestamp when this record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=unshielded_utxos](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=midnight\&table_name_t6f0df=unshielded_utxos) # near.actions Source: https://docs.dune.com/data-catalog/near/actions NEAR Protocol actions — function calls, transfers, and account operations. ## Table Description The `near.actions` table contains comprehensive data related to transactions on the NEAR blockchain, including transaction metadata like `block_date` and `tx_hash`, execution statuses, receipts, and detailed action information when applicable. In NEAR, a transaction can consist of one or more actions, signed by the sender's account and executed by the network. These actions may involve token transfers, smart contract invocations, staking, and more. NEAR employs a unique transaction lifecycle where transactions are validated on the sender's shard, converted into receipts, and processed on the receiver's shard. This approach ensures efficient handling of cross-shard communication and data flow. To gain a clearer understanding of how NEAR data flows, watch our [NEAR Data Flow video tutorial](/resources/learning/video-tutorials#near-data-flow) or visit the [NEAR Data Flow documentation](https://docs.near.org/concepts/data-flow/near-data-flow). ## Column Descriptions | Column | Description | Type | | - | - | - | | block_date | The date of the block when the action occurred. | date | | block_height | The height of the block in which the action was executed. | bigint | | block_time | The timestamp of when the block containing the action was produced. | timestamp(3) with time zone | | block_hash | The unique hash of the block containing the action. | varchar | | chunk_hash | The hash of the chunk within the block where the action is recorded. | varchar | | shard_id | The shard ID in which the action was executed, relating to NEAR’s sharded architecture. | bigint | | index_in_action_receipt | The index of the action within its corresponding receipt, indicating ordering of the action. | integer | | receipt_id | The unique identifier of the receipt associated with this action. | varchar | | gas_price | The gas price paid for executing the action, in yoctoNEAR (1 NEAR = 10^24 yoctoNEAR). | bigint | | receipt_predecessor_account_id | The account that sent the receipt containing the action. | varchar | | receipt_receiver_account_id | The account that receives the action. | varchar | | receipt_conversion_gas_burnt | The amount of gas burnt during the conversion of the receipt. | bigint | | receipt_conversion_tokens_burnt | The amount of gas burnt during the conversion of the receipt, divided by 10^8. | uint256 | | tx_hash | The unique hash identifying the transaction containing the action. | varchar | | tx_from | The account that initiated the transaction. | varchar | | tx_to | The account that is the recipient of the transaction. | varchar | | tx_signer_public_key | The public key of the account that signed the transaction. | varchar | | tx_nonce | The nonce used by the account to ensure the transaction is unique. | bigint | | tx_signature | The cryptographic signature that verifies the authenticity of the transaction. | varchar | | tx_status | The status of the transaction, indicating success or failure. | varchar | | is_delegate_action | Boolean flag indicating whether the action is a delegated action. | boolean | | execution_gas_burnt | The amount of gas burnt during the execution of the action. | bigint | | execution_tokens_burnt | The amount of raw NEAR token burnt during the execution of the action. | uint256 | | execution_status | The status of the execution of the action. | varchar | | execution_outcome_receipt_ids | Array of receipt IDs created as a result of the execution. | array(varchar) | | action_kind | The type of action, such as FUNCTION_CALL, DELEGATE_ACTION, TRANSFER, STAKE, etc. | varchar | | processed_time | The timestamp of when the action was processed by Dune. | timestamp(3) with time zone | | action_function_call_args_parsed | Parsed (decoded) arguments of the function call action. | varchar | | action_function_call_call_gas | The amount of gas attached to the function call action. | bigint | | action_function_call_call_deposit | The amount of NEAR tokens attached to the function call action. | varchar | | action_function_call_call_args_base64 | Base64 encoded arguments of the function call action. | varchar | | action_function_call_call_method_name | The name of the method being called in the function call action. | varchar | | action_delegate_signature | Signature of the delegation action. | varchar | | action_delegate_delegate_action_actions | List of actions being delegated to another account. | array(row("functioncall")) | | action_delegate_delegate_action_max_block_height | The maximum block height at which the delegated action can be executed. | varchar | | action_delegate_delegate_action_nonce | Nonce of the delegated action for uniqueness. | varchar | | action_delegate_delegate_action_public_key | Public key of the delegate executing the action. | varchar | | action_delegate_delegate_action_receiver_id | Account receiving the delegated action. | varchar | | action_delegate_delegate_action_sender_id | Account sending the delegated action. | varchar | | action_delete_account_beneficiary_id | Account of the beneficiary receiving remaining balance upon account deletion. | varchar | | action_delete_key_public_key | Public key being deleted from the account. | varchar | | action_add_key_public_key | Public key being added to the account. | varchar | | action_add_key_access_key_nonce | Nonce of the access key being added. | varchar | | action_add_key_access_key_permission | Permissions granted to the newly added access key. | varchar | | action_stake_public_key | Public key used for staking by the account. | varchar | | action_stake_stake | Amount of NEAR tokens staked by the account. | varchar | | action_transfer_deposit | Amount of NEAR tokens being transferred between accounts. | varchar | | action_deploy_contract_code_sha256 | SHA256 hash of the code being deployed in the contract. | varchar | | updated_at | Timestamp of when the record was last updated. | timestamp(3) with time zone | | ingested_at | Timestamp of when the record was ingested into Dune. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=actions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=actions) ## Data Manipulation Tips The `actions` data in NEAR can be complicated and nested, causing it hard to analyze sometimes. So here we give two examples on how to work array and json data to make it easier to analyze. ### Explode array of rows into separate rows with defined fields When the action type is "DELEGATE_ACTION", the `action_delegate_delegate_action_actions` becomes an array of size n with rows of fields. We can utilize `CROSS JOIN UNNEST` to first explode the array, then use `.` directly to access the fields in the row. Reference query [can be found here](https://dune.com/queries/4078275?sidebar=none). ```sql theme={null} with exploded as ( select block_date , block_height as block_height_executed , tx_hash , receipt_id -- receipt for this action (there are many actions included in one txn) , execution_status , cardinality(action_delegate_delegate_action_actions) as delegated_action_size -- how many function calls are being delegated , action_delegate_delegate_action_sender_id as action_from , action_delegate_delegate_action_receiver_id as action_to -- Explode the array into rows , actions.value as action_data , actions.index as delegated_action_index , action_delegate_delegate_action_actions as raw_delegated_actions -- raw nested list of delegated actions /* explode by doing cross join unnest here*/ from near.actions CROSS JOIN UNNEST(action_delegate_delegate_action_actions) WITH ORDINALITY as actions(value, index) where action_kind = 'DELEGATE_ACTION' and cardinality(action_delegate_delegate_action_actions) >= 2 and receipt_id = '6DB2AzkLXzoU9CMj9GKSZi7y8dGxVrqrbtBsfpLVQCQ8' and block_date = date('2024-09-17') and block_height = 128251854 ) select block_date , block_height_executed , tx_hash , receipt_id , execution_status , delegated_action_size -- how many function calls are being delegated , action_from , action_to -- , typeof(action_data) -- row(args varchar, deposit varchar, gas bigint, method_name varchar) /* below is how you can access the delegated function call info */ , action_data.args as function_call_args , action_data.deposit as function_call_deposit , action_data.gas as function_call_gas , action_data.method_name as function_call_method_name , delegated_action_index , raw_delegated_actions -- raw nested list of delegated actions from exploded ``` ### Extract fields from JSON string When the action type is "FUNCTION_CALL", the `action_function_call_args_parsed` becomes a JSON string. We can utilize `json_extract` with `$.` syntax to extract the fields from the JSON string. Reference query [can be found here](https://dune.com/queries/4078309?sidebar=none). ```sql theme={null} select block_date , block_height as block_height_executed , tx_hash , receipt_id -- receipt for this action (there are many actions included in one txn) , execution_status , receipt_predecessor_account_id as action_from , receipt_receiver_account_id as action_to -- , typeof(args_parsed) as data_type /* This is how you can get fields within each parsed function call args - first examine the fields in the args_parsed for the tye of method `call_method_name` - then parse accordingly */ , json_extract(args_parsed, '$.receiver_id') AS receiver_id , json_extract(args_parsed, '$.amount') AS amount , json_extract(args_parsed, '$.memo') AS memo , call_method_name as call_method_name , args_parsed as raw_call_args , call_gas as call_gas , call_deposit as call_deposit , call_args_base64 , * from near.function_call -- near.actions where 1=1 and block_date = date('2023-09-15') and call_method_name = 'ft_transfer' limit 10 ``` # near.balances Source: https://docs.dune.com/data-catalog/near/balances NEAR account balances — native NEAR token holdings by account. ## Table description The `near.balances` table tracks account balance details on NEAR, including the liquid balance, staked amounts, and rewards for both main and lockup accounts. ## Column Descriptions | Column | Description | Type | | - | - | - | | epoch_date | The date of the epoch when the balance was recorded. | date | | epoch_block_height | The block height of the epoch when the balance was recorded. | bigint | | account_id | The account whose balance is being tracked. | varchar | | liquid | Amount of liquid NEAR tokens in the account. | double | | storage_usage | The amount of storage usage associated with the account. | bigint | | unstaked_not_liquid | The amount of unstaked but not liquid NEAR tokens in the account. | double | | staked | The amount of staked NEAR tokens in the account. | double | | reward | Reward tokens accumulated by the account from staking. | double | | lockup_account_id | The ID of the lockup account associated with the account. | varchar | | lockup_liquid | Amount of liquid NEAR tokens in the lockup account. | double | | lockup_unstaked_not_liquid | The amount of unstaked but not liquid tokens in the lockup account. | double | | lockup_staked | The amount of staked NEAR tokens in the lockup account. | double | | lockup_reward | Reward tokens accumulated in the lockup account from staking. | double | | processed_time | The time when the balance was processed. | date | | updated_at | The time when this balance record was last updated. | timestamp(3) with time zone | | ingested_at | The time when this balance record was ingested into Dune. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=balances) # near.block_chunks Source: https://docs.dune.com/data-catalog/near/block_chunks NEAR block chunks — block data with chunk-level transaction groupings. ## Table description The `near.block_chunks` table contains block chunk data on NEAR. Chunk of a block is a part of a block from a shard. The collection of chunks of the block forms the NEAR Protocol block. ## Column Descriptions | Column | Description | Type | | - | - | - | | date | The date of the block where the chunk is included. | date | | height | The block height at which the chunk was produced. | bigint | | time | The timestamp of when the chunk was produced. | timestamp(3) with time zone | | hash | The hash of the chunk. | varchar | | prev_hash | The hash of the previous chunk in the chain. | varchar | | total_supply | | uint256 | | gas_price | Gas price paid for executing the chunk. | bigint | | author_account_id | The account that produced the chunk. | varchar | | epoch_id | The ID of the epoch in which the chunk was produced. | varchar | | shard_id | The shard ID that contains the chunk. | bigint | | chunk_hash | Hash of the chunk. | varchar | | chunk_signature | The cryptographic signature validating the chunk. | varchar | | chunk_gas_limit | Maximum gas limit for this chunk. | bigint | | chunk_gas_used | Gas actually used in the chunk. | bigint | | chunk_author_account_id | The account that produced this chunk. | varchar | | processed_time | Timestamp when the chunk was processed into Dune. | timestamp(3) with time zone | | updated_at | Timestamp when this chunk was last updated. | timestamp(3) with time zone | | ingested_at | Timestamp when this chunk data was ingested into Dune. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=block_chunks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=block_chunks) # near.circulating_supply Source: https://docs.dune.com/data-catalog/near/circulating_supply NEAR circulating supply snapshots — total and circulating NEAR over time. ## Table description The `near.circulating_supply` table holds daily circulating and total supply of tokens in NEAR. ## Column Descriptions | Column | Description | Type | | - | - | - | | block_date | The date of the block when the supply was recorded. | date | | computed_at_block_timestamp | Timestamp of the block when the supply was computed. | timestamp(3) with time zone | | computed_at_block_hash | Hash of the block at the time of supply computation. | varchar | | computed_at_block_height | Block height at which the supply was computed. | bigint | | circulating_tokens_supply | The circulating supply of tokens at the time of computation. | double | | total_tokens_supply | The total supply of tokens at the time of computation. | double | | processed_time | The timestamp when the supply data was processed. | timestamp(3) with time zone | | updated_at | Timestamp of the last update to this record. | timestamp(3) with time zone | | ingested_at | Timestamp when this data was ingested into Dune. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=circulating_supply](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=circulating_supply) # near.ft_transfers Source: https://docs.dune.com/data-catalog/near/ft_transfers NEAR fungible token transfers — NEP-141 token movements. ## Table description The `near.ft_transfers` table tracks all Fungible Token (FT) transfers in NEAR. ## Column Descriptions | Column | Description | Type | | - | - | - | | block_date | The date when the FT transfer occurred. | date | | block_height | The block height at the time of the FT transfer. | bigint | | block_time | Timestamp when the block containing the FT transfer was produced. | timestamp(3) with time zone | | block_hash | The unique hash of the block containing the FT transfer. | varchar | | chunk_hash | The hash of the chunk within the block containing the FT transfer. | varchar | | shard_id | Shard ID where the FT transfer was executed. | bigint | | standard | The FT standard associated with the transfer (e.g., "nep141"). | varchar | | token_id | ID of the Fungible Token involved in the transfer (e.g., "near"). | varchar | | receipt_id | The receipt ID associated with the FT transfer. | varchar | | contract_account_id | The contract account handling the FT transfer. | varchar | | cause | The function name invoked to cause the FT transfer. | varchar | | status | The status of the FT transfer (e.g., "SUCCESS_VALUE"). | varchar | | event_memo | Memo attached to the FT transfer event. | varchar | | event_index | Event index of the FT transfer event. | uint256 | | affected_account_id | The account affected by the FT transfer, i.e. the "to" account. | varchar | | involved_account_id | The account involved in the FT transfer, i.e. the "from" account. | varchar | | delta_amount | The amount of FT tokens transferred. | decimal(38,0) | | processed_time | Timestamp when the FT transfer data was processed. | timestamp(3) with time zone | | updated_at | Timestamp when the FT transfer record was last updated. | timestamp(3) with time zone | | ingested_at | Timestamp when the FT transfer data was ingested into Dune. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=ft_transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=ft_transfers) # near.function_call Source: https://docs.dune.com/data-catalog/near/function_call NEAR function call actions — contract method invocations with arguments. ## Table description The `near.function_call` table contains flattened out details for records in the `actions` table of the `FUNCTION_CALL` type. ## Column Descriptions | Column | Description | Type | | - | - | - | | block_date | The date of the block where the function call occurred. | date | | block_time | The time when the block containing the function call was produced. | timestamp(3) with time zone | | block_height | The block height at the time of the function call. | bigint | | block_hash | The unique hash of the block containing the function call. | varchar | | chunk_hash | The hash of the chunk where the function call is recorded. | varchar | | shard_id | Shard ID where the function call was executed. | bigint | | tx_hash | The transaction hash containing the function call. | varchar | | tx_from | The account that initiated the function call. | varchar | | tx_to | The account receiving the function call. | varchar | | tx_status | Status of the function call (success or failure). | varchar | | call_method_name | The method being called in the function call. | varchar | | args_parsed | Parsed (decoded) arguments for the function call. | varchar | | call_gas | Gas attached to the function call. | bigint | | call_deposit | Amount of NEAR tokens attached to the function call. | varchar | | call_args_base64 | Base64 encoded arguments of the function call. | varchar | | index_in_action_receipt | The index of the function call within the receipt. | integer | | receipt_id | The receipt ID associated with the function call. | varchar | | gas_price | The gas price paid for executing the function call. | bigint | | receipt_predecessor_account_id | The ID of the predecessor account for the receipt. | varchar | | receipt_receiver_account_id | The ID of the receiver account for the receipt. | varchar | | receipt_conversion_gas_burnt | The gas burnt during the conversion of the receipt. | bigint | | receipt_conversion_tokens_burnt | The amount of raw NEAR burnt during the conversion of the receipt. | uint256 | | execution_gas_burnt | Amount of gas burnt during the execution of the function call. | bigint | | execution_tokens_burnt | Amount of raw NEAR token burnt during the execution of the function call. | uint256 | | execution_status | The status of the execution outcome of the function call. | varchar | | execution_outcome_receipt_ids | Array of receipt IDs created as a result of the function call. | array(varchar) | | updated_at | The time when this function call record was last updated. | timestamp(3) with time zone | | ingested_at | The time when this function call data was ingested into Dune. | timestamp(3) with time zone | | processed_time | The time when the function call was processed. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=function_call](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=function_call) ## Data Manipulation Tips The `actions` data in NEAR can be complicated and nested, causing it hard to analyze sometimes. So here we give two examples on how to work array and json data to make it easier to analyze. ### Explode array of rows into separate rows with defined fields When the action type is "DELEGATE_ACTION", the `action_delegate_delegate_action_actions` becomes an array of size n with rows of fields. We can utilize `CROSS JOIN UNNEST` to first explode the array, then use `.` directly to access the fields in the row. Reference query [can be found here](https://dune.com/queries/4078275?sidebar=none). ```sql theme={null} with exploded as ( select block_date , block_height as block_height_executed , tx_hash , receipt_id -- receipt for this action (there are many actions included in one txn) , execution_status , cardinality(action_delegate_delegate_action_actions) as delegated_action_size -- how many function calls are being delegated , action_delegate_delegate_action_sender_id as action_from , action_delegate_delegate_action_receiver_id as action_to -- Explode the array into rows , actions.value as action_data , actions.index as delegated_action_index , action_delegate_delegate_action_actions as raw_delegated_actions -- raw nested list of delegated actions /* explode by doing cross join unnest here*/ from near.actions CROSS JOIN UNNEST(action_delegate_delegate_action_actions) WITH ORDINALITY as actions(value, index) where action_kind = 'DELEGATE_ACTION' and cardinality(action_delegate_delegate_action_actions) >= 2 and receipt_id = '6DB2AzkLXzoU9CMj9GKSZi7y8dGxVrqrbtBsfpLVQCQ8' and block_date = date('2024-09-17') and block_height = 128251854 ) select block_date , block_height_executed , tx_hash , receipt_id , execution_status , delegated_action_size -- how many function calls are being delegated , action_from , action_to -- , typeof(action_data) -- row(args varchar, deposit varchar, gas bigint, method_name varchar) /* below is how you can access the delegated function call info */ , action_data.args as function_call_args , action_data.deposit as function_call_deposit , action_data.gas as function_call_gas , action_data.method_name as function_call_method_name , delegated_action_index , raw_delegated_actions -- raw nested list of delegated actions from exploded ``` ### Extract fields from JSON string When the action type is "FUNCTION_CALL", the `action_function_call_args_parsed` becomes a JSON string. We can utilize `json_extract` with `$.` syntax to extract the fields from the JSON string. Reference query [can be found here](https://dune.com/queries/4078309?sidebar=none). ```sql theme={null} select block_date , block_height as block_height_executed , tx_hash , receipt_id -- receipt for this action (there are many actions included in one txn) , execution_status , receipt_predecessor_account_id as action_from , receipt_receiver_account_id as action_to -- , typeof(args_parsed) as data_type /* This is how you can get fields within each parsed function call args - first examine the fields in the args_parsed for the tye of method `call_method_name` - then parse accordingly */ , json_extract(args_parsed, '$.receiver_id') AS receiver_id , json_extract(args_parsed, '$.amount') AS amount , json_extract(args_parsed, '$.memo') AS memo , call_method_name as call_method_name , args_parsed as raw_call_args , call_gas as call_gas , call_deposit as call_deposit , call_args_base64 , * from near.function_call -- near.actions where 1=1 and block_date = date('2023-09-15') and call_method_name = 'ft_transfer' limit 10 ``` # near.logs Source: https://docs.dune.com/data-catalog/near/logs NEAR execution logs — log output from smart contract execution. ## Table description The `near.logs` table captures the output generated during the execution of smart contracts. They record key events and actions, such as token transfers or function calls, and are used for tracking, debugging, and monitoring contract activity. Logs help developers understand what happened during a transaction, making it easier to analyze and troubleshoot smart contract behavior. ## Column Descriptions | Column | Description | Type | | - | - | - | | block_date | The date of the block where the log entry was generated. | date | | block_height | The block height at which the log entry was generated. | bigint | | block_time | The time when the block containing the log entry was produced. | timestamp(3) with time zone | | execution_status | The status of the execution outcome associated with the log. | varchar | | executor_account_id | The account that executed the transaction resulting in the log. | varchar | | receipt_id | The receipt ID associated with the log. | varchar | | index_in_execution_outcome_logs | Index of the log entry within the execution outcome, indicating ordering. | integer | | log | The actual log message from the execution outcome. | varchar | | event | Event description generated during execution. | varchar | | processed_time | The time when the log data was processed. | timestamp(3) with time zone | | updated_at | The time when the log record was last updated. | timestamp(3) with time zone | | ingested_at | The time when the log data was ingested. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=logs](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=logs) # near.nft_transfers Source: https://docs.dune.com/data-catalog/near/nft_transfers NEAR NFT transfers — NEP-171 non-fungible token movements. ## Table description The `near.nft_transfers` table tracks all Non-Fungible Token (NFT) transfers in NEAR. ## Column Descriptions | Column | Description | Type | | - | - | - | | block_date | The date when the NFT transfer occurred. | date | | block_height | The block height at the time of the NFT transfer. | bigint | | block_time | Timestamp when the block containing the NFT transfer was produced. | timestamp(3) with time zone | | block_hash | The unique hash of the block containing the NFT transfer. | varchar | | chunk_hash | The hash of the chunk within the block containing the NFT transfer. | varchar | | shard_id | Shard ID where the NFT transfer was executed. | bigint | | standard | The NFT standard associated with the transfer (e.g., "nep171"). | varchar | | token_id | ID of the Non-Fungible Token being transferred. | varchar | | receipt_id | The receipt ID associated with the NFT transfer. | varchar | | contract_account_id | The contract account handling the NFT transfer. | varchar | | cause | The function name invoked to cause the NFT transfer. | varchar | | status | The status of the NFT transfer (e.g., "SUCCESS_VALUE", "SUCCESS_RECEIPT_ID"). | varchar | | event_memo | Memo attached to the NFT transfer event. | varchar | | event_index | Event index of the NFT transfer event. | uint256 | | old_owner_account_id | Old owner account of the NFT, i.e. the "from" account. | varchar | | new_owner_account_id | New owner account of the NFT, i.e. the "to" account. | varchar | | authorized_account_id | Account authorized to perform the NFT transfer. | varchar | | processed_time | Timestamp when the NFT transfer data was processed. | timestamp(3) with time zone | | updated_at | Timestamp when the NFT transfer record was last updated. | timestamp(3) with time zone | | ingested_at | Timestamp when the NFT transfer data was ingested into Dune. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=nft_transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=near\&table_name_t6f0df=nft_transfers) # NEAR Data Source: https://docs.dune.com/data-catalog/near/overview NEAR blockchain data on Dune ## What is NEAR? NEAR is a public, sharded, proof-of-stake blockchain designed to provide scalability, security, and user-friendliness for decentralized applications (dApps). With its unique account model, sharding mechanism, and developer-friendly environment, NEAR enables fast transactions at low costs while maintaining decentralization. It shares design goals with Ethereum 2.0 but includes optimizations for ease of use and performance. NEAR’s sharding system, Nightshade, enables horizontal scaling, meaning the network’s capacity grows as the number of validators and nodes increases. This architecture, combined with a focus on developer tools and user experience, makes NEAR an ideal platform for building scalable Web3 applications. ## Key Concepts of NEAR NEAR’s infrastructure is built on several key components that ensure its scalability, performance, and ease of use. These components work together to enable developers to build on-chain applications while providing a smooth experience for users. ### **Sharding with Nightshade** Nightshade is NEAR’s solution to scaling the blockchain by splitting the network into multiple shards, each processing its own set of transactions. This sharding allows the blockchain to handle more transactions as the network grows, enabling high throughput and low-latency finality. ### **Proof-of-Stake Consensus** NEAR uses a proof-of-stake consensus mechanism. Validators are chosen through an auction process based on the amount of NEAR tokens they stake. This system incentivizes honest behavior while ensuring decentralization, as anyone can become a validator if they meet the staking requirements. ### **NEAR Accounts and Access Keys** NEAR introduces a human-readable [account system (e.g., `alice.near`)](https://docs.near.org/concepts/protocol/account-id) that simplifies interaction with the blockchain. Each account can have [multiple keys with different levels of access (Full-Access and Function-Call Keys)](https://docs.near.org/concepts/protocol/access-keys), allowing for more granular permission controls and better user experience. This flexibility makes it easier for developers to manage dApp permissions and onboard users. ### **Gas (Execution Fees)** Gas is an essential part of NEAR's network, used to cover the cost of transactions and prevent network abuse. Each transaction or action executed on the NEAR blockchain requires gas, which is measured in gas units. The cost is based on network demand, and gas fees are paid in NEAR tokens. To learn more, [visit here.](https://docs.near.org/concepts/protocol/gas#gas-units--gas-price) ### **Transaction Lifecycle & Data Flow 🌊** NEAR employs a unique transaction lifecycle where transactions are first validated on the sender’s shard, turned into receipts, and then processed on the receiver’s shard. This process ensures efficient transaction routing, even in cross-shard communication. After transaction execution, any remaining gas is refunded to the sender, ensuring efficient use of resources. To understand how NEAR data flows, watch our [NEAR Data Flow video tutorial](/resources/learning/video-tutorials#near-data-flow) or visit the [NEAR documentation](https://docs.near.org/concepts/data-flow/near-data-flow). ### **Anatomy of a Transaction 🔎** A transaction in NEAR consists of one or more actions that are signed by the sender’s account and executed by the network. These actions could include transferring tokens, invoking smart contracts, or staking. #### Key Components of a Transaction * **Signer**: The account that signs the transaction. * **Receiver**: The account that will execute the actions. * **Actions**: Operations like `FunctionCall`, `Transfer`, `DeployContract`, etc. A transaction can include multiple actions, but all are executed on the same receiver. * **PublicKey**: The public key used to sign the transaction (so the network can verify the signature). * **Nonce**: A number that is incremented for each transaction sent by the Signer. * **BlockHash**: The hash of a recent block, to limit the time-validity of the transaction. #### Types of Actions * **FunctionCall**: Invoke a function on a contract (optionally attaching NEAR to the call). * **Transfer**: Move NEAR tokens between accounts. * **DeployContract**: Deploy a new contract to an account. * **CreateAccount**: Create a new sub-account under an existing account. * **DeleteAccount**: Remove an account and transfer its remaining balance to a beneficiary. * **AddKey / DeleteKey**: Add or remove public keys associated with an account. * **Stake**: Stake NEAR tokens to become a validator or delegate stake to one. * **DelegateActions**: Execute a meta-transaction on behalf of another account. > [card] [NEAR documentation](https://docs.near.org/) > > Explore comprehensive documentation on NEAR, detailing its architecture, protocol, and resources for developers. ## NEAR Data on Dune NEAR blockchain data is partitioned and categorized to provide developers and users with an easily accessible dataset to interact with and analyze the network’s on-chain activity. The primary data tables in Dune for NEAR include the following: > [card] [Actions](/data-catalog/near/actions) > > Records actions such as transfers, contract deployments, and function calls performed within the NEAR network. > [card] [Block Chunks](/data-catalog/near/block_chunks) > > Stores chunk-level data, with each block consisting of multiple chunks from different shards. > [card] [Circulating Supply](/data-catalog/near/circulating_supply) > > Table holding daily circulating and total supply of tokens in NEAR. > [card] [FT Transfers](/data-catalog/near/ft_transfers) > > Tracks fungible token (FT) transfers across the NEAR network. > [card] [Function Calls](/data-catalog/near/function_call) > > Contains flattened out actions of the `function_call` type. > [card] [NFT Transfers](/data-catalog/near/nft_transfers) > > Captures non-fungible token (NFT) transfers, including token ID and sender/receiver details. > [card] [Balances](/data-catalog/near/balances) > > Stores account balance data, including liquid, staked, and locked balances. > [card] [Logs](/data-catalog/near/logs) > > This table captures the output generated during the execution of smart contracts. # Block Events Source: https://docs.dune.com/data-catalog/noble/block_events Noble blockchain block events data # Table Description This table contains data about block-level events and attributes in the Noble blockchain, including event types, sources, and associated metadata. The schema is modeled after Sei's Cosmos block events but adapted for Noble's context. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the event occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the block belongs. | | **event_index** | bigint | A unique index for events within the block. | | **event_type** | varchar | The type of event that was triggered. | | **event_source** | varchar | The source of the event. | | **attribute_key** | varchar | The key of the event attribute. | | **attribute_value** | varchar | The value of the event attribute. | | **attribute_index** | bigint | A unique index for attributes within the event. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=block_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=block_events) # Blocks Source: https://docs.dune.com/data-catalog/noble/blocks Noble blockchain blocks data # Table Description This table contains data about blocks in the Noble blockchain, including block headers, consensus data, and transaction information. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block, a unique identifier for each block. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the block belongs. | | **proposer_address** | varchar | The address of the validator proposing the block. | | **validators_hash** | varchar | The hash of the validators set for the block. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=blocks) # Bridge Transfers Source: https://docs.dune.com/data-catalog/noble/bridge_transfers Noble blockchain cross-chain bridge transfer data # Table Description This table contains data about cross-chain bridge transfers in the Noble blockchain, including transfer details, source and destination chains, and transfer status. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the transfer occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **tx_id** | varchar | The unique ID of the transaction. | | **tx_index** | bigint | The index of the transaction in the block. | | **message_index** | bigint | The index of the message in the transaction. | | **event_index** | bigint | The index of the event in the message. | | **action_index** | bigint | The index of the action in the event. | | **sender** | varchar | The address of the sender. | | **receiver** | varchar | The address of the receiver. | | **token_amount** | decimal(38, 0) | The amount of tokens transferred. | | **token_denom** | varchar | The denomination of the token. | | **src_domain** | varchar | The source domain of the transfer. | | **dst_domain** | varchar | The destination domain of the transfer. | | **protocol** | varchar | The protocol used for the transfer. | | **protocol_metadata** | varchar | Additional metadata related to the protocol. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=bridge_transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=bridge_transfers) # CCTP Transactions Source: https://docs.dune.com/data-catalog/noble/cctp_transactions Noble blockchain Cross-Chain Transfer Protocol transactions data # Table Description This table contains data about Cross-Chain Transfer Protocol (CCTP) transactions in the Noble blockchain, including token transfers, source and destination chains, and transfer status. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the transaction occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **tx_id** | varchar | The unique ID of the transaction. | | **tx_index** | bigint | The index of the transaction in the block. | | **message_index** | bigint | The index of the message in the transaction. | | **event_index** | bigint | The index of the event in the message. | | **action_index** | bigint | The index of the action in the event. | | **sender** | varchar | The address of the sender. | | **receiver** | varchar | The address of the receiver. | | **token_amount** | decimal(38, 0) | The amount of tokens transferred. | | **token_denom** | varchar | The denomination of the token. | | **src_domain** | varchar | The source domain of the transaction. | | **dst_domain** | varchar | The destination domain of the transaction. | | **authorized_caller** | varchar | The address of the authorized caller. | | **contract** | varchar | The contract address involved in the transaction. | | **nonce** | varchar | The nonce associated with the transaction. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=cctp_transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=cctp_transactions) # Message Events Source: https://docs.dune.com/data-catalog/noble/message_events Noble blockchain message events data # Table Description This table contains data about message-related events in the Noble blockchain, including message types, attributes, and associated metadata. ## Table Schema | Column name | Description | Type | | - | - | - | | **block_date** | The date of the block. | date | | **block_height** | The height of the block where the event occurred. | bigint | | **block_timestamp** | Timestamp when the block was validated. | timestamp(3) with time zone | | **chain_id** | The ID of the chain where the block belongs. | varchar | | **tx_id** | The hash of the transaction where the event occurred. | varchar | | **tx_index** | The index of the transaction in the block. | bigint | | **message_index** | The index of the message in the transaction. | bigint | | **event_index** | A unique index for events within the message. | bigint | | **event_type** | The type of event that was triggered. | varchar | | **attribute_key** | The key of the event attribute. | varchar | | **attribute_value** | The value of the event attribute. | varchar | | **attribute_index** | A unique index for attributes within the event. | bigint | | **updated_at** | Timestamp of when the record was last updated. | timestamp(3) with time zone | | **ingested_at** | Timestamp of when the record was ingested into Dune. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=message_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=message_events) # Noble Data Source: https://docs.dune.com/data-catalog/noble/overview Noble blockchain data on Dune ## What is Noble? Noble is a Cosmos application-specific blockchain purpose-built for native asset issuance. It brings the efficiency and interoperability of native assets to the wider Cosmos ecosystem, starting with USDC. Noble's vision is to be the world's premier issuance hub for digital assets that connect to other blockchains seamlessly. ## Key Features * **Native Asset Issuance**: Purpose-built for efficient and secure token issuance * **Cosmos Integration**: Built on Cosmos-SDK for seamless interoperability * **Smart Contract Capabilities**: Industry-standard asset issuance functionality * **IBC Compatibility**: Permissionless connection to other Cosmos chains * **Proof of Authority**: Currently uses a trusted validator set with economic security ## Noble Data on Dune Noble blockchain data is organized into several key tables that capture different aspects of on-chain activity: > [card] [Blocks](/data-catalog/noble/blocks) > > Contains each validated block in the chain > [card] [Block Events](/data-catalog/noble/block_events) > > Contains all block-level events and attributes in the chain, partitioned by event_index > [card] [Bridge Transfers](/data-catalog/noble/bridge_transfers) > > Cross-chain bridge transfer data > [card] [CCTP Transactions](/data-catalog/noble/cctp_transactions) > > Cross-Chain Transfer Protocol transactions > [card] [Message Events](/data-catalog/noble/message_events) > > Contains all events and their corresponding attributes partitioned by message_index > [card] [Swaps](/data-catalog/noble/swaps) > > Token swap and liquidity pool data > [card] [Transactions](/data-catalog/noble/transactions) > > Contains relevant data associated with each transaction > [card] [Transaction Messages](/data-catalog/noble/tx_messages) > > Contains all messages submitted to the blockchain > [card] [Validators](/data-catalog/noble/validators) > > Maps validator addresses to monikers (human-readable description) and other metadata # Swaps Source: https://docs.dune.com/data-catalog/noble/swaps Noble blockchain token swap transactions data # Table Description This table contains data about token swap transactions in the Noble blockchain, including swap details, token pairs, and execution status. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the swap occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **tx_id** | varchar | The unique ID of the transaction. | | **tx_index** | bigint | The index of the transaction in the block. | | **message_index** | bigint | The index of the message in the transaction. | | **event_index** | bigint | The index of the event in the message. | | **action_index** | bigint | The index of the action in the event. | | **sender** | varchar | The address of the sender. | | **token_amount_in** | decimal(38, 0) | The amount of tokens swapped in. | | **token_denom_in** | varchar | The denomination of the token swapped in. | | **token_amount_out** | decimal(38, 0) | The amount of tokens swapped out. | | **token_denom_out** | varchar | The denomination of the token swapped out. | | **routes** | varchar | The routes used for the swap. | | **fees** | varchar | The fees associated with the swap. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=swaps](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=swaps) # Transactions Source: https://docs.dune.com/data-catalog/noble/transactions Noble blockchain transactions data # Table Description This table contains data about transactions in the Noble blockchain, including transaction details, gas usage, and execution status. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_height** | bigint | The height of the block where the transaction occurred. | | **chain_id** | varchar | The ID of the chain where the transaction occurred. | | **tx_id** | varchar | The unique ID of the transaction. | | **tx_info** | varchar | Information related to the transaction. | | **tx_log_message** | varchar | The log message associated with the transaction. | | **memo** | varchar | A memo associated with the transaction. | | **fee** | varchar | The fee associated with the transaction. | | **tx_code** | bigint | The result code of the transaction. | | **tx_index** | bigint | The index of the transaction within the block. | | **gas_used** | bigint | The amount of gas used by the transaction. | | **gas_wanted** | bigint | The amount of gas requested by the transaction. | | **schema_version** | bigint | The schema version for the transaction data. | | **fee_coins** | varchar | The coins used to pay the transaction fee. | | **fee_granter** | varchar | The address granting the fee for the transaction. | | **fee_payer** | varchar | The address paying the fee for the transaction. | | **gas_limit** | bigint | The gas limit set for the transaction. | | **single_sign_mode** | bigint | The signing mode for single-signature transactions. | | **multi_sign_json** | varchar | JSON structure for multi-signature transactions. | | **timeout_height** | varchar | The timeout height set for the transaction. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=transactions) # Transaction Messages Source: https://docs.dune.com/data-catalog/noble/tx_messages Noble blockchain transaction messages data # Table Description This table contains data about messages contained within transactions in the Noble blockchain, including message types, content, and associated metadata. > [!TIP] > > On execution, transactions from Cosmos emit data in two formats: > > * Messages (`noble.tx_messages`): These provide a high-level, readable summary of actions, such as "send money" or "execute contract." They are easier to understand and track transaction types. > * Events (`noble.message_events`): These capture detailed, low-level changes at the chain level, including underlying blockchain modifications that may not always be directly related to state changes. > * Use Messages for a general overview and Events when you need detailed insights. The two tables are complementary. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **block_date** | date | The date of the block. | | **block_height** | bigint | The height of the block where the message occurred. | | **block_timestamp** | timestamp(3) with time zone | Timestamp when the block was validated. | | **chain_id** | varchar | The ID of the chain where the message belongs. | | **tx_id** | varchar | The hash of the transaction containing the message. | | **tx_index** | bigint | The index of the transaction in the block. | | **message_index** | bigint | The index of the message in the transaction. | | **message_type** | varchar | The type of message. | | **message** | varchar | The value/content of the message. | | **schema_version** | bigint | The version of the schema in provider database. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=tx_messages](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=tx_messages) # Validators Source: https://docs.dune.com/data-catalog/noble/validators Noble blockchain validators data # Table Description This table contains data about validators in the Noble blockchain, including their performance metrics, voting power, and status. ## Column Descriptions | Column name | Data Type | Description | | - | - | - | | **operator_address** | varchar | The operator address of the validator. | | **account_address** | varchar | The account address of the validator. | | **consensus_pubkey** | varchar | The consensus public key of the validator. | | **jailed** | boolean | Indicates whether the validator is jailed. | | **status** | varchar | The status of the validator (e.g., active, inactive). | | **tokens** | varchar | The number of tokens held by the validator. | | **moniker** | varchar | The moniker or name of the validator. | | **identity** | varchar | The identity information of the validator. | | **website** | varchar | The website of the validator. | | **security_contact** | varchar | The security contact information for the validator. | | **details** | varchar | Additional details about the validator. | | **unbonding_height** | bigint | The block height at which the validator started unbonding. | | **unbonding_time** | varchar | The time when the validator will complete unbonding. | | **commission_rate** | double | The commission rate charged by the validator. | | **commission_max_rate** | double | The maximum commission rate allowed for the validator. | | **commission_max_change_rate** | double | The maximum rate at which the validator can change its commission. | | **commission_update_time** | varchar | The time when the validator last updated its commission. | | **min_self_delegation** | varchar | The minimum self-delegation required for the validator. | | **snapshot_height** | bigint | The block height at which the snapshot was taken. | | **snapshot_time** | varchar | The time when the snapshot was taken. | | **updated_at** | timestamp(3) with time zone | Timestamp of when the record was last updated. | | **ingested_at** | timestamp(3) with time zone | Timestamp of when the record was ingested into Dune. | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=validators](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=noble\&table_name_t6f0df=validators) # Data Catalog Source: https://docs.dune.com/data-catalog/overview Explore Dune's comprehensive blockchain data catalog — raw, decoded, and curated datasets across 100+ blockchains, accessible via the web app, API, and Datashare. ## Everything Onchain, One Platform Raw, decoded, and curated datasets across 100+ blockchains — all queryable from a single platform. Whether you're building analytics, powering applications, or feeding data pipelines, every dataset is accessible through the [Data Hub](https://dune.com), [Data API](/api-reference/overview/introduction), or [Datashare](/datashare/datashare). > [!NOTE] > > **Access options:** [Data Hub](https://dune.com) · [Data API](/api-reference/overview/introduction) · [Datashare](/datashare/datashare) *** ## How Our Data Is Organized Dune's data catalog has three layers, each building on the one below: | Layer | What It Contains | Best For | | - | - | - | | **Raw** | Block, transaction, log, and trace data indexed directly from nodes | Full chain history, custom analysis, building your own models | | **Decoded** | Smart contract events and function calls parsed using verified ABIs | Protocol-specific analysis, contract interactions, event monitoring | | **Curated** | Cleaned, normalized datasets built and maintained by Dune's data team | Cross-chain analytics, market intelligence, production data pipelines | Most enterprise use cases start with **curated data** — pre-built, validated datasets that work across chains without writing complex raw queries. *** ## Access Tiers: Public vs Gated Datasets Every dataset in Dune's catalog belongs to one of two access tiers: | Tier | What It Means | Who Can Query It | | - | - | - | | 🟢 **Public** | Standard Dune datasets. Available to every user without an additional entitlement. | All plans (Free, Analyst, Plus, Enterprise) | | 🔒 **Gated** | Premium datasets. Discoverable to everyone but require an entitlement on your team before you can query them. | Workspaces granted access by Dune | > [!NOTE] > > **How gating actually works.** Gating is an *App-side, per-team entitlement* — it's not a property of the table itself. A gated table can still show up in the data explorer and in `searchTables`/`GET /v1/datasets/*` responses with `visibility: public`, but running a query against it requires an active entitlement on your workspace. The authoritative gated list is maintained in the **Dune Data Verticals** registry and reflected below. The vast majority of the catalog is Public — every raw chain table, every decoded event/call table, every community/partner dataset, the Dune Index, and many curated datasets. Gated datasets are a defined list of premium collections that Dune sells as products. ### Currently gated datasets > [!NOTE] > > **Sidebar signal.** Every gated table page in the left navigation carries a **`Gated`** tag next to its title. Pages without a tag are Public. Use the tag as a quick, in-context signal while browsing the catalog. | Dataset | Gated tables | Chains / notes | Docs | | - | - | - | - | | **Stablecoins** | The entire collection — every `stablecoins_.*` table (`transfers`, `balances`, `activity_enriched`, `balances_enriched`) plus `stablecoins_multichain.{transfers, balances, tokens}`. | 39 EVM chains, Solana, Tron, XRPL, multichain | [View →](/data-catalog/curated/stablecoins/overview) | | **Token Transfers (non-EVM & multichain)** | `tokens_multichain.transfers`, `tokens_aptos.transfers`, `tokens_stellar.transfers`, `tokens_sui.transfers`, `tokens_xrpl.transfers` | Multichain view + Aptos, Stellar, Sui, XRPL. The per-chain `tokens_evm.transfers`, `tokens_solana.transfers`, and `tokens_tron.transfers` stay Public. | [View →](/data-catalog/curated/token-transfers/overview) | | **EVM Balances** | All 72 balance tables — 24 EVM chains × `{latest, updates, daily_updates}` (arbitrum, avalanche_c, base, bnb, celo, ethereum, flare, gnosis, hyperevm, ink, kaia, linea, mantle, megaeth, monad, optimism, plasma, polygon, robinhood, sei, sonic, unichain, worldchain, zksync) | Sold as an Enterprise add-on. `solana_utils.latest_balances` remains Public. | [View →](/data-catalog/curated/balances/overview) | | **Prediction Markets** | Most of the collection: Polymarket `polymarket_polygon.{market_trades, market_details, market_prices_hourly, combo_trades, combo_details, combo_actions, combo_prices_hourly, positions, ohlcv_hourly, open_interest_hourly, market_actions}`, Kalshi `kalshi.{market_trades, market_details, ohlcv_hourly, open_interest_hourly}`, Hyperliquid HIP-4 `hip4_hyperliquid.{market_details, market_trades, ohlcv_hourly, open_interest_hourly, positions_daily}`, and the cross-venue `prediction_markets.{markets, trades, ohlcv_hourly, open_interest_hourly}` rollups. | Polygon (Polymarket) + Hyperliquid (HIP-4) + off-chain (Kalshi). Public tables: Polymarket `users_address_lookup`; Kalshi `market_report`, `trade_report`. | [View →](/data-catalog/curated/prediction-markets/overview) | | **Payments** | `payments.card_transactions`, `payments.agentic_payments`, `payments.commerce_flows` | EVM chains, Solana, Tron | [View →](/data-catalog/curated/payments/overview) | | **Real-World Assets (RWAs)** | The entire RWA collection — `rwa_multichain.{tokens, tokens_reference_data, product_reference_data, balances, balances_enriched, supply, supply_changes, transfers, trades, prices, nav, nav_intervals, unit_conversions}` and `rwa_hyperliquid.{markets, perp_trades, perp_metrics_hourly, perp_metrics_daily, perp_positions_hourly}`. | 24 chains (EVM + Solana, Aptos, Sui, XRPL, Stellar) plus Hyperliquid HIP-3 synthetic perps. | [View →](/data-catalog/curated/rwa/overview) | | **Perpetuals Trading** | The entire collection — `hyperliquid.{perp_market_details, perp_market_metadata, perp_trades, perp_market_metrics_hourly, perp_market_metrics_daily, perp_positions_hourly, perp_accounts_daily, perp_oracle_prices, perp_orderbook_1m}`. | Hyperliquid, first-party and HIP-3 builder-deployed perpetual markets. | [View →](/data-catalog/curated/perpetuals/overview) | Every gated dataset page carries a **Gated dataset** callout at the top, and every gated table page shows a **`Gated`** tag in the sidebar, so you can spot the gating in-context. ### What stays Public * Every raw / canonical chain table across [EVM](/data-catalog/evm/ethereum/overview), [Solana](/data-catalog/solana/overview), and all other chains. * Every decoded event/call table (EVM ABIs, Solana IDLs), including the `ethereum.logs_decoded` collection. * The three per-chain token-transfer tables: `tokens_evm.transfers`, `tokens_solana.transfers`, `tokens_tron.transfers`. * Labels & entity attributions: `cex.{addresses, deposit_addresses, flows}`, `labels.ens`, `safe.safes_all`, and the wider [Labels](/data-catalog/curated/labels/overview) collection. * Solana balance table (`solana_utils.latest_balances`). * **Prediction Markets (Public tables):** Polymarket `polymarket_polygon.users_address_lookup` and Kalshi `kalshi.{market_report, trade_report}`. Everything else in the Prediction Markets collection is Gated. * All other curated datasets not listed as gated above — DEX Trades, NFT Trades, Prices, Token Metadata, Bridges, Lending, Staking, Gas & Fees, Rollup Economics, Utilities, Vaults. * All [community and partner](#partner-data) datasets and the [Dune Index](#dune-index). > [!NOTE] > > **Need access to a gated dataset?** [Contact the Dune team](https://dune.com/enterprise#contact-form) to enable your workspace. *** ## Curated Datasets Curated datasets are where Dune adds the most value. Built and maintained by Dune's data team, each dataset normalizes data from hundreds of protocols across dozens of chains into a single, consistent schema. The **Access** column shows whether the dataset is Public (🟢) or Gated (🔒). See [Access Tiers](#access-tiers-public-vs-gated-datasets) above for the full gated table list. | Category | Dataset | Description | Coverage | Access | Docs | | - | - | - | - | :-: | - | | **Trading & Markets** | DEX Trades | Trade execution data across decentralized exchanges | 50 EVM chains, Solana | 🟢 Public | [View →](/data-catalog/curated/dex-trades/overview) | | | NFT Trades | NFT marketplace trades, mints, and metadata | 12 chains (EVM + Solana) | 🟢 Public | [View →](/data-catalog/curated/nft-trades/overview) | | | Prediction Markets | Polymarket, Kalshi, and Hyperliquid HIP-4 market activity, positions, and pricing | Polygon, Hyperliquid, Off-chain | 🔒 Gated (most tables, see [Prediction Markets](/data-catalog/curated/prediction-markets/overview)) · 🟢 Public (Polymarket `users_address_lookup`, Kalshi `market_report`/`trade_report`) | [View →](/data-catalog/curated/prediction-markets/overview) | | | Real-World Assets (RWAs) | Tokenized treasuries, equities, commodities, and synthetic RWA perpetuals — registry, holders/supply, prices and NAV, and activity | 24 chains (EVM + Solana, Aptos, Sui, XRPL, Stellar) + Hyperliquid HIP-3 | 🔒 Gated (entire collection) | [View →](/data-catalog/curated/rwa/overview) | | | Perpetuals Trading | Perpetual futures venue-wide — market reference, per-fill trades, hourly and daily market metrics, per-account positions and activity, oracle prices, and order book snapshots | Hyperliquid (first-party + HIP-3) | 🔒 Gated (entire collection) | [View →](/data-catalog/curated/perpetuals/overview) | | **Assets & Pricing** | Token Transfers | Fungible token transfer events across EVM and non-EVM ecosystems | All EVM, Solana, Aptos, Stellar, Sui, XRPL | 🟢 Public (EVM / Solana / Tron) · 🔒 Gated (multichain, Aptos, Stellar, Sui, XRPL) | [View →](/data-catalog/curated/token-transfers/overview) | | | Balances | Current and historical token balances by address | 24 EVM chains, Solana | 🔒 Gated (EVM) · 🟢 Public (Solana) | [View →](/data-catalog/curated/balances/overview) | | | Prices | Token pricing at minute, hourly, and daily granularity | 70+ chains | 🟢 Public | [View →](/data-catalog/curated/prices/overview) | | | Token Metadata | Token names, symbols, decimals, and contract addresses | All EVM, Solana | 🟢 Public | [View →](/data-catalog/curated/token-metadata/overview) | | | Stablecoins | Stablecoin transfers, balances, and activity classification | 39 EVM, Solana, Tron, XRPL | 🔒 Gated (entire collection — foundation `transfers`/`balances`, `*_enriched`, and `stablecoins_multichain.*`) | [View →](/data-catalog/curated/stablecoins/overview) | | | Payments | Card, agentic, and commerce-flow payment activity across stablecoin rails | EVM, Solana, Tron | 🔒 Gated | [View →](/data-catalog/curated/payments/overview) | | **DeFi & Cross-Chain** | CEX Flows | Token flows to/from centralized exchanges with entity identification | 29 chains | 🟢 Public | [View →](/data-catalog/curated/cex-flows/overview) | | | Bridges | Cross-chain token transfers — deposits, withdrawals, and flows | 41 EVM chains | 🟢 Public | [View →](/data-catalog/curated/bridges/overview) | | | Lending | Supply, borrow, flash loans, and liquidations across lending protocols | 15 EVM chains | 🟢 Public | [View →](/data-catalog/curated/lending/overview) | | | Staking | Ethereum beacon chain deposits, withdrawals, and entity identification | Ethereum | 🟢 Public | [View →](/data-catalog/curated/staking/overview) | | | Vaults | Decoded vault protocol activity across lending, liquid staking, and DeFi yield | 6+ chains | 🟢 Public | [View →](/data-catalog/curated/vaults/overview) | | **Identity, Costs & Utilities** | Labels | Address attribution — exchanges, protocols, DAOs, entities | Cross-chain | 🟢 Public | [View →](/data-catalog/curated/labels/overview) | | | Gas & Fees | Transaction-level fee data with L2 fee breakdowns | 55 EVM chains, Solana | 🟢 Public | [View →](/data-catalog/curated/gas-fees/overview) | | | Rollup Economics | L2 rollup profitability — revenue vs L1 posting costs | 10-25 rollups | 🟢 Public | [View →](/data-catalog/curated/rollup-economics/overview) | | | Utilities | Time-series scaffolding tables (days, hours, minutes) | Universal | 🟢 Public | [View →](/data-catalog/curated/utilities/overview) | > [!TIP] > > Each dataset page includes example SQL queries for common workflows — from compliance monitoring and portfolio valuation to protocol benchmarking and market intelligence. *** ## Blockchain Coverage Dune indexes raw, decoded, and curated data across 100+ blockchains. The table below shows exactly what's available for each chain, derived from documented data catalog pages. | VM | Chain | Raw | Decoded | DEX | Transfers | Balances | Prices | CEX | NFT | Labels | Bridges | Gas | Stablecoins | | - | - | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | | **SVM** | Solana | ✅ | ✅ IDL | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | | **EVM** | Abstract | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | ApeChain | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Arc | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **EVM** | Arbitrum | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Arbitrum Nova | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Avalanche | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | B3 | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | | **EVM** | Base | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Beacon | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **EVM** | Berachain | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Blast | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | BNB | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | BOB | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Boba | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Celo | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Corn | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Cronos | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | | **EVM** | Degen | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | Ethereum | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Fantom | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Flare | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Gnosis | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Hemi | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | Henesys | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | HyperEVM | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Ink | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | KAIA | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Katana | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Lens | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Linea | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Mantle | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | MegaETH | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | Mezo | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | Monad | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | Monad Testnet | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | | **EVM** | Morph | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | opBNB | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Optimism | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Peaq EVM | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | Plasma | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Plume | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Polygon | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Polygon zkEVM | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | RISE | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | | **EVM** | Robinhood | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | | **EVM** | Ronin | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Scroll | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Sei | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Sepolia | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **EVM** | Shape | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | | **EVM** | Sonic | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Somnia | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | Sophon | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Story | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Superseed | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | Tac | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | Taiko | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ | | **EVM** | Tezos EVM | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | | **EVM** | Tron | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | | **EVM** | Unichain | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Viction | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | | **EVM** | World Chain | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | X Layer | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | | **EVM** | zkSync | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **EVM** | Zora | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | **Move** | Aptos | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | | **Move** | Sui | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Bitcoin** | Bitcoin | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | | **Substrate** | Polkadot | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Substrate** | Peaq | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **StarkVM** | Starknet | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Other** | Echelon | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Other** | Flow | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Other** | Fuel | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Other** | Initia | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Other** | Midnight | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Other** | NEAR | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | | **Other** | Noble | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Other** | Stellar | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Other** | THORChain | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Other** | TON | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | | **Other** | XRPL | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | **Other** | Yominet | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | > [!NOTE] > > **Need a chain that's not listed?** We're always expanding coverage. [Talk to our team →](https://dune.com/enterprise) ### Hyperliquid Hyperliquid is a high-performance L1 built for onchain order book trading. Dune currently provides **market data** — real-time and historical order book, funding rates, and trading activity via `hyperliquid.market_data`. Additional Hyperliquid L1 data is coming soon. > [card] [Hyperliquid Market Data](/data-catalog/community/hyperliquid/overview) > > Explore available Hyperliquid tables — order book snapshots, funding rates, and trade history. > [card] [Get Early Access](https://dune.com/enterprise) > > Need more Hyperliquid data? Talk to our team about early access. ### Protocols Protocol-level datasets provide specialized data beyond standard blockchain indexing: | Protocol | Description | Docs | | - | - | - | | **Kalshi** | Prediction market data — event contracts, trades, and settlement | [View →](/data-catalog/kalshi/overview) | | **LayerZero** | Cross-chain messaging and bridging data | [View →](/data-catalog/layerzero/overview) | | **Succinct** | ZK proof generation and verification data | [View →](/data-catalog/succinct/overview) | *** ## Custom & Raw Access For teams that need to go beyond curated datasets — build your own models, query raw blockchain data, or bring your own data into Dune: > [card] [Raw Tables](/data-catalog/evm/ethereum/overview) > > Block, transaction, log, and trace data indexed directly from nodes across all supported chains — [EVM](/data-catalog/evm/ethereum/overview) and [Solana](/data-catalog/solana/overview). > [card] [Decoded Tables](/data-catalog/evm/ethereum/decoded/overview) > > Smart contract events and function calls parsed using verified ABIs or IDLs — [EVM](/data-catalog/evm/ethereum/decoded/overview) and [Solana IDL](/data-catalog/solana/idl-tables). > [card] [Transform with dbt](/api-reference/connectors/dbt/overview) > > Run production-grade dbt projects directly on Dune — build, test, and deploy transformation pipelines with full incremental model support. > [card] [Bring Your Data](/web-app/upload-data) > > Upload CSVs, connect external data sources, or push data via API to join with onchain data. *** ## Partner Data Dune provides off-chain and specialized datasets from partner data providers that are critical to onchain analysis: | Partner | Description | Docs | | - | - | - | | **Flashbots** | MEV bundle data, searcher activity, and block builder analytics | [View →](/data-catalog/community/flashbots/overview) | | **Farcaster** | Social graph data — casts, reactions, profiles, and channels | [View →](/data-catalog/community/farcaster/overview) | | **Lens** | Decentralized social media — publications, profiles, and interactions | [View →](/data-catalog/community/lens/overview) | | **Reservoir** | NFT market data — orders, sales, and collection metadata | [View →](/data-catalog/community/reservoir/overview) | | **Snapshot** | Governance data — proposals, votes, and DAO activity | [View →](/data-catalog/community/snapshot/overview) | *** ## Dune Index Standardized onchain metrics for benchmarking blockchain activity: | Metric | Description | Docs | | - | - | - | | **Transaction Fees** | Gas fee trends and comparisons across chains | [View →](/data-catalog/dune-index/gas-fees) | | **Net Transfers** | Token flow analysis across networks | [View →](/data-catalog/dune-index/net-transfers) | | **Transactions** | Transaction volume and activity metrics | [View →](/data-catalog/dune-index/transactions) | *** ## Why Teams Choose Dune's Data > [card] Enterprise-Grade Pipelines > > All curated datasets are built using industry-standard data engineering tooling — the same practices used by enterprise data teams worldwide. > [card] Continuous Quality Checks > > Blocks are validated at ingestion, core tables are monitored for gaps and duplicates, and curated datasets are tested when their code changes. [Learn more →](/data-catalog/data-quality) > [card] Cross-Chain by Default > > Every curated dataset spans dozens of chains with consistent schemas. No stitching required. > [card] Transparent Methodology > > Every curated dataset documents how it's built, what design decisions were made, and what limitations exist. *** ## Data Trust & Freshness Every dataset in the catalog is backed by Dune's [data quality framework](/data-catalog/data-quality): blocks are validated at ingestion, core tables are monitored for gaps and duplicates, and curated datasets are tested when their code changes. Raw data typically arrives within minutes of onchain finality. Curated datasets refresh hourly. For real-time status, see [Data Freshness](/data-catalog/data-freshness) and [Status Page](https://status.dune.com/). *** ## Get Started > [card] [Query in the Data Hub](https://dune.com) > > Write SQL against any dataset in the catalog — no infrastructure needed. > [card] [Access via API](/api-reference/overview/introduction) > > Programmatic access to query results, real-time data, and execution endpoints. > [card] [Datashare](/datashare/datashare) > > Direct access to Dune's full data warehouse in your own Snowflake, BigQuery, or Databricks environment. > [card] [Enterprise](https://dune.com/enterprise) > > Custom SLAs, dedicated support, and priority data requests. # peaq.balances Source: https://docs.dune.com/data-catalog/peaq/balances Peaq account balances. ## Table description The `peaq.balances` table tracks account balance snapshots on the Peaq network, capturing the state of user assets at specific timestamps. This table is partitioned by `year`, `month`, and `day` for efficient querying. Each record includes balance information in both processed (double) and raw (string) formats, allowing for precise balance tracking. The table tracks multiple balance types including free balances, reserved balances, and various frozen balance states (misc_frozen and frozen). Accounts are identified using SS58 addresses (`address_ss58`) and public keys (`address_pubkey`), supporting both human-readable and binary address formats. The table also includes chain and asset metadata such as `symbol`, `chain_name`, `asset`, and `para_id` for multi-chain support. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **year** | The year when the balance snapshot was taken, used for partitioning. | int | | **month** | The month when the balance snapshot was taken, used for partitioning. | int | | **day** | The day when the balance snapshot was taken, used for partitioning. | int | | **ts** | The timestamp when the balance snapshot was taken. | timestamp | | **symbol** | The symbol of the asset (e.g., "PEAQ"). | string | | **address_ss58** | The SS58-encoded address of the account in human-readable format. | string | | **address_pubkey** | The public key of the account in binary format. | binary | | **id** | The unique identifier for the balance record. | string | | **chain_name** | The name of the chain where the balance exists. | string | | **asset** | The asset identifier or symbol. | string | | **para_id** | The parachain ID associated with the balance, if applicable. | long | | **free** | The free balance available to the account, in processed format. | double | | **reserved** | The reserved balance that is locked but still owned by the account. | double | | **misc_frozen** | The miscellaneous frozen balance that cannot be used for certain operations. | double | | **frozen** | The total frozen balance that cannot be used. | double | | **nonce** | The account nonce, representing the number of transactions from this account. | long | | **free_raw** | The free balance in raw string format, preserving full precision. | string | | **reserved_raw** | The reserved balance in raw string format, preserving full precision. | string | | **misc_frozen_raw** | The miscellaneous frozen balance in raw string format, preserving full precision. | string | | **frozen_raw** | The frozen balance in raw string format, preserving full precision. | string | | **flags_raw** | The raw flags associated with the account balance state. | string | | **\_updated_at** | The time when the balance record was last updated. | timestamp | | **\_ingested_at** | The time when the balance data was ingested into the system. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=balances) # peaq.evm_blocks Source: https://docs.dune.com/data-catalog/peaq/blocks Peaq EVM-compatible block data. ## Table description The `peaq.evm_blocks` table stores basic information about Peaq blocks, with one record per block, including the block hash and statistics on the number of extrinsics, events, and transfers contained in each block. This table is partitioned by `year`, `month`, and `day` for efficient querying. Each block record includes metadata such as block number, specification version, relay chain block number, block hashes (hash, parent hash, state root, extrinsics root), block author information, and counts of various operations (extrinsics, events, transfers, traces). ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **year** | The year when the block was created, used for partitioning. | int | | **month** | The month when the block was created, used for partitioning. | int | | **day** | The day when the block was created, used for partitioning. | int | | **block_time** | The timestamp when the block was created. | timestamp | | **number** | The block number (sequence number) of the block. | long | | **spec_version** | The specification version of the runtime when this block was created. | long | | **relay_block_number** | The block number of the relay chain block associated with this block. | long | | **hash** | The hash of the current block, in binary format. | binary | | **parent_hash** | The hash of the parent block, in binary format. | binary | | **state_root** | The Merkle root of the state trie after applying all transactions in this block. | binary | | **extrinsics_root** | The Merkle root of the extrinsics included in this block. | binary | | **author_ss58** | The SS58-encoded address of the block author (validator) in human-readable format. | string | | **author_pub_key** | The public key of the block author (validator) in binary format. | binary | | **relay_state_root** | The state root of the relay chain associated with this block. | binary | | **extrinsic_count** | The number of extrinsics (transactions) included in this block. | long | | **event_count** | The number of events emitted in this block. | long | | **transfer_count** | The number of transfers executed in this block. | long | | **trace_count** | The number of traces generated in this block. | long | | **\_updated_at** | The time when the block record was last updated. | timestamp | | **\_ingested_at** | The time when the block data was ingested into the system. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=blocks) # peaq.calls Source: https://docs.dune.com/data-catalog/peaq/calls Peaq dispatch calls — pallet function calls within extrinsics. ## Table description Compared to the `extrinsics` table, which only has a top-level call, the `calls` table represents *internal* calls, including recursive internal calls of `proxy` and `utility` (batch) pallets, and provides detailed call arguments at each level of the call tree. The `peaq.calls` table is partitioned by `year`, `month`, `call_section`, and `call_method` for efficient querying. Common queries on the `calls` table will typically filter on `block_time`, `call_section` and `call_method` and extract JSON encoded information from `call_args` or `call_args_def`. Each call record includes information about the pallet section and method being called, the extrinsic it belongs to, call hierarchy (root/leaf), fee and weight information, signer details, and call arguments in both raw and decoded formats. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **year** | The year when the call was executed, used for partitioning. | int | | **month** | The month when the call was executed, used for partitioning. | int | | **call_section** | The pallet section (module) where the call originates (e.g., "balances", "system"). | string | | **call_method** | The method name within the pallet section being called. | string | | **block_number** | The block number where this call was executed. | bigint | | **block_time** | The timestamp when the block containing this call was created. | timestamp | | **extrinsic_id** | The unique identifier of the extrinsic that contains this call. | string | | **relay_chain** | The name of the relay chain associated with this call. | string | | **para_id** | The parachain ID associated with this call, if applicable. | long | | **id** | The unique identifier for the call record. | string | | **block_hash** | The hash of the block containing this call, in binary format. | binary | | **extrinsic_hash** | The hash of the extrinsic containing this call, in binary format. | binary | | **extrinsic_section** | The pallet section of the top-level extrinsic. | string | | **extrinsic_method** | The method name of the top-level extrinsic. | string | | **call_id** | The unique identifier for this specific call within the call tree. | string | | **call_index** | The index of this call within the call hierarchy, in binary format. | binary | | **call_args** | The raw call arguments in JSON format. | string | | **call_args_def** | The decoded call arguments definition with type information. | string | | **root** | Indicates whether this is a root-level call (top of the call tree). | boolean | | **leaf** | Indicates whether this is a leaf-level call (bottom of the call tree). | boolean | | **fee** | The fee charged for executing this call, in processed format. | double | | **weight** | The computational weight consumed by this call. | long | | **signed** | Indicates whether the extrinsic containing this call was signed. | boolean | | **signer_ss58** | The SS58-encoded address of the account that signed the extrinsic, in human-readable format. | string | | **signer_pub_key** | The public key of the account that signed the extrinsic, in binary format. | binary | | **lifetime** | The lifetime or validity period of the call, if applicable. | string | | **\_updated_at** | The time when the call record was last updated. | timestamp | | **\_ingested_at** | The time when the call data was ingested into the system. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=calls](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=calls) # peaq.events Source: https://docs.dune.com/data-catalog/peaq/events Peaq runtime events — pallet-level events emitted during execution. ## Table description The `peaq.events` table holds all events that occur on the Peaq chain, including their pallet `section` and `method`, as well as the decoded data involved in the event. This table is partitioned by `year`, `month`, `section`, and `method` for efficient querying. Events are emitted by the runtime and pallets to signal state changes, transaction results, and other important occurrences on the chain. Each event record includes the pallet section and method that emitted it, the block and extrinsic it belongs to, and event data in both raw and decoded formats. Common queries on the `events` table will typically filter on `block_time`, `section` and `method` and extract JSON encoded information from `data` or `data_decoded`. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **year** | The year when the event was emitted, used for partitioning. | int | | **month** | The month when the event was emitted, used for partitioning. | int | | **section** | The pallet section (module) that emitted the event (e.g., "balances", "system"). | string | | **method** | The method name within the pallet section that identifies the event type. | string | | **block_time** | The timestamp when the block containing this event was created. | timestamp | | **block_number** | The block number where this event was emitted. | bigint | | **extrinsic_id** | The unique identifier of the extrinsic that triggered this event. | string | | **event_id** | The unique identifier for the event record. | string | | **data** | The raw event data in JSON format. | string | | **extrinsic_hash** | The hash of the extrinsic that triggered this event, in binary format. | binary | | **block_hash** | The hash of the block containing this event, in binary format. | binary | | **data_decoded** | The decoded event data with type information and human-readable values. | string | | **\_updated_at** | The time when the event record was last updated. | timestamp | | **\_ingested_at** | The time when the event data was ingested into the system. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=events) # peaq.extrinsics Source: https://docs.dune.com/data-catalog/peaq/extrinsics Peaq extrinsics — signed and unsigned transactions. ## Table description Extrinsics (aka "transactions") normally contain a signature, some data to describe if the extrinsic has passed some validity checks and a reference to the pallet and call that it is intended for. Extrinsics may be signed or unsigned. Some extrinsics have a complex structure, e.g. when using proxy or utility pallets, resulting in the top-level call initiating other calls involving other pallets. The `peaq.extrinsics` table is partitioned by `year`, `month`, `section`, and `method` for efficient querying. Common queries on the `extrinsics` table will typically filter on `block_time`, `section` and `method` and extract JSON encoded information from `params`. In many cases, an initial query on the `extrinsics` table is best developed on the calls table instead to properly capture how users often use proxy and utility constructs to interact with the Peaq chain. Each extrinsic record includes the top-level call information (section and method), block and hash information, signer details, fee and weight, execution status, and call parameters. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **year** | The year when the extrinsic was executed, used for partitioning. | int | | **month** | The month when the extrinsic was executed, used for partitioning. | int | | **section** | The pallet section (module) of the top-level call (e.g., "balances", "system"). | string | | **method** | The method name of the top-level call within the pallet section. | string | | **block_time** | The timestamp when the block containing this extrinsic was created. | timestamp | | **block_number** | The block number where this extrinsic was executed. | long | | **extrinsic_id** | The unique identifier for the extrinsic record. | string | | **hash** | The hash of the extrinsic, in binary format. | binary | | **block_hash** | The hash of the block containing this extrinsic, in binary format. | binary | | **lifetime** | The lifetime or validity period of the extrinsic, if applicable. | string | | **params** | The call parameters in JSON format, containing the arguments passed to the call. | string | | **fee** | The fee charged for executing this extrinsic, in processed format. | double | | **weight** | The computational weight consumed by this extrinsic. | long | | **signed** | Indicates whether the extrinsic was signed by an account. | boolean | | **signer_ss58** | The SS58-encoded address of the account that signed the extrinsic, in human-readable format. | string | | **signer_pub_key** | The public key of the account that signed the extrinsic, in binary format. | binary | | **status** | Indicates whether the extrinsic execution was successful. | boolean | | **\_updated_at** | The time when the extrinsic record was last updated. | timestamp | | **\_ingested_at** | The time when the extrinsic data was ingested into the system. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=extrinsics](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=extrinsics) # Peaq Overview Source: https://docs.dune.com/data-catalog/peaq/overview Peaq blockchain data on Dune ## What is Peaq? Peaq is a layer-1 blockchain purpose-built and optimized to power the Machine Economy. The platform enables: > [card] DePINs > > Decentralized Physical Infrastructure Networks > [card] DePAI > > Decentralized Physical AI > [card] Machine DeFi > > Decentralized Finance based on machines' on-chain economic value and activity > [card] Machine RWAs > > Tokenized machines bringing real-world economic value on-chain By leveraging parallelized block production, asynchronous backing, and agile core time, peaq currently handles up to 10,000 transactions per second (TPS). It is set to scale beyond 100,000 TPS after future upgrades, all while maintaining a minimum transaction cost of approximately \$0.00025. peaq leverages the world's environmentally-friendliest blockchain architecture and leverages one of the highest Nakamoto Coefficients in the industry to ensure censorship resistance. peaq offers a comprehensive suite of ready-to-use Modular DePIN and DePAI Functions, granting builders and machines essential core functionalities to leverage for seamless deployment. These include self-sovereign machine IDs, role-based access control, data verification, universal machine time, seamless machine payment processing, data storage, data indexing, AI agents, and more. All functions are accessible via the peaq SDK, allowing developers to deploy them with just \~15 lines of code. ## Peaq Data on Dune Peaq blockchain data is organized into several key tables that capture different aspects of on-chain activity: > [card] [Blocks](/data-catalog/peaq/blocks) > > Core block data including block headers, validators, and block statistics. > [card] [Extrinsics](/data-catalog/peaq/extrinsics) > > Detailed transaction data, encompassing both signed and unsigned operations, directly invoking pallet functions. > [card] [Events](/data-catalog/peaq/events) > > All events emitted by the runtime, including system events, and events from all pallets. > [card] [Calls](/data-catalog/peaq/calls) > > Comprehensive info on function calls, expanding top-level extrinsics with internal calls. > [card] [Transfers](/data-catalog/peaq/transfers) > > Complete ledger of asset transfers across the network, capturing the movement of tokens between accounts. > [card] [Balances](/data-catalog/peaq/balances) > > Daily snapshots capturing the state of user assets, reflecting the end-of-day balances. > [card] [Peaq Documentation](https://docs.peaq.xyz/build/introduction) > > Official documentation for developers building on Peaq # peaq.transfers Source: https://docs.dune.com/data-catalog/peaq/transfers Peaq native token transfers. ## Table description The `peaq.transfers` table stores complete ledger of asset transfers across the Peaq network, capturing the movement of tokens between accounts. This table is partitioned by `year`, `month`, and `day` for efficient querying. Each transfer record includes information about the sender and recipient (in both SS58 and public key formats), the asset being transferred, the amount in both processed (double) and raw (decimal) formats, and the event and extrinsic that triggered the transfer. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **year** | The year when the transfer occurred, used for partitioning. | int | | **month** | The month when the transfer occurred, used for partitioning. | int | | **day** | The day when the transfer occurred, used for partitioning. | int | | **block_time** | The timestamp when the block containing this transfer was created. | timestamp | | **block_number** | The block number where this transfer occurred. | long | | **event_id** | The unique identifier of the event that represents this transfer. | string | | **extrinsic_id** | The unique identifier of the extrinsic that triggered this transfer. | string | | **section** | The pallet section (module) that emitted the transfer event. | string | | **method** | The method name within the pallet section that identifies the transfer type. | string | | **extrinsic_hash** | The hash of the extrinsic that triggered this transfer, in binary format. | binary | | **block_hash** | The hash of the block containing this transfer, in binary format. | binary | | **from_ss58** | The SS58-encoded address of the sender account, in human-readable format. | string | | **from_pub_key** | The public key of the sender account, in binary format. | binary | | **to_ss58** | The SS58-encoded address of the recipient account, in human-readable format. | string | | **to_pub_key** | The public key of the recipient account, in binary format. | binary | | **asset** | The asset identifier or address being transferred. | string | | **symbol** | The symbol of the asset being transferred (e.g., "PEAQ"). | string | | **decimals** | The number of decimal places for the asset. | long | | **amount** | The transfer amount in processed format (double). | double | | **raw_amount** | The transfer amount in raw format, preserving full precision (decimal 38,9). | decimal(38,9) | | **\_updated_at** | The time when the transfer record was last updated. | timestamp | | **\_ingested_at** | The time when the transfer data was ingested into the system. | timestamp | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=peaq\&table_name_t6f0df=transfers) # solana.account_activity Source: https://docs.dune.com/data-catalog/solana/account-activity Track every SOL and SPL token balance change per account per transaction — essential for wallet activity monitoring, treasury tracking, compliance auditing, and building real-time portfolio analytics on Solana. ## Table description The `solana.account_activity` table contains information from the transactions table focused on account usage. Each row contains all information about an account's usage in a transaction. ## Table Schema | Column | Type | Description | | - | - | - | | `block_date` | `DATE` | The date of the block this account activity occurred in | | `block_slot` | `BIGINT` | The slot number of the block containing this activity | | `block_time` | `TIMESTAMP` | The timestamp of the block this activity belongs to | | `address` | `VARCHAR` | The Solana account address involved in the transaction | | `tx_index` | `INTEGER` | The index position of the transaction within the block | | `token_mint_address` | `VARCHAR` | The mint address of the SPL token involved, null for native SOL transfers | | `tx_id` | `VARCHAR` | The unique transaction signature/ID | | `block_hash` | `VARCHAR` | The hash of the block containing this transaction | | `tx_success` | `BOOLEAN` | Whether the transaction completed successfully | | `signed` | `BOOLEAN` | Whether this account signed the transaction | | `writable` | `BOOLEAN` | Whether this account had write access in the transaction | | `pre_balance` | `BIGINT` | The account's SOL balance (in lamports) before the transaction | | `post_balance` | `BIGINT` | The account's SOL balance (in lamports) after the transaction | | `balance_change` | `BIGINT` | The net change in SOL balance (in lamports) from this transaction | | `pre_token_balance` | `DECIMAL(38,18)` | The account's SPL token balance before the transaction (decimal-adjusted) | | `post_token_balance` | `DECIMAL(38,18)` | The account's SPL token balance after the transaction (decimal-adjusted) | | `token_balance_change` | `DECIMAL(38,17)` | The net change in SPL token balance from this transaction (decimal-adjusted) | | `token_balance_owner` | `VARCHAR` | The owner address of the token account | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=account_activity](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=account_activity) # solana.blocks Source: https://docs.dune.com/data-catalog/solana/blocks Solana block-level data including slot numbers, leader identity, rewards, and transaction counts. Blocks contain transactions which contain instructions that alter the state of the Solana blockchain. Use this data for network throughput analysis, validator performance benchmarking, and infrastructure monitoring. ## Table description The `solana.blocks` table contains the block data within Solana's blockchain. It can be used to identify block activity and transaction changes over time. ## Table Schema | Column | Type | Description | | - | - | - | | `slot` | `BIGINT` | The slot number of the block, used as the primary block identifier on Solana | | `height` | `BIGINT` | The block height (number of blocks since genesis) | | `time` | `TIMESTAMP` | The timestamp when the block was produced | | `date` | `DATE` | The date the block was produced | | `hash` | `VARCHAR` | The unique hash of the block | | `total_transactions` | `INTEGER` | Total number of transactions included in the block (vote + non-vote) | | `successful_transactions` | `INTEGER` | Number of transactions that completed successfully | | `failed_transactions` | `INTEGER` | Number of transactions that failed | | `total_vote_transactions` | `INTEGER` | Total number of validator vote transactions in the block | | `total_non_vote_transactions` | `INTEGER` | Total number of non-vote (user) transactions in the block | | `successful_vote_transactions` | `INTEGER` | Number of vote transactions that succeeded | | `successful_non_vote_transactions` | `INTEGER` | Number of non-vote transactions that succeeded | | `failed_vote_transactions` | `INTEGER` | Number of vote transactions that failed | | `failed_non_vote_transactions` | `INTEGER` | Number of non-vote transactions that failed | | `parent_slot` | `BIGINT` | The slot number of the parent block | | `previous_block_hash` | `VARCHAR` | The hash of the parent block | | `num_reward_partitions` | `BIGINT` | The number of reward partitions in this block | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=blocks) # Solana Decoded Tables Source: https://docs.dune.com/data-catalog/solana/idl-tables Decoded Solana program data using Interface Description Language (IDL) definitions — human-readable instruction and event data for DeFi protocols, NFT marketplaces, and any Solana program. The fastest path from raw bytes to actionable analytics. > [!NOTE] > > **IDL Submissions** > > You can submit any program for decoding that has a public IDL or GitHub repo (Anchor, native, and system are supported), for example [Jupiter on Solscan](https://solscan.io/account/JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB#anchorProgramIDL). Use [dune.com/contracts/new](https://dune.com/contracts/new) and select Solana, or see [Solana program decoding submissions](/web-app/decoding/solana-decoding-submissions) for the full flow and IDL requirements. Decoded tables inherit all of the columns from [`instruction_calls`](/data-catalog/solana/instruction-calls), so you can refer there for most of the types. We only add columns for each argument in the function call `data` and each account that was required to be in `account_arguments`. **These only decode from instructions, and not inner instructions.** ## Example IDL Decoded Walkthrough Using an IDL, we decode the function data arguments and the required account arguments. Let's look at an example using Whirlpool - normally you can find the IDL [on Solscan](https://solscan.io/account/whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc#anchorProgramIDL), but this time we had to dig [into the project repo](https://github.com/orca-so/whirlpools/blob/main/sdk/src/artifacts/whirlpool.json). IDLs are like ABIs on Ethereum, except they are created from the [Anchor lang](https://www.anchor-lang.com/) project instead of natively from every program. [Here's a transaction](https://solscan.io/tx/TGDKvM2E8mWYcsG2JBnb9axFcyEcKqs7yZLyayCmrV8p8SSdA8r9SLEC7EHQ4mcXQXpczEyaCBXvnmEi9yoKVJ9) of a pool (a trading pair) being initialized. You can see that the instruction data is decoded in "Bumps", "TickSpacing", and "InitialSqrtPrice" on the explorer. We have the same thing in a SQL table! You can also see all the account names are labelled clearly as well with an `account_` prefix. Raw table inherited columns like `tx_id`, `block_time`, `tx_index` get a `call_` prefix. The main thing to note is that we've exploded outer and inner instructions, where the index will match what you see on explorers. This example call is at the outer instruction level, so the inner instruction index is null. For Whirlpool swaps, often times it will happen in inner_instructions so then the top level outer instruction is inherited into the `call_outer_instruction_index` and the inner index is `call_inner_instruction_index` (same idea with the `call_outer_executing_account` and `call_inner_executing_account`) [https://dune.com/embeds/2352049/3851391](https://dune.com/embeds/2352049/3851391) Try it out for yourself in [this query](https://dune.com/queries/2352049/) below: ```sql theme={null} SELECT * FROM whirlpool_solana.whirlpool_call_initializePool WHERE call_tx_id = 'TGDKvM2E8mWYcsG2JBnb9axFcyEcKqs7yZLyayCmrV8p8SSdA8r9SLEC7EHQ4mcXQXpczEyaCBXvnmEi9yoKVJ9' ``` The table name follows the pattern:\ `_solana._call_` We already have many of the top projects decoded, so go explore! # solana.instruction_calls Source: https://docs.dune.com/data-catalog/solana/instruction-calls Every program instruction executed on Solana with decoded arguments, inner instruction traces, and execution context. Critical for protocol analytics, smart contract auditing, cross-program invocation analysis, and DeFi flow tracing. ## Table description The `solana.instruction_calls` table is an unnested table of [`solana.transactions`](/data-catalog/solana/transactions). There can be multiple instructions in a transaction, so having an exploded view here will make it a little easier to work with the data. **This table mainly exists as the base for [Solana decoded tables](/data-catalog/solana/idl-tables), which you should be using instead.** ## Table Schema | Column | Type | Description | | - | - | - | | `block_slot` | `BIGINT` | The slot number of the block containing this instruction | | `block_date` | `DATE` | The date of the block this instruction was executed in | | `block_time` | `TIMESTAMP` | The timestamp of the block this instruction was executed in | | `block_hash` | `VARCHAR` | The hash of the block containing this instruction | | `tx_index` | `INTEGER` | The index position of the parent transaction within the block | | `inner_instruction_index` | `INTEGER` | The index of this instruction among inner instructions (null for top-level instructions) | | `outer_instruction_index` | `INTEGER` | The index of the top-level instruction this belongs to | | `inner_executing_account` | `VARCHAR` | The program account executing this inner instruction (null for top-level instructions) | | `outer_executing_account` | `VARCHAR` | The program account executing the top-level instruction | | `executing_account` | `VARCHAR` | The program account that executed this specific instruction | | `is_inner` | `BOOLEAN` | Whether this is an inner (CPI) instruction rather than a top-level instruction | | `stack_height` | `BIGINT` | The call stack depth of this instruction (1 for top-level, 2+ for inner) | | `data` | `VARBINARY` | The raw instruction data passed to the program | | `account_arguments` | `ARRAY(VARCHAR)` | The list of account addresses passed as arguments to this instruction | | `inner_instructions` | `ARRAY(ROW(data VARCHAR, executing_account VARCHAR, account_arguments ARRAY(VARCHAR), stack_height BIGINT))` | Nested inner instructions triggered by this instruction via CPI | | `tx_id` | `VARCHAR` | The unique transaction signature/ID | | `tx_signer` | `VARCHAR` | The address of the fee-paying signer of the transaction | | `tx_success` | `BOOLEAN` | Whether the parent transaction completed successfully | | `log_messages` | `ARRAY(VARCHAR)` | Program log messages emitted during this instruction's execution | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=instruction_calls](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=instruction_calls) # Solana Overview Source: https://docs.dune.com/data-catalog/solana/overview Solana raw and decoded data on Dune — transactions, blocks, instructions, account activity, rewards, and vote data for trading, compliance, wallet engineering, and research. Dune indexes the full Solana blockchain — every transaction, block, instruction call, and account balance change. As a non-EVM chain, Solana's [account-based architecture](https://solana.com/docs/core/accounts) produces data that looks fundamentally different from Ethereum. Programs, accounts, and instructions replace contracts, addresses, and function calls. Raw data tables give you direct access to transactions, pre/post-balances, and instruction data. For most analytical workflows, however, you'll get faster results and cleaner queries using [decoded data](/data-catalog/solana/idl-tables) from IDL decoding — Solana's equivalent of ABI decoding on EVM chains. ### Available Tables > [card] [Account Activity](/data-catalog/solana/account-activity) > > Pre/post-balance changes for every account touched in a transaction — track wallet activity, treasury flows, and balance movements > [card] [Blocks](/data-catalog/solana/blocks) > > Slot-level block data including leader identity, rewards, and timing — analyze network throughput and validator performance > [card] [IDL Tables (Decoded)](/data-catalog/solana/idl-tables) > > Human-readable decoded program data from IDL definitions — the fastest path to protocol-specific analytics > [card] [Instruction Calls](/data-catalog/solana/instruction-calls) > > Every program instruction with decoded arguments and inner calls — trace program execution and cross-program invocations > [card] [Rewards](/data-catalog/solana/rewards) > > Validator and staker reward distributions — calculate APY, track staking returns, and analyze validator economics > [card] [Transactions](/data-catalog/solana/transactions) > > Complete transaction records with signatures, signers, fees, and execution status — the foundation for on-chain analysis > [card] [Vote Transactions](/data-catalog/solana/vote-transactions) > > Validator consensus votes — monitor network health, validator participation, and consensus patterns *** ## Resources > [card] [Full Solana Data Guide](https://read.cryptodatabytes.com/p/starter-guide-to-solana-data-analysis) > > In-depth walkthrough for getting started with Solana data analysis on Dune, covering raw tables, decoded data, and common query patterns. # solana.rewards Source: https://docs.dune.com/data-catalog/solana/rewards Validator and staker reward distributions on Solana — staking rewards, voting rewards, and fee distributions. Use this data for APY calculations, validator economics research, staking yield analysis, and custodial reporting. ## Table description The `solana.rewards` table contains data about rewards paid out on Solana. One block may contain zero or more rewards, and each row corresponds to one reward. ## Table Schema | Column | Type | Description | | - | - | - | | `block_slot` | `BIGINT` | The slot number of the block in which this reward was distributed | | `block_time` | `TIMESTAMP` | The timestamp of the block containing this reward | | `block_hash` | `VARCHAR` | The hash of the block containing this reward | | `reward_type` | `VARCHAR` | The type of reward (e.g., 'Fee', 'Rent', 'Staking', 'Voting') | | `lamports` | `BIGINT` | The reward amount in lamports (1 SOL = 1,000,000,000 lamports) | | `pre_balance` | `BIGINT` | The recipient's balance in lamports before the reward was applied | | `post_balance` | `BIGINT` | The recipient's balance in lamports after the reward was applied | | `commission` | `BIGINT` | The validator commission percentage for staking and voting rewards; `NULL` from slot 433,296,000 onward | | `commission_bps` | `BIGINT` | The validator commission in basis points for staking and voting rewards, populated from slot 433,296,000 onward | | `recipient` | `VARCHAR` | The account address that received the reward | | `block_date` | `DATE` | The date of the block in which this reward was distributed | ## Commission fields Solana's SIMD-0291 changed vote-account commission from a whole percentage to basis points at epoch 1003, beginning with slot 433,296,000. For a consistent basis-points value across both eras, use: ```sql theme={null} coalesce(commission_bps, commission * 100) ``` ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=rewards](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=rewards) # solana.transactions Source: https://docs.dune.com/data-catalog/solana/transactions Complete Solana transaction records with signatures, signers, fees, compute units, and execution status. The foundational table for on-chain analysis — from trading flow attribution and fee optimization to compliance monitoring and application usage tracking. ## Table description The `solana.transactions` table contains the transaction data within Solana's blockchain. Most of the relevant data related to account, protocol, and program activity is available in this table. This table excludes all voting transactions, which are available in the `solana.vote_transactions` table. ## Table Schema | Column | Type | Description | | - | - | - | | `block_slot` | `BIGINT` | The slot number of the block containing this transaction | | `block_height` | `BIGINT` | The block height at which this transaction was processed | | `block_time` | `TIMESTAMP` | The timestamp of the block this transaction belongs to | | `block_date` | `DATE` | The date of the block this transaction belongs to | | `index` | `INTEGER` | The index position of this transaction within the block | | `fee` | `BIGINT` | The transaction fee paid in lamports | | `compute_units_consumed` | `BIGINT` | The number of compute units consumed by this transaction | | `cost_units` | `BIGINT` | The cost units charged for this transaction | | `version` | `VARCHAR` | The transaction version ('legacy' or '0' for versioned transactions) | | `required_signatures` | `INTEGER` | The number of signatures required for this transaction | | `readonly_signed_accounts` | `INTEGER` | The number of read-only accounts that are also signers | | `readonly_unsigned_accounts` | `INTEGER` | The number of read-only accounts that are not signers | | `block_hash` | `VARCHAR` | The hash of the block containing this transaction | | `id` | `VARCHAR` | The unique transaction ID (same as signature) | | `signature` | `VARCHAR` | The first signature of the transaction, used as the transaction identifier | | `success` | `BOOLEAN` | Whether the transaction completed successfully | | `error` | `VARCHAR` | The error message if the transaction failed, null otherwise | | `recent_block_hash` | `VARCHAR` | The recent blockhash used for transaction validity and replay prevention | | `instructions` | `ARRAY(ROW(data VARCHAR, executing_account VARCHAR, account_arguments ARRAY(VARCHAR), inner_instructions ARRAY(ROW(data VARCHAR, executing_account VARCHAR, account_arguments ARRAY(VARCHAR), stack_height BIGINT))))` | The list of instructions executed in this transaction, including nested inner instructions | | `account_keys` | `ARRAY(VARCHAR)` | All account addresses referenced in this transaction | | `log_messages` | `ARRAY(VARCHAR)` | Program log messages emitted during transaction execution | | `pre_balances` | `ARRAY(BIGINT)` | SOL balances (in lamports) of all accounts before the transaction, ordered by account_keys index | | `post_balances` | `ARRAY(BIGINT)` | SOL balances (in lamports) of all accounts after the transaction, ordered by account_keys index | | `pre_token_balances` | `ARRAY(ROW(account VARCHAR, mint VARCHAR, owner VARCHAR, amount DECIMAL(38,18)))` | SPL token balances of accounts before the transaction | | `post_token_balances` | `ARRAY(ROW(account VARCHAR, mint VARCHAR, owner VARCHAR, amount DECIMAL(38,18)))` | SPL token balances of accounts after the transaction | | `signatures` | `ARRAY(VARCHAR)` | All signatures attached to this transaction | | `signer` | `VARCHAR` | The primary signer (fee payer) of the transaction | | `signers` | `ARRAY(VARCHAR)` | All accounts that signed this transaction | | `return_data_program_id` | `VARCHAR` | The program ID that produced the return data, if any | | `return_data` | `ARRAY(VARCHAR)` | The data returned by the program after execution, if any | | `address_table_lookups` | `ARRAY(ROW(accountKey VARCHAR, readonlyIndexes ARRAY(BIGINT), writableIndexes ARRAY(BIGINT)))` | Address lookup table references used for versioned transactions | | `loaded_addresses` | `ROW(readonly ARRAY(VARCHAR), writable ARRAY(VARCHAR))` | Addresses loaded from address lookup tables, split into readonly and writable sets | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=transactions) # solana.vote_transactions Source: https://docs.dune.com/data-catalog/solana/vote-transactions Solana validator consensus vote transactions — track validator participation, voting patterns, and network health. Essential for staking providers, validator operators, and researchers analyzing Solana's consensus mechanism. ## Table description The `solana.vote_transactions` table contains the full set of vote transactions that are submitted by validators to vote on a block. It can be joined with the non-vote transactions table above to get a full breakdown of all transactions. It has the same schema as the main transactions table. ## Table Schema | Column | Type | Description | | - | - | - | | `block_slot` | `BIGINT` | The slot number of the block containing this vote transaction | | `block_height` | `BIGINT` | The block height at which this vote transaction was processed | | `block_time` | `TIMESTAMP` | The timestamp of the block this vote transaction belongs to | | `block_date` | `DATE` | The date of the block this vote transaction belongs to | | `index` | `INTEGER` | The index position of this vote transaction within the block | | `fee` | `BIGINT` | The transaction fee paid in lamports | | `compute_units_consumed` | `BIGINT` | The number of compute units consumed by this vote transaction | | `cost_units` | `BIGINT` | The cost units charged for this vote transaction | | `version` | `VARCHAR` | The transaction version ('legacy' or '0' for versioned transactions) | | `required_signatures` | `INTEGER` | The number of signatures required for this vote transaction | | `readonly_signed_accounts` | `INTEGER` | The number of read-only accounts that are also signers | | `readonly_unsigned_accounts` | `INTEGER` | The number of read-only accounts that are not signers | | `block_hash` | `VARCHAR` | The hash of the block containing this vote transaction | | `id` | `VARCHAR` | The unique transaction ID (same as signature) | | `signature` | `VARCHAR` | The first signature of the transaction, used as the transaction identifier | | `success` | `BOOLEAN` | Whether the vote transaction completed successfully | | `error` | `VARCHAR` | The error message if the vote transaction failed, null otherwise | | `recent_block_hash` | `VARCHAR` | The recent blockhash used for transaction validity and replay prevention | | `instructions` | `ARRAY(ROW(data VARCHAR, executing_account VARCHAR, account_arguments ARRAY(VARCHAR), inner_instructions ARRAY(ROW(data VARCHAR, executing_account VARCHAR, account_arguments ARRAY(VARCHAR), stack_height BIGINT))))` | The list of instructions executed in this vote transaction, including nested inner instructions | | `account_keys` | `ARRAY(VARCHAR)` | All account addresses referenced in this vote transaction | | `log_messages` | `ARRAY(VARCHAR)` | Program log messages emitted during vote transaction execution | | `pre_balances` | `ARRAY(BIGINT)` | SOL balances (in lamports) of all accounts before the vote transaction, ordered by account_keys index | | `post_balances` | `ARRAY(BIGINT)` | SOL balances (in lamports) of all accounts after the vote transaction, ordered by account_keys index | | `pre_token_balances` | `ARRAY(ROW(account VARCHAR, mint VARCHAR, owner VARCHAR, amount DECIMAL(38,18)))` | SPL token balances of accounts before the vote transaction | | `post_token_balances` | `ARRAY(ROW(account VARCHAR, mint VARCHAR, owner VARCHAR, amount DECIMAL(38,18)))` | SPL token balances of accounts after the vote transaction | | `signatures` | `ARRAY(VARCHAR)` | All signatures attached to this vote transaction | | `signer` | `VARCHAR` | The primary signer (fee payer) of the vote transaction | | `signers` | `ARRAY(VARCHAR)` | All accounts that signed this vote transaction | | `return_data_program_id` | `VARCHAR` | The program ID that produced the return data, if any | | `return_data` | `ARRAY(VARCHAR)` | The data returned by the program after execution, if any | | `address_table_lookups` | `ARRAY(ROW(accountKey VARCHAR, readonlyIndexes ARRAY(BIGINT), writableIndexes ARRAY(BIGINT)))` | Address lookup table references used for versioned vote transactions | | `loaded_addresses` | `ROW(readonly ARRAY(VARCHAR), writable ARRAY(VARCHAR))` | Addresses loaded from address lookup tables, split into readonly and writable sets | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=vote_transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=solana\&table_name_t6f0df=vote_transactions) # starknet.blocks Source: https://docs.dune.com/data-catalog/starknet/blocks StarkNet block data — block numbers, timestamps, sequencer identity, and state roots. ## Table description The `starknet.blocks` table represents the blocks in the Starknet blockchain. A block is a collection of transactions, and is identified by a unique block identifier. Each block contains a timestamp and a reference to the previous block hash, forming a chain of blocks. The block structure is crucial for the blockchain's integrity and security, ensuring a verifiable and tamper-evident ledger. ## Table Schema | Column | Type | Description | | - | - | - | | `date` | `DATE` | The date of the block (UTC) | | `number` | `BIGINT` | The sequential block number | | `time` | `TIMESTAMP` | The timestamp when the block was produced | | `l1_da_mode` | `VARCHAR` | Layer 1 data availability mode (`BLOB` or `CALLDATA`). Introduced in Starknet v0.13.1 | | `l1_data_gas_price_in_fri` | `UINT256` | L1 data gas price denominated in fri (STRK), used for v3+ transactions | | `l1_data_gas_price_in_wei` | `UINT256` | L1 data gas price denominated in wei (ETH), used for pre-v3 transactions | | `l1_gas_price_in_fri` | `UINT256` | L1 gas price denominated in fri (STRK), used for v3+ transactions | | `l1_gas_price_in_wei` | `UINT256` | L1 gas price denominated in wei (ETH), used for pre-v3 transactions | | `l2_gas_price_in_fri` | `UINT256` | L2 gas price denominated in fri (STRK), used for v3+ transactions | | `l2_gas_price_in_wei` | `UINT256` | L2 gas price denominated in wei (ETH), used for pre-v3 transactions | | `starknet_version` | `VARCHAR` | The Starknet protocol version used for this block | | `tx_count` | `INTEGER` | Number of transactions included in this block | | `hash` | `VARBINARY` | Unique hash identifying this block | | `new_root` | `VARBINARY` | The new global state root after applying this block | | `parent_hash` | `VARBINARY` | Hash of the preceding block | | `sequencer_address` | `VARBINARY` | Address of the sequencer that produced this block | | `state_diff` | `VARCHAR` | JSON-encoded state changes resulting from this block | > [!NOTE] > > * Prior to [v3 transactions upgrade](https://www.starknet.io/developers/roadmap/v3-transactions/), fees are denominated in `wei` as users pay gas with ETH. For transactions v3 and later, fees are denominated in `fri` as users pay gas with STRK. Hence here you can see two gas types of gas fields, one for `wei` and one for `fri`. > * Starting with Starknet v0.13.1, Starknet distinguishes between blocks whose state diffs are sent to L1 as calldata and blocks whose state diffs are sent to L1 as blobs. The `l1_da_mode` property in the Starknet block header contains this information. Values possible are `BLOB` or `CALLDATA`. > * Visit this [Starknet doc on block structure](https://docs.starknet.io/architecture-and-concepts/network-architecture/block-structure/) to learn more. ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=starknet\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=starknet\&table_name_t6f0df=blocks) # starknet.calls Source: https://docs.dune.com/data-catalog/starknet/calls StarkNet internal calls — function call traces within StarkNet transaction execution. ## Table description The `starknet.calls` table documents the execution trace of the transaction designated by the input hash. ## Table Schema | Column | Type | Description | | - | - | - | | `block_date` | `DATE` | The date of the block containing this call (UTC) | | `block_time` | `TIMESTAMP` | The timestamp of the block containing this call | | `block_number` | `BIGINT` | The sequential number of the block containing this call | | `block_l1_da_mode` | `VARCHAR` | Layer 1 data availability mode (`BLOB` or `CALLDATA`) | | `block_l1_data_gas_price_in_fri` | `UINT256` | L1 data gas price in fri (STRK) for the block | | `block_l1_data_gas_price_in_wei` | `UINT256` | L1 data gas price in wei (ETH) for the block | | `block_l1_gas_price_in_fri` | `UINT256` | L1 gas price in fri (STRK) for the block | | `block_l1_gas_price_in_wei` | `UINT256` | L1 gas price in wei (ETH) for the block | | `block_l2_gas_price_in_fri` | `UINT256` | L2 gas price in fri (STRK) for the block | | `block_l2_gas_price_in_wei` | `UINT256` | L2 gas price in wei (ETH) for the block | | `block_starknet_version` | `VARCHAR` | The Starknet protocol version of the block | | `transaction_index` | `INTEGER` | Position of the parent transaction within the block | | `transaction_type` | `VARCHAR` | Type of the parent transaction (`INVOKE`, `L1_HANDLER`, `DECLARE`, `DEPLOY_ACCOUNT`, `DEPLOY`) | | `call_type` | `VARCHAR` | Type of function call (`CALL`, `LIBRARY_CALL`, or `DELEGATE`) | | `context` | `VARCHAR` | Execution context of the call | | `entry_point_type` | `VARCHAR` | Type of entry point invoked (`EXTERNAL`, `L1_HANDLER`, `CONSTRUCTOR`) | | `execution_resources_bitwise_builtin_applications` | `INTEGER` | Number of bitwise builtin applications consumed | | `execution_resources_data_availability_l1_gas` | `UINT256` | L1 gas consumed for data availability | | `execution_resources_data_availability_l1_data_gas` | `UINT256` | L1 data gas consumed for data availability | | `execution_resources_data_availability_l2_gas` | `UINT256` | L2 gas consumed for data availability | | `execution_resources_ec_op_builtin_applications` | `INTEGER` | Number of elliptic curve operation builtin applications consumed | | `execution_resources_ecdsa_builtin_applications` | `INTEGER` | Number of ECDSA builtin applications consumed | | `execution_resources_keccak_builtin_applications` | `INTEGER` | Number of Keccak builtin applications consumed | | `execution_resources_memory_holes` | `INTEGER` | Number of memory holes in the execution trace | | `execution_resources_pedersen_builtin_applications` | `INTEGER` | Number of Pedersen hash builtin applications consumed | | `execution_resources_poseidon_builtin_applications` | `INTEGER` | Number of Poseidon hash builtin applications consumed | | `execution_resources_range_check_builtin_applications` | `INTEGER` | Number of range check builtin applications consumed | | `execution_resources_segment_arena_builtin` | `INTEGER` | Number of segment arena builtin applications consumed | | `execution_resources_steps` | `INTEGER` | Total number of Cairo VM steps executed | | `num_subcalls` | `INTEGER` | Number of nested sub-calls triggered by this call | | `block_hash` | `VARBINARY` | Hash of the block containing this call | | `block_new_root` | `VARBINARY` | New global state root after the block | | `block_parent_hash` | `VARBINARY` | Hash of the preceding block | | `block_sequencer_address` | `VARBINARY` | Address of the sequencer that produced the block | | `transaction_hash` | `VARBINARY` | Hash of the parent transaction | | `callstack_index` | `ARRAY(INTEGER)` | Position in the call tree hierarchy | | `calldata` | `ARRAY(VARBINARY)` | Input data passed to this call | | `caller_address` | `VARBINARY` | Address of the contract that initiated this call | | `class_hash` | `VARBINARY` | Class hash of the called contract | | `contract_address` | `VARBINARY` | Address of the contract being called | | `entry_point_selector` | `VARBINARY` | Selector identifying the function entry point | | `events` | `ARRAY(ROW(DATA ARRAY(VARCHAR), KEYS ARRAY(VARCHAR), EVENT_INDEX INTEGER))` | Events emitted during this call | | `messages` | `ARRAY(ROW(FROM_ADDRESS VARBINARY, PAYLOAD VARBINARY, TO_ADDRESS VARBINARY, MESSAGE_INDEX INTEGER))` | L2-to-L1 messages sent during this call | | `result` | `VARBINARY` | Return value of the call | | `revert_reason` | `VARCHAR` | Reason for call failure, if the call reverted | | `state_diff` | `VARCHAR` | JSON-encoded state changes resulting from this call | > [!NOTE] > > * Prior to [v3 transactions upgrade](https://www.starknet.io/developers/roadmap/v3-transactions/), fees are denominated in `wei` as users pay gas with ETH. For transactions v3 and later, fees are denominated in `fri` as users pay gas with STRK. Hence here you can see two gas types of gas fields, one for `wei` and one for `fri`. > * Starting with Starknet v0.13.1, Starknet distinguishes between blocks whose state diffs are sent to L1 as calldata and blocks whose state diffs are sent to L1 as blobs. The `l1_da_mode` property in the Starknet block header contains this information. Values possible are `BLOB` or `CALLDATA`. > * The `block_status` has possible values `ACCEPTED_ON_L1` or `ACCEPTED_ON_L2`. Read here to learn more about [different transaction status](https://docs.starknet.io/architecture-and-concepts/network-architecture/transaction-life-cycle/#transaction_status). > * The `transaction_type` fields denotes [different types of transactions](https://docs.starknet.io/architecture-and-concepts/network-architecture/transactions/) supported by Starknet. Possible values are: `INVOKE`, `L1_HANDLER`, `DECLARE`, `DEPLOY_ACCOUNT`, and `DEPLOY`. > * The `call_type` fields denotes what type of function calls was invoked. Possible values are [`LIBRARY_CALL`](https://docs.starknet.io/architecture-and-concepts/smart-contracts/system-calls-cairo1/#library_call), `CALL`, or `DELEGATE` > * 'entry_point_type': The type of entry point. Possible values includes - `EXTERNAL`, `L1_HANDLER`, `CONSTRUCTOR` ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=starknet\&table_name_t6f0df=calls](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=starknet\&table_name_t6f0df=calls) # starknet.events Source: https://docs.dune.com/data-catalog/starknet/events StarkNet contract events — event data emitted by Cairo smart contracts during execution. ## Table description The `starknet.events` table captures the events that are emitted by smart contracts on the Starknet blockchain. Events are used to log significant actions and changes in smart contracts, such as token transfers or updates to contract states. Each event is linked to the transaction that triggered it, providing a detailed audit trail of contract interactions. ## Table Schema | Column | Type | Description | | - | - | - | | `block_date` | `DATE` | The date of the block containing this event (UTC) | | `block_time` | `TIMESTAMP` | The timestamp of the block containing this event | | `block_number` | `BIGINT` | The sequential number of the block containing this event | | `block_l1_da_mode` | `VARCHAR` | Layer 1 data availability mode (`BLOB` or `CALLDATA`) | | `block_l1_data_gas_price_in_fri` | `UINT256` | L1 data gas price in fri (STRK) for the block | | `block_l1_data_gas_price_in_wei` | `UINT256` | L1 data gas price in wei (ETH) for the block | | `block_l1_gas_price_in_fri` | `UINT256` | L1 gas price in fri (STRK) for the block | | `block_l1_gas_price_in_wei` | `UINT256` | L1 gas price in wei (ETH) for the block | | `block_l2_gas_price_in_fri` | `UINT256` | L2 gas price in fri (STRK) for the block | | `block_l2_gas_price_in_wei` | `UINT256` | L2 gas price in wei (ETH) for the block | | `block_starknet_version` | `VARCHAR` | The Starknet protocol version of the block | | `event_index` | `INTEGER` | Sequential index of this event within the transaction | | `block_hash` | `VARBINARY` | Hash of the block containing this event | | `block_new_root` | `VARBINARY` | New global state root after the block | | `block_parent_hash` | `VARBINARY` | Hash of the preceding block | | `block_sequencer_address` | `VARBINARY` | Address of the sequencer that produced the block | | `transaction_hash` | `VARBINARY` | Hash of the transaction that emitted this event | | `data` | `ARRAY(VARBINARY)` | The data payload associated with this event | | `keys` | `ARRAY(VARBINARY)` | The indexed keys associated with this event | | `from_address` | `VARBINARY` | Address of the L2 contract that emitted this event | | `class_hash` | `VARBINARY` | Class hash of the contract that emitted this event | > [!NOTE] > > * Prior to [v3 transactions upgrade](https://www.starknet.io/developers/roadmap/v3-transactions/), fees are denominated in `wei` as users pay gas with ETH. For transactions v3 and later, fees are denominated in `fri` as users pay gas with STRK. Hence here you can see two gas types of gas fields, one for `wei` and one for `fri`. > * Starting with Starknet v0.13.1, Starknet distinguishes between blocks whose state diffs are sent to L1 as calldata and blocks whose state diffs are sent to L1 as blobs. The `l1_da_mode` property in the Starknet block header contains this information. Values possible are `BLOB` or `CALLDATA`. > * The `block_status` has possible values `ACCEPTED_ON_L1` or `ACCEPTED_ON_L2`. Read here to learn more about [different transaction status](https://docs.starknet.io/architecture-and-concepts/network-architecture/transaction-life-cycle/#transaction_status). > * `from_address`: The address of the L2 contract sending the message > * `keys`: The keys associated with the event > * `data`: The data associated with the event > * Visit this [Starknet doc on events](https://docs.starknet.io/architecture-and-concepts/smart-contracts/starknet-events/) to learn more. ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=starknet\&table_name_t6f0df=events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=starknet\&table_name_t6f0df=events) # Starknet data Source: https://docs.dune.com/data-catalog/starknet/overview Starknet data on Dune ## What is Starknet? Starknet is a permissionless Validity-Rollup, also known as a zero-knowledge rollup (ZK rollup) for Ethereum. As a Layer 2 (L2) blockchain, Starknet enables any dApp to achieve massive computation scale without compromising on Ethereum’s composability and security. Starknet aims to achieve secure, low-cost transactions and high performance by using the STARK cryptographic proof system. Starknet contracts and the Starknet OS are written in [Cairo](https://github.com/starkware-libs/cairo), a custom-built and specialized programming language. ### Why Starknet? Starknet addresses the scalability issues of Ethereum by offloading computation and state storage from the Ethereum mainnet. It uses STARK (Scalable Transparent Argument of Knowledge) proofs to ensure that transactions are both scalable and secure, enabling a wide range of applications from DeFi to NFTs without compromising on security or decentralization. ### Starknet Architecture Starknet's architecture is composed of several key components that work together to achieve high scalability and security: #### STARK Proofs At the core of Starknet's technology are STARK proofs, which are zero-knowledge proofs that enable scalable and transparent computation. These proofs ensure the integrity and validity of off-chain computations, which are then verified on-chain. #### Sequencer and Prover Starknet employs a sequencer to order transactions and a prover to generate STARK proofs. The sequencer ensures that transactions are processed in a fair and orderly manner, while the prover generates cryptographic proofs that validate these transactions. #### Cairo Language Starknet uses Cairo, a Turing-complete language designed for writing provable programs. Developers can write smart contracts and off-chain logic in Cairo, leveraging its efficiency and security features. #### Accounts and Contracts Starknet introduces a novel account model where each user interacts with the network through their account contracts. This model enhances security and flexibility, allowing for features like account abstraction and multi-sig wallets. Unlike the traditional EVM model, where accounts are either externally owned accounts (EOAs) or smart contracts, Starknet uses account contracts for both user accounts and smart contracts, allowing for more advanced features and customizability. See Starknet's documentation on [Accounts](https://docs.starknet.io/architecture-and-concepts/accounts/introduction/) and [Contracts](https://docs.starknet.io/architecture-and-concepts/smart-contracts/contract-classes/) for more information ### Starknet Transaction Lifecycle Transactions on Starknet follow a well-defined lifecycle: 1. **Submission**: Users submit transactions through their account contracts. 2. **Sequencing**: Transactions are ordered by the sequencer. 3. **Proof Generation**: The prover generates STARK proofs for the ordered transactions. 4. **Verification**: Proofs are verified on the Ethereum mainnet, finalizing the state transitions. For more information on the transaction flow, see [Starknet's doc](https://docs.starknet.io/architecture-and-concepts/network-architecture/transaction-life-cycle/). ![](https://mintcdn.com/dune/uyJ-jHeSRFvNrzyu/images/starknet_txn_life.png?fit=max\&auto=format\&n=uyJ-jHeSRFvNrzyu\&q=85\&s=a386971d10894bc7d14fca5a27eaf552) Key Components: * **Sequencer**: Receives transactions, orders them, and produces blocks, operating similarly to validators in Ethereum or Bitcoin. * **Prover**: Generates proofs using the Cairo Virtual Machine (Cairo VM) to create execution traces necessary for generating STARK proofs. * **Verifier**: L1 smart contract, designed to verify STARK proofs and update Starknet’s state root on L1 if valid. * **Layer 1 (L1)**: Ethereum hosts a smart contract that verifies STARK proofs and updates Starknet’s state root on L1 if valid. > [card] [Starknet documentation](https://docs.starknet.io/) > > Explore comprehensive documentation on Starknet, detailing its architecture, protocol, and resources for developers. ## Starknet Data on Dune Starknet provides comprehensive data on various aspects of its network, enabling developers and users to analyze and interact with the blockchain effectively. > [card] [Blocks](/data-catalog/starknet/blocks) > > Represents the collection of transactions in a single block within the Starknet > blockchain. > [card] [Transactions](/data-catalog/starknet/transactions) > > Includes all user and system transactions processed by the Starknet network. > [card] [Events](/data-catalog/starknet/events) > > Captures events emitted by smart contracts, logging significant actions and changes. > [card] [Calls](/data-catalog/starknet/calls) > > Represents the invocation of smart contract functions, detailing the interactions and parameters used. # starknet.transactions Source: https://docs.dune.com/data-catalog/starknet/transactions StarkNet transaction records — invoke, deploy, and declare transactions with fees and execution status. ## Table description The `starknet.transactions` table contains information about all transactions on the Starknet blockchain, including both user-initiated and system transactions. Transactions are the actions that modify the state of the blockchain, such as transfers of tokens or the execution of smart contracts. Each transaction is uniquely identified and linked to the block in which it was included. ## Table Schema | Column | Type | Description | | - | - | - | | `block_date` | `DATE` | The date of the block containing this transaction (UTC) | | `block_time` | `TIMESTAMP` | The timestamp of the block containing this transaction | | `block_number` | `BIGINT` | The sequential number of the block containing this transaction | | `block_l1_da_mode` | `VARCHAR` | Layer 1 data availability mode (`BLOB` or `CALLDATA`) | | `block_l1_data_gas_price_in_fri` | `UINT256` | L1 data gas price in fri (STRK) for the block | | `block_l1_data_gas_price_in_wei` | `UINT256` | L1 data gas price in wei (ETH) for the block | | `block_l1_gas_price_in_fri` | `UINT256` | L1 gas price in fri (STRK) for the block | | `block_l1_gas_price_in_wei` | `UINT256` | L1 gas price in wei (ETH) for the block | | `block_l2_gas_price_in_fri` | `UINT256` | L2 gas price in fri (STRK) for the block | | `block_l2_gas_price_in_wei` | `UINT256` | L2 gas price in wei (ETH) for the block | | `block_starknet_version` | `VARCHAR` | The Starknet protocol version of the block | | `fee_data_availability_mode` | `VARCHAR` | Storage domain for fee payment (`L1` or `L2`) | | `index` | `INTEGER` | Position of this transaction within the block | | `max_fee` | `UINT256` | Maximum fee the sender is willing to pay (pre-v3 transactions) | | `nonce` | `INTEGER` | Sender's transaction sequence number to prevent replays | | `nonce_data_availability_mode` | `VARCHAR` | Storage domain for the account nonce (`L1` or `L2`) | | `resource_bounds_l1_gas_max_amount` | `UINT256` | Maximum L1 gas amount the sender is willing to consume (v3+) | | `resource_bounds_l1_gas_max_price_per_unit` | `UINT256` | Maximum price per unit of L1 gas the sender will pay (v3+) | | `resource_bounds_l1_data_gas_max_amount` | `UINT256` | Maximum L1 data gas amount the sender is willing to consume (v3+) | | `resource_bounds_l1_data_gas_max_price_per_unit` | `UINT256` | Maximum price per unit of L1 data gas the sender will pay (v3+) | | `resource_bounds_l2_gas_max_amount` | `VARBINARY` | Maximum L2 gas amount the sender is willing to consume (v3+) | | `resource_bounds_l2_gas_max_price_per_unit` | `VARBINARY` | Maximum price per unit of L2 gas the sender will pay (v3+) | | `tip` | `UINT256` | Optional tip paid to the sequencer for priority (v3+) | | `type` | `VARCHAR` | Transaction type (`INVOKE`, `L1_HANDLER`, `DECLARE`, `DEPLOY_ACCOUNT`, `DEPLOY`) | | `version` | `INTEGER` | Transaction version number | | `actual_fee_amount` | `UINT256` | Actual fee charged for this transaction | | `actual_fee_unit` | `VARCHAR` | Unit of the actual fee (`WEI` for ETH, `FRI` for STRK) | | `execution_resources_bitwise_builtin_applications` | `INTEGER` | Number of bitwise builtin applications consumed | | `execution_resources_data_availability_l1_gas` | `UINT256` | L1 gas consumed for data availability | | `execution_resources_data_availability_l1_data_gas` | `UINT256` | L1 data gas consumed for data availability | | `execution_resources_data_availability_l2_gas` | `UINT256` | L2 gas consumed for data availability | | `execution_resources_ec_op_builtin_applications` | `INTEGER` | Number of elliptic curve operation builtin applications consumed | | `execution_resources_ecdsa_builtin_applications` | `INTEGER` | Number of ECDSA builtin applications consumed | | `execution_resources_keccak_builtin_applications` | `INTEGER` | Number of Keccak builtin applications consumed | | `execution_resources_memory_holes` | `INTEGER` | Number of memory holes in the execution trace | | `execution_resources_pedersen_builtin_applications` | `INTEGER` | Number of Pedersen hash builtin applications consumed | | `execution_resources_poseidon_builtin_applications` | `INTEGER` | Number of Poseidon hash builtin applications consumed | | `execution_resources_range_check_builtin_applications` | `INTEGER` | Number of range check builtin applications consumed | | `execution_resources_segment_arena_builtin` | `INTEGER` | Number of segment arena builtin applications consumed | | `execution_resources_steps` | `INTEGER` | Total number of Cairo VM steps executed | | `execution_status` | `VARCHAR` | Final execution status of the transaction | | `finality_status` | `VARCHAR` | Finality status (`ACCEPTED_ON_L1` or `ACCEPTED_ON_L2`) | | `receipt_type` | `VARCHAR` | Type of the transaction receipt | | `block_hash` | `VARBINARY` | Hash of the block containing this transaction | | `block_new_root` | `VARBINARY` | New global state root after the block | | `block_parent_hash` | `VARBINARY` | Hash of the preceding block | | `block_sequencer_address` | `VARBINARY` | Address of the sequencer that produced the block | | `calldata` | `ARRAY(VARBINARY)` | Input data for the transaction's function call | | `class_hash` | `VARBINARY` | Class hash of the declared or deployed contract | | `compiled_class_hash` | `VARBINARY` | Compiled class hash (for `DECLARE` v2+ transactions) | | `constructor_calldata` | `ARRAY(VARBINARY)` | Constructor arguments (for `DEPLOY_ACCOUNT` transactions) | | `contract_address` | `VARBINARY` | Address of the contract involved in this transaction | | `contract_address_salt` | `VARBINARY` | Salt used for contract address computation (for deployments) | | `entry_point_selector` | `VARBINARY` | Selector identifying the invoked function entry point | | `hash` | `VARBINARY` | Unique hash identifying this transaction | | `sender_address` | `VARBINARY` | Address of the account that sent this transaction | | `signature` | `ARRAY(VARBINARY)` | Cryptographic signature of the transaction | | `message_hash` | `VARBINARY` | Hash of the L1-to-L2 message (for `L1_HANDLER` transactions) | | `messages_sent` | `ARRAY(ROW(FROM_ADDRESS VARBINARY, PAYLOAD VARBINARY, TO_ADDRESS VARBINARY))` | L2-to-L1 messages sent by this transaction | | `revert_reason` | `VARCHAR` | Reason for transaction failure, if it reverted | | `transaction_hash` | `VARBINARY` | Hash of this transaction (same as `hash`) | > [!NOTE] > > * Prior to [v3 transactions upgrade](https://www.starknet.io/developers/roadmap/v3-transactions/), fees are denominated in `wei` as users pay gas with ETH. For transactions v3 and later, fees are denominated in `fri` as users pay gas with STRK. Hence here you can see two gas types of gas fields, one for `wei` and one for `fri`. > * Starting with Starknet v0.13.1, Starknet distinguishes between blocks whose state diffs are sent to L1 as calldata and blocks whose state diffs are sent to L1 as blobs. The `l1_da_mode` property in the Starknet block header contains this information. Values possible are `BLOB` or `CALLDATA`. > * The `type` fields denotes [different types of transactions](https://docs.starknet.io/architecture-and-concepts/network-architecture/transactions/) supported by Starknet. Possible values are: `INVOKE`, `L1_HANDLER`, `DECLARE`, `DEPLOY_ACCOUNT`, and `DEPLOY`. > * The `fee_data_availability_mode` field denotes the storage domain of the account's balance from which fee will be charged. It can be one of 'L1' or 'L2' > * The `block_status` has possible values `ACCEPTED_ON_L1` or `ACCEPTED_ON_L2`. Read here to learn more about [different transaction status](https://docs.starknet.io/architecture-and-concepts/network-architecture/transaction-life-cycle/#transaction_status). > * The `actual_fee` has the actual fee paid for the transaction, to be used together with `actual_fee_unit`. ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=starknet\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=starknet\&table_name_t6f0df=transactions) # stellar.accounts Source: https://docs.dune.com/data-catalog/stellar/accounts Stellar account data — public keys, sequence numbers, balances, and thresholds. ## Table description The `stellar.accounts` table tracks the native token (Lumens) balances held by accounts. Accounts are the central data structure in Stellar- they hold balances, sign transactions, and issue assets. Accounts can only exist with a valid keypair and the required minimum balance of XLM. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **closed_at_date** | The date when the account's ledger entry was closed. | date | | **account_id** | The unique identifier for the Stellar account. | varchar | | **balance** | The current balance of lumens (XLM) in the account. | double | | **buying_liabilities** | The total liabilities for buying offers on the account. | double | | **selling_liabilities** | The total liabilities for selling offers on the account. | double | | **sequence_number** | The current sequence number of the account, incremented with each transaction. | bigint | | **num_subentries** | The number of subentries, such as trustlines or offers, associated with the account. | bigint | | **inflation_destination** | The destination account for inflation pools (deprecated feature). | varchar | | **flags** | A set of flags representing various account properties like authorization. | bigint | | **home_domain** | The home domain associated with the account, used for federation or verifying asset issuers. | varchar | | **master_weight** | The weight of the account's master key used for signing transactions. | bigint | | **threshold_low** | The threshold level required for low-priority operations (e.g., payments). | bigint | | **threshold_medium** | The threshold level required for medium-priority operations (e.g., trustlines). | bigint | | **threshold_high** | The threshold level required for high-priority operations (e.g., multisig transactions). | bigint | | **last_modified_ledger** | The ledger sequence number where the account was last modified. | bigint | | **ledger_entry_change** | Indicates the type of change made to the ledger entry (insert, update, delete). | bigint | | **deleted** | A boolean indicating whether the account has been deleted from the ledger. | boolean | | **sponsor** | The account that is sponsoring this account’s resources. | varchar | | **num_sponsored** | The number of subentries sponsored by this account. | bigint | | **num_sponsoring** | The number of subentries this account is sponsoring. | bigint | | **sequence_time** | The time when the sequence number was last updated. | timestamp(3) with time zone | | **closed_at** | The timestamp when the account was last closed. | timestamp(3) with time zone | | **ledger_sequence** | The sequence number of the ledger in which the account is included. | bigint | | **account_sequence_last_modified_ledger** | The last ledger sequence where the account's sequence number was modified. | bigint | | **updated_at** | The time when the account record was last updated. | timestamp(3) with time zone | | **ingested_at** | The time when the account data was ingested into the system. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=accounts](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=accounts) # stellar.contract_data Source: https://docs.dune.com/data-catalog/stellar/contract_data Stellar Soroban smart contract data entries. ## Table description The `stellar.contract_data` table stores state data for smart contracts, including supported tokens and storage costs. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **closed_at_date** | The date when the contract data entry was closed. | date | | **contract_id** | The unique identifier for the smart contract on the Stellar network. | varchar | | **contract_key_type** | The type of key used for the contract data (e.g., a hash or other identifier). | varchar | | **contract_durability** | Indicates whether the contract data is durable across contract executions. | varchar | | **asset_code** | The code of the asset associated with the contract (if applicable). | varchar | | **asset_issuer** | The issuer of the asset associated with the contract (if applicable). | varchar | | **asset_type** | The type of asset associated with the contract (e.g., native, issued). | varchar | | **balance_holder** | The account or entity that holds the balance associated with the contract. | varchar | | **balance** | The balance associated with the contract, in lumens or other tokens. | varchar | | **last_modified_ledger** | The ledger sequence number where the contract data was last modified. | bigint | | **ledger_entry_change** | Indicates the type of change made to the ledger entry (insert, update, delete). | bigint | | **deleted** | A boolean indicating whether the contract data entry has been deleted. | boolean | | **closed_at** | The timestamp when the contract data was closed. | timestamp(3) with time zone | | **ledger_sequence** | The sequence number of the ledger in which the contract data is included. | bigint | | **ledger_key_hash** | The hashed key associated with the contract's ledger entry. | varbinary | | **key** | The key used in the contract data entry. | varchar | | **key_decoded** | A human-readable or decoded version of the contract key. | varchar | | **val** | The value stored in the contract data entry. | varchar | | **val_decoded** | A human-readable or decoded version of the value stored in the contract. | varchar | | **contract_data_xdr** | The raw XDR (External Data Representation) format of the contract data. | varchar | | **updated_at** | The time when the contract data record was last updated. | timestamp(3) with time zone | | **ingested_at** | The time when the contract data was ingested into the system. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=contract_data](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=contract_data) # EVM vs Stellar Comparison Source: https://docs.dune.com/data-catalog/stellar/evm_v_stellar A comparison between EVM-based blockchains and Stellar ## EVM vs Stellar Comparison This document provides a generalized overview of the differences between Ethereum Virtual Machine (EVM) chains and the Stellar Network. It's meant to help EVM data analysts to understand Stellar chain data better by mapping the concepts. > [!TIP] > > A special thanks to [Sydney Wiseman](https://www.linkedin.com/in/syd-wiseman/) from the Stellar Development Foundation for making this available to the community! ## Blockchain Purpose and Design ### Stellar The Stellar Network is designed to create digital asset products and services that improve access to the global financial system. With a focus on **simplicity, speed, and cost-effectiveness** in transferring assets, Stellar connects financial institutions, payment systems, and individuals. Due to its financial-centric design, Stellar includes built-in primitives for asset management, making it more secure and efficient for financial applications. However, Stellar's original design was less flexible and had limited the types of financial applications built on Stellar. Since February 2024, Stellar has supported **smart contracts** written in Rust and compiled as WebAssembly (wasm). ### EVM EVM blockchains such as Ethereum allow developers to build decentralized applications (dApps) and deploy **smart contracts**. Unlike Stellar, EVM chains emphasize flexible programming at the cost of speed, leading to the need for layer-2 (L2) solutions to improve transaction throughput and cost efficiency. Smart contracts on EVM are written in Solidity. ### Stellar Native Primitives * **Asset Issuance** * **Claimable Balances (Airdrops)** * **Orderbook (Built-in DEX)** * **Automated Market Makers (AMMs)** ### Tokenization Stellar allows native **asset tokenization**, where user balances are represented through [trustlines](https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/accounts#trustlines). Standards for tokenization similar to ERC-20 and ERC-721 are available under [SEP-41](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0041.md), implemented via the [Stellar Asset Contract](https://developers.stellar.org/docs/smart-contracts/tokens/stellar-asset-contract). ### Consensus Mechanism Stellar uses **Stellar Consensus Protocol (SCP)**, a Proof of Agreement (PoA) mechanism derived from **Federated Byzantine Agreement (FBA)**. Transactions are confirmed when overlapping quorums of nodes agree on validity. Stellar closes ledgers every **5 seconds**. EVM chains like Ethereum use **Proof of Stake (PoS)** for consensus. ### Time to Finality * **Stellar**: Deterministic finality, with ledgers closing every **5-6 seconds**. * **Ethereum**: Probabilistic finality, requiring \~13 minutes (2 epochs) for finality. ### Submitting Transactions Stellar supports bundling up to **100 operations** in a single transaction, improving developer experience. However, smart contract transactions (via **Soroban**) are capped at **1 operation per transaction**, similar to EVM. Stellar allows [**fee bump transactions**](https://developers.stellar.org/docs/learn/encyclopedia/fee-bump-transactions), where an account can pay fees on behalf of another account. Additionally, [**26 operation types**](https://developers.stellar.org/docs/learn/fundamentals/list-of-operations) are natively supported on Stellar, in contrast to EVM's 3 core transaction types (regular, contract deployment, execute contract). ### Ledger State Comparison Both Stellar and EVM use an **account-based model**. In Stellar, however, there are additional ledger state types: * **Contracts**: Persistent data and expiration details for smart contracts * **Accounts**: Externally owned accounts with lumen (XLM) balances * **Trustlines**: Balances of non-native tokens * **Claimable Balances**: Built-in airdrop feature * **Liquidity Pools**: AMM built-in mechanisms * **Orderbook Offers**: Stellar’s built-in decentralized exchange | EVM's Accounts | Stellar's Ledger Entry | | - | - | | nonce | *No equivalent* | | balance | [accounts](https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/accounts) | | storageRoot | [trustLines](https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/accounts#trustlines) | | codeHash | [data](https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/accounts#subentries), [contractData](https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/contracts#contract-storage) | | *No native equivalent* | [contractCode](https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/contracts#wasm) | | *No native equivalent* | [claimableBalances](https://developers.stellar.org/docs/learn/encyclopedia/claimable-balances) | | *No native equivalent* | [liquidityPools](https://developers.stellar.org/docs/learn/encyclopedia/liquidity-on-stellar-sdex-liquidity-pools#liquidity-pools) | | *No native equivalent* | [offers](https://developers.stellar.org/docs/learn/encyclopedia/liquidity-on-stellar-sdex-liquidity-pools#order-books) | | *No native equivalent* | [configSetting](https://developers.stellar.org/network/core-node/admin-guide/soroban-settings) | | *No native equivalent* | [ttl](https://developers.stellar.org/docs/learn/smart-contract-internals/state-archival#ttl) (State Archival) | ### Data Concept Mapping Stellar's data model is more complex than EVM due to its built-in primitives. The table below outlines equivalent data structures between EVM chains and Stellar, which serves to map the concepts between the two networks: | EVM's Data Model | Stellar Data On Dune | | - | - | | blocks | [history_ledgers](./history_ledgers) | | transactions | [history_transactions](./history_transactions) | | logs | [history_contract_events](./history_contract_events) | | traces | [history_operations](./history_operations), [history_effects](./history_effects) | | contracts | [contract_data](./contract_data) | | balances | [accounts](./accounts), [trustlines](./trust_lines), [contract_data](./contract_data) | | token_transfers | [history_operations](./history_operations) | ## Data Model Details ### Blocks Stellar calls blocks, ledgers. A ledger represents the state of the Stellar network at a given point in time. EVM blockchains refer to state as a point in time as blocks, and the entire blockchain is “the ledger”. Ledgers on Stellar can refer to individual blocks or the full network history. #### Size Limits A transaction set within a ledger contains two transaction types: native and smart contracts. The ledger size has separate limits for each transaction type: * **Native** - the Stellar Network can apply up to 1,000 operations in a ledger. Transactions can bundle up to 100 operations in a single transaction. * **Smart contracts** - the Stellar Network dynamically limits the number of smart contract transactions based on network resources consumed (read/write bytes, CPU instructions, etc). See [Smart Contract Settings](https://developers.stellar.org/network/core-node/admin-guide/soroban-settings#examine-current-settings) for more details. See [Fees and Metering](https://developers.stellar.org/docs/learn/fundamentals/fees-resource-limits-metering) for more information. Ethereum limits block size by total gas spent. #### Schema Mapping | **Stellar Name** | **EVM Equivalent** | **Description** | | - | - | - | | **sequence** | number | The sequence number of the ledger | | **ledger_hash** | hash | The hash of this ledger | | **previous_ledger_hash** | parent_hash | The hash of the previous ledger | | **closed_at** | time | The timestamp when the ledger was written to the chain | | **protocol_version** | version | Protocol version specified in the block header | | **total_coins** | | The total number of lumens in circulation | | **fee_pool** | gas_used | The sum of all transaction fees | | **inflation_seq** | | *Deprecated* | | **base_fee** | base_fee_per_gas | The minimum fee charged, per operation, to be included in the ledger | | **base_reserve** | | The minimum XLM balance to be held in an account to be considered valid | | **max_tx_set_size** | gas_limit | The maximum number of non-Soroban operations allowed in a ledger. **Note**: Soroban transactions have a separate mechanism to limit resources utilization per ledger | | **ledger_header** | | The raw XDR representation of all the data stored in the [Ledger Header](https://pkg.go.dev/github.com/stellar/go/xdr#LedgerHeader) | | **transaction_count** | transaction_count | Number of transactions in the ledger | | **operation_count** | | The number of operations in the ledger. **Note**: Up to 100 operations can be bundled in a single transaction | ### Transactions Actions are performed on the Stellar network through operations. Operations are bundled into transactions, with each account able to perform up to 100 operations in a single transaction. Accounts are limited to submitting one transaction per ledger. EVM networks do not have the concept of operations, the lowest level of action is a transaction. This limits accounts to one action per transaction in EVM L1 Layers, which is why L2 solutions and rollups are popular. #### Transaction Types Operation types on Stellar are analog to transaction types on EVM networks. The Stellar network natively supports [26 operation types](https://developers.stellar.org/docs/learn/fundamentals/list-of-operations), ranging from payments to orderbook offer management to smart contract invocation. EVM natively supports 3 transaction types: payment (regular), contract deployment, and execute contract, and does not support natively for Orderbook or AMMs. #### Schema Mapping **Transactions** | **Stellar Name** | **EVM Equivalent** | **Description** | | - | - | - | | **transaction_hash** | hash | A hex-encoded SHA-256 hash of this transaction's XDR-encoded form | | **ledger_sequence** | block_number | The sequence number of the ledger | | **closed_at** | block_time | The timestamp when the ledger was written to the chain | | **inner_transaction_hash** | | A transaction hash of a transaction wrapped with its signatures for fee-bump transactions | | **account** | from | The account address that originates the transaction | | **account_sequence** | nonce | The source account's sequence number that this transaction consumed. Sequence numbers can only be used once and help maintain atomicity and idempotency on the network | | **max_fee** | max_fee_per_gas | The maximum fee (in stroops) that the account is willing to pay for the transaction to be included in a ledger | | **operation_count** | Fixed at 1 | The number of operations contained within this transaction | | **memo_type** | | Memos can be text, ids, or hashes | | **memo** | | Optional unstructured data field that can be used to differentiate between accounts (for pooled accounts) | | **time_bounds** | | Optional UNIX timestamp of a lower and upper bound of when a transaction will be valid | | **successful** | success | Indicates if the transaction succeeded | | **fee_charged** | gas_used | | | **fee_account** | | An account that is not the originating source account for a transaction is allowed to pay transaction fees on behalf of the source account. These accounts are called fee accounts and incur all transaction costs for the source account | | **new_max_fee** | | The maximum fee (in stroops) an account is willing to pay for this account’s fees | | **account_muxed** | | If the user has defined multiplexed (muxed) accounts, the account exists "virtually" under a traditional Stellar account address. This address distinguishes between the virtual accounts | | **fee_account_muxed** | | If the fee account that sponsors fee is a multiplexed account, the virtual address will be listed here | | **preconditions** | | Validity checks the account can add when submitting a transaction to the network. If the conditions are not met, the transaction fails | | **transaction_envelope** | input_data | The raw XDR that was submitted to the Stellar Network | | **transaction_result** | receipt_root | The raw XDR that is returned from the network after applying the transaction | | **transaction_meta** | input_data | Raw XDR of ledger state changes based on the application of the transaction | | **transaction_fee_meta** | input_data | | | **soroban_transaction_data** | traces | Host env resource consumption by smart contract transactions | | **transaction_result_code** | traces.error | Result code that includes error codes for failed transactions | | **inclusion_fee_charged** | gas_price | The fee charged for the transaction to be included in the ledger. This is a fixed fee for the entire ledger and starts at a minimum of 100 stroops. The fee increases based on demand | | **signatures** | signature | | **Operations** | **Stellar Name** | **EVM Equivalent** | **Description** | | - | - | - | | **id** | | Unique id for the operation | | **source_account** | transaction.from | The account address that originates the transaction | | **transaction_id** | | Unique ID for the transaction. Bundled operation IDs will share the same Transaction ID | | **type** | transaction.type | Operation type | | **details** | Mix of input data and traces | Unstructured JSON that contains details based on the type of operation executed. Each operation will return its own relevant details | | **operation_result_code** | traces | | | **operation_trace_code** | traces | | ### Logs and Traces Events are the mechanism that applications off-chain can use to monitor changes and events in contracts on-chain. Events are an amalgamation of both EVM logs and traces. Stellar has three types of smart contract events: * **contract** - events emitted by contracts to convey state changes * **system** - events emitted by the host environment itself * **diagnostic** - details transaction traces intended for debugging purposes #### Schema Mapping | **Stellar Name** | **EVM Equivalent** | **Description** | | - | - | - | | **type** | trace.type | The type of event emission | | **ledger** | block_number | The sequence number of the ledger | | **closed_at** | block_time | The timestamp when the ledger was written to the chain | | **contract_id** | contract_address | String key representation of the contract address | | **id** | transaction_index | Unique ID for the event | | **in_successful_contract_call** | trace.tx_success | Whether the event was emitted from a successful contract call | | **topic** | logs.topic_list | Topic list of events | | **value** | logs.data | The body values of the topic list | | **transaction_hash** | trace.tx_hash | The transaction which triggered this event | # stellar.history_contract_events Source: https://docs.dune.com/data-catalog/stellar/history_contract_events Stellar Soroban contract events — events emitted by smart contracts. ## Table description The `stellar.history_contract_events` table captures all smart contract events and traces, with details on contract execution. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **closed_at_date** | The date when the contract event entry was closed. | date | | **transaction_hash** | The hash of the transaction associated with the contract event, in binary format. | varbinary | | **transaction_id** | The unique identifier for the transaction related to the contract event. | bigint | | **successful** | Indicates whether the transaction associated with the contract event was successful. | boolean | | **in_successful_contract_call** | Indicates whether the event occurred during a successful contract call. | boolean | | **contract_id** | The unique identifier for the smart contract that emitted the event. | varchar | | **type** | The numeric representation of the event type. | bigint | | **type_string** | The string description of the event type. | varchar | | **topics** | Encoded topics related to the contract event, typically used for filtering and categorizing events. | varchar | | **topics_decoded** | Human-readable or decoded topics related to the contract event. | varchar | | **data** | The data associated with the contract event, often related to the state changes or values in the contract. | varchar | | **data_decoded** | A human-readable or decoded version of the event data. | varchar | | **contract_event_xdr** | The raw XDR (External Data Representation) format of the contract event. | varchar | | **closed_at** | The timestamp when the contract event entry was closed. | timestamp(3) with time zone | | **ledger_sequence** | The sequence number of the ledger in which the contract event is included. | bigint | | **updated_at** | The time when the contract event record was last updated. | timestamp(3) with time zone | | **ingested_at** | The time when the contract event data was ingested into the system. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_contract_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_contract_events) # stellar.history_effects Source: https://docs.dune.com/data-catalog/stellar/history_effects Stellar operation effects — balance changes, trustline modifications, and other state changes. ## Table description The `stellar.history_effects` table records specific changes that occur in the ledger as a result of successful operations, but are not necessarily directly reflected in the ledger or history, as transactions and operations are. Operations are objects that represent a desired change to the ledger: payments, offers to exchange currency, changes made to account options, etc. Operations are submitted to the Stellar network grouped in a Transaction. Each of Stellar’s operations have a unique operation object. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **closed_at_date** | The date when the effect was closed. | date | | **address** | The account address associated with the effect. | varchar | | **address_muxed** | The multiplexed address, if applicable. | varchar | | **operation_id** | The unique identifier for the operation that produced the effect. | bigint | | **type** | The numeric representation of the effect type. | bigint | | **type_string** | The string description of the effect type. | varchar | | **closed_at** | The timestamp when the effect was closed. | timestamp(3) with time zone | | **ledger_sequence** | The sequence number of the ledger in which the effect is included. | bigint | | **index** | The index of the effect within the operation. | bigint | | **id** | The unique identifier for the effect. | varchar | | **liquidity_pool** | Information about the liquidity pool related to the effect, including fee, ID, reserves, and type. | row("fee_bp" bigint,"id" varchar,"total_shares" decimal(38,9),"total_trustlines" bigint,"type" varchar,"reserves" array(row("asset" varchar,"amount" decimal(38,9)))) | | **reserves_received** | An array of reserves received in the liquidity pool operation. | array(row("asset" varchar,"amount" decimal(38,9))) | | **reserves_deposited** | An array of reserves deposited in the liquidity pool operation. | array(row("asset" varchar,"amount" decimal(38,9))) | | **reserves_revoked** | An array of revoked reserves in the liquidity pool, including claimable balance IDs. | array(row("asset" varchar,"amount" decimal(38,9),"claimable_balance_id" varchar)) | | **bought** | An array of assets bought during the operation. | array(row("asset" varchar,"amount" decimal(38,9))) | | **sold** | An array of assets sold during the operation. | array(row("asset" varchar,"amount" decimal(38,9))) | | **shares_revoked** | The number of shares revoked in the liquidity pool. | decimal(38,9) | | **shares_received** | The number of shares received in the liquidity pool. | decimal(38,9) | | **shares_redeemed** | The number of shares redeemed in the liquidity pool. | decimal(38,9) | | **liquidity_pool_id** | The ID of the liquidity pool related to the effect. | varchar | | **balance_id** | The ID of the balance affected by the effect. | varchar | | **new_seq** | The new sequence number for the account. | bigint | | **name** | The name associated with the effect. | varchar | | **value** | The value associated with the effect. | varchar | | **trustor** | The account ID of the trustor involved in the effect. | varchar | | **limit** | The limit associated with the trustline in the effect. | decimal(38,9) | | **inflation_destination** | The destination account for inflation in the effect. | varchar | | **authorized_flag** | A boolean indicating whether the asset was authorized. | boolean | | **auth_immutable_flag** | A boolean indicating whether the asset is immutable. | boolean | | **authorized_to_maintain_liabilities** | A boolean indicating whether authorization to maintain liabilities was granted. | boolean | | **auth_revocable_flag** | A boolean indicating whether the authorization is revocable. | boolean | | **auth_required_flag** | A boolean indicating whether authorization is required. | boolean | | **auth_clawback_enabled_flag** | A boolean indicating whether clawback is enabled for the effect. | boolean | | **claimable_balance_clawback_enabled_flag** | A boolean indicating whether clawback is enabled for claimable balances. | boolean | | **clawback_enabled_flag** | A boolean indicating whether clawback is enabled for the asset. | boolean | | **high_threshold** | The high threshold for account signatures. | bigint | | **med_threshold** | The medium threshold for account signatures. | bigint | | **low_threshold** | The low threshold for account signatures. | bigint | | **home_domain** | The home domain associated with the account. | varchar | | **asset_issuer** | The issuer of the asset involved in the effect. | varchar | | **asset** | The asset involved in the effect. | varchar | | **asset_code** | The code of the asset involved in the effect. | varchar | | **signer** | The signer involved in the effect. | varchar | | **sponsor** | The sponsor of the account or effect. | varchar | | **new_sponsor** | The new sponsor of the account or effect. | varchar | | **former_sponsor** | The former sponsor of the account or effect. | varchar | | **weight** | The weight assigned to the signer. | bigint | | **public_key** | The public key associated with the effect. | varchar | | **asset_type** | The type of asset involved in the effect. | varchar | | **amount** | The amount involved in the effect. | decimal(38,9) | | **starting_balance** | The starting balance of the account in the effect. | decimal(38,9) | | **seller** | The account ID of the seller in the effect. | varchar | | **seller_muxed** | The multiplexed account ID of the seller, if applicable. | varchar | | **seller_muxed_id** | The ID of the multiplexed seller account. | bigint | | **offer_id** | The ID of the offer involved in the effect. | bigint | | **sold_amount** | The amount of the asset sold in the effect. | decimal(38,9) | | **sold_asset_type** | The type of asset sold in the effect. | varchar | | **sold_asset_code** | The code of the asset sold in the effect. | varchar | | **sold_asset_issuer** | The issuer of the asset sold in the effect. | varchar | | **bought_amount** | The amount of the asset bought in the effect. | decimal(38,9) | | **bought_asset_type** | The type of asset bought in the effect. | varchar | | **bought_asset_code** | The code of the asset bought in the effect. | varchar | | **data_name** | The name of the data involved in the effect. | varchar | | **bought_asset_issuer** | The issuer of the asset bought in the effect. | varchar | | **entries** | An array of entries involved in the effect. | array(varchar) | | **extend_to** | The ledger sequence number to which the effect extends. | bigint | | **contract** | The contract associated with the effect. | varchar | | **contract_event_type** | The type of contract event associated with the effect. | varchar | | **ledgers_to_expire** | The number of ledgers until the effect expires. | bigint | | **updated_at** | The time when the effect record was last updated. | timestamp(3) with time zone | | **ingested_at** | The time when the effect data was ingested into the system. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_effects](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_effects) # stellar.history_ledgers Source: https://docs.dune.com/data-catalog/stellar/history_ledgers Stellar ledger data — sequence number, transaction count, and protocol version. ## Table description The `stellar.history_ledgers` table tracks ledgers info (equivalent of blocks on other blockchain), including metadata such as sequence numbers, transactions included, and fees. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **closed_at_date** | The date when the ledger was closed. | date | | **sequence** | The sequence number of the ledger. | bigint | | **ledger_hash** | The hash of the current ledger, in binary format. | varbinary | | **previous_ledger_hash** | The hash of the previous ledger, in binary format. | varbinary | | **transaction_count** | The number of transactions included in the ledger. | bigint | | **operation_count** | The number of operations executed within the transactions in the ledger. | bigint | | **closed_at** | The timestamp when the ledger was closed. | timestamp(3) with time zone | | **id** | The unique identifier for the ledger entry. | bigint | | **total_coins** | The total number of lumens (XLM) in circulation at the time the ledger was closed. | bigint | | **fee_pool** | The sum of all transaction fees accumulated in the ledger. | bigint | | **base_fee** | The minimum fee, in lumens (XLM), charged per operation included in the ledger. | bigint | | **base_reserve** | The minimum XLM balance required to maintain an account, as defined in the ledger. | bigint | | **max_tx_set_size** | The maximum number of transactions that can be included in a ledger. | bigint | | **protocol_version** | The protocol version used by the ledger. | bigint | | **ledger_header** | The raw binary (XDR) representation of the ledger header. | varbinary | | **successful_transaction_count** | The number of successful transactions in the ledger. | bigint | | **failed_transaction_count** | The number of failed transactions in the ledger. | bigint | | **tx_set_operation_count** | The total number of operations in the transaction set of the ledger. | bigint | | **soroban_fee_write_1kb** | The fee in lumens (XLM) for writing 1KB of data related to Soroban smart contracts. | bigint | | **node_id** | The identifier of the node that signed and validated the ledger. | varchar | | **signature** | The digital signature applied to the ledger by the validating node. | varchar | | **total_byte_size_of_bucket_list** | The total byte size of the ledger's bucket list, which tracks state changes. | bigint | | **updated_at** | The time when the ledger record was last updated. | timestamp(3) with time zone | | **ingested_at** | The time when the ledger data was ingested into the system. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_ledgers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_ledgers) # stellar.history_operations Source: https://docs.dune.com/data-catalog/stellar/history_operations Stellar operations — payments, offers, account changes, and other operation types. ## Table description The `stellar.history_operations` table tracks operational details of transaction in ledgers/blocks. Operations are objects that represent a desired change to the ledger: payments, offers to exchange currency, changes made to account options, etc. Operations are submitted to the Stellar network grouped in a Transaction. Each of Stellar’s operations have a unique operation object. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **closed_at_date** | The date when the operation was closed. | date | | **id** | The unique identifier for the operation. | bigint | | **source_account** | The account that initiated the operation. | varchar | | **source_account_muxed** | The multiplexed source account address, if applicable. | varchar | | **transaction_id** | The unique identifier for the transaction that includes the operation. | bigint | | **type** | The numeric representation of the operation type. | bigint | | **type_string** | The string description of the operation type. | varchar | | **closed_at** | The timestamp when the operation was closed. | timestamp(3) with time zone | | **operation_result_code** | The result code indicating the outcome of the operation. | varchar | | **operation_trace_code** | The trace code detailing the operation's execution. | varchar | | **ledger_sequence** | The sequence number of the ledger in which the operation is included. | bigint | | **account** | The account address associated with the operation. | varchar | | **account_muxed** | The multiplexed account address, if applicable. | varchar | | **account_muxed_id** | The ID of the multiplexed account, if applicable. | varchar | | **account_id** | The unique identifier for the account involved in the operation. | varchar | | **amount** | The amount of the asset transferred or affected by the operation. | double | | **asset** | The asset involved in the operation. | varchar | | **asset_code** | The code of the asset involved in the operation. | varchar | | **asset_issuer** | The issuer of the asset involved in the operation. | varchar | | **asset_id** | The unique identifier for the asset. | bigint | | **asset_type** | The type of asset involved in the operation. | varchar | | **authorize** | A boolean indicating whether authorization was given for the operation. | boolean | | **balance_id** | The ID of the balance affected by the operation. | varchar | | **buying_asset_code** | The code of the asset being bought in the operation. | varchar | | **buying_asset_issuer** | The issuer of the asset being bought in the operation. | varchar | | **buying_asset_id** | The unique identifier for the asset being bought. | bigint | | **buying_asset_type** | The type of asset being bought in the operation. | varchar | | **claimable_balance_id** | The ID of the claimable balance involved in the operation. | varchar | | **claimant** | The account address of the claimant. | varchar | | **claimant_muxed** | The multiplexed account of the claimant, if applicable. | varchar | | **claimant_muxed_id** | The ID of the multiplexed claimant account, if applicable. | varchar | | **data_account_id** | The account ID for the account where data is being modified. | varchar | | **data_name** | The name of the data being modified in the operation. | varchar | | **from** | The account address sending the asset in the operation. | varchar | | **from_muxed** | The multiplexed sender account, if applicable. | varchar | | **from_muxed_id** | The ID of the multiplexed sender account, if applicable. | varchar | | **funder** | The account funding the operation. | varchar | | **funder_muxed** | The multiplexed funder account, if applicable. | varchar | | **funder_muxed_id** | The ID of the multiplexed funder account, if applicable. | varchar | | **high_threshold** | The high threshold required for the operation. | bigint | | **home_domain** | The home domain associated with the account. | varchar | | **inflation_dest** | The destination account for inflation pools. | varchar | | **into** | The account receiving the asset in the operation. | varchar | | **into_muxed** | The multiplexed account receiving the asset, if applicable. | varchar | | **into_muxed_id** | The ID of the multiplexed recipient account, if applicable. | varchar | | **limit** | The limit of the trustline or balance change. | double | | **low_threshold** | The low threshold required for the operation. | bigint | | **master_key_weight** | The weight of the master key for signing transactions. | bigint | | **med_threshold** | The medium threshold required for the operation. | bigint | | **name** | The name associated with the operation or account. | varchar | | **offer_id** | The ID of the offer related to the operation. | bigint | | **path** | The payment path used in the operation. | array(row("asset_code" varchar,"asset_issuer" varchar,"asset_type" varchar)) | | **price** | The price of the asset involved in the operation. | double | | **price\_r** | The rational price of the asset (fraction of numerator and denominator). | row("d" bigint,"n" bigint) | | **selling_asset_code** | The code of the asset being sold in the operation. | varchar | | **selling_asset_issuer** | The issuer of the asset being sold in the operation. | varchar | | **selling_asset_id** | The unique identifier for the asset being sold. | bigint | | **selling_asset_type** | The type of asset being sold in the operation. | varchar | | **set_flags** | An array of flags being set by the operation. | array(bigint) | | **set_flags\_s** | An array of string descriptions for the flags being set. | array(varchar) | | **signer_account_id** | The account ID of the signer. | varchar | | **signer_key** | The key of the signer being modified. | varchar | | **signer_weight** | The weight assigned to the signer. | bigint | | **source_amount** | The source amount for the operation. | double | | **source_asset_code** | The code of the source asset in the operation. | varchar | | **source_asset_issuer** | The issuer of the source asset in the operation. | varchar | | **source_asset_id** | The unique identifier for the source asset. | bigint | | **source_asset_type** | The type of source asset in the operation. | varchar | | **source_max** | The maximum amount of the source asset allowed in the operation. | double | | **starting_balance** | The starting balance for the account in the operation. | double | | **to** | The account receiving the asset. | varchar | | **to_muxed** | The multiplexed account receiving the asset, if applicable. | varchar | | **to_muxed_id** | The ID of the multiplexed recipient account, if applicable. | varchar | | **trustee** | The trustee account involved in the operation. | varchar | | **trustee_muxed** | The multiplexed trustee account, if applicable. | varchar | | **trustee_muxed_id** | The ID of the multiplexed trustee account, if applicable. | varchar | | **trustline_account_id** | The account ID associated with the trustline in the operation. | varchar | | **trustline_asset** | The asset involved in the trustline operation. | varchar | | **trustor** | The trustor account in the operation. | varchar | | **trustor_muxed** | The multiplexed trustor account, if applicable. | varchar | | **trustor_muxed_id** | The ID of the multiplexed trustor account, if applicable. | varchar | | **value** | The value associated with the operation. | varchar | | **clear_flags** | An array of flags being cleared by the operation. | array(bigint) | | **clear_flags\_s** | An array of string descriptions for the flags being cleared. | array(varchar) | | **destination_min** | The minimum destination amount in the operation. | varchar | | **bump_to** | The sequence number to which the operation bumps. | varchar | | **authorize_to_maintain_liabilities** | A boolean indicating whether authorization is granted to maintain liabilities. | boolean | | **clawback_enabled** | A boolean indicating whether clawback is enabled for the operation. | boolean | | **sponsor** | The account sponsoring the operation. | varchar | | **sponsored_id** | The ID of the sponsored account. | varchar | | **begin_sponsor** | The sponsor that initiated the operation. | varchar | | **begin_sponsor_muxed** | The multiplexed sponsor account, if applicable. | varchar | | **begin_sponsor_muxed_id** | The ID of the multiplexed sponsor account, if applicable. | varchar | | **liquidity_pool_id** | The liquidity pool ID associated with the operation. | varchar | | **reserve_a_asset_type** | The type of the first reserve asset in the liquidity pool operation. | varchar | | **reserve_a_asset_code** | The code of the first reserve asset in the liquidity pool operation. | varchar | | **reserve_a_asset_issuer** | The issuer of the first reserve asset in the liquidity pool operation. | varchar | | **reserve_a_asset_id** | The unique identifier for the first reserve asset. | bigint | | **reserve_a_max_amount** | The maximum amount of the first reserve asset in the operation. | double | | **reserve_a_deposit_amount** | The amount of the first reserve asset deposited in the operation. | double | | **reserve_b_asset_type** | The type of the second reserve asset in the liquidity pool operation. | varchar | | **reserve_b_asset_code** | The code of the second reserve asset in the liquidity pool operation. | varchar | | **reserve_b_asset_issuer** | The issuer of the second reserve asset in the liquidity pool operation. | varchar | | **reserve_b_asset_id** | The unique identifier for the second reserve asset. | bigint | | **reserve_b_max_amount** | The maximum amount of the second reserve asset in the operation. | double | | **reserve_b_deposit_amount** | The amount of the second reserve asset deposited in the operation. | double | | **min_price** | The minimum price of the asset in the operation. | double | | **min_price\_r** | The rational minimum price of the asset (fraction of numerator and denominator). | array(row("d" bigint,"n" bigint)) | | **max_price** | The maximum price of the asset in the operation. | double | | **max_price\_r** | The rational maximum price of the asset (fraction of numerator and denominator). | array(row("d" bigint,"n" bigint)) | | **shares_received** | The number of shares received in the liquidity pool operation. | double | | **reserve_a_min_amount** | The minimum amount of the first reserve asset in the operation. | double | | **reserve_a_withdraw_amount** | The amount of the first reserve asset withdrawn in the operation. | double | | **reserve_b_min_amount** | The minimum amount of the second reserve asset in the operation. | double | | **reserve_b_withdraw_amount** | The amount of the second reserve asset withdrawn in the operation. | double | | **shares** | The number of shares involved in the liquidity pool operation. | double | | **asset_balance_changes** | An array of asset balance changes related to the operation. | array(row("amount" double,"asset_code" varchar,"asset_issuer" varchar,"asset_type" varchar,"from" varchar,"to" varchar,"type" varchar)) | | **parameters** | An array of parameters associated with the operation. | array(row("type" varchar,"value" varchar)) | | **parameters_decoded** | An array of decoded parameters associated with the operation. | array(row("type" varchar,"value" varchar)) | | **function** | The function executed in the operation. | varchar | | **address** | The address associated with the operation. | varchar | | **extend_to** | The sequence number to which the operation extends. | bigint | | **contract_id** | The contract ID associated with the operation. | varchar | | **contract_code_hash** | The hash of the contract code associated with the operation. | varchar | | **ledger_key_hash** | An array of hashes for the ledger keys associated with the operation. | array(varchar) | | **ledgers_to_expire** | The number of ledgers until the operation expires. | bigint | | **soroban_operation_type** | The type of operation for Soroban smart contracts. | varchar | | **updated_at** | The time when the operation record was last updated. | timestamp(3) with time zone | | **ingested_at** | The time when the operation data was ingested into the system. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_operations](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_operations) # stellar.history_trades Source: https://docs.dune.com/data-catalog/stellar/history_trades Stellar DEX trades — orderbook-based trades on the Stellar decentralized exchange. ## Table description The `stellar.history_trades` table records trades performed on Stellar's decentralized exchange. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **closed_at_date** | The date when the trade operation was closed. | date | | **history_operation_id** | The unique identifier for the operation associated with the trade. | bigint | | **order** | The sequence or order of the trade execution within the operation. | bigint | | **selling_account_address** | The account address of the seller in the trade. | varchar | | **selling_asset_code** | The code of the asset being sold in the trade. | varchar | | **selling_asset_issuer** | The issuer of the asset being sold in the trade. | varchar | | **selling_asset_type** | The type of asset being sold (e.g., native, issued). | varchar | | **selling_asset_id** | The identifier for the asset being sold. | bigint | | **selling_amount** | The amount of the asset being sold. | double | | **buying_account_address** | The account address of the buyer in the trade. | varchar | | **buying_asset_code** | The code of the asset being bought in the trade. | varchar | | **buying_asset_issuer** | The issuer of the asset being bought in the trade. | varchar | | **buying_asset_type** | The type of asset being bought (e.g., native, issued). | varchar | | **buying_asset_id** | The identifier for the asset being bought. | bigint | | **buying_amount** | The amount of the asset being bought. | double | | **price\_n** | The numerator of the price ratio (price as a fraction) of the trade. | bigint | | **price\_d** | The denominator of the price ratio (price as a fraction) of the trade. | bigint | | **selling_offer_id** | The offer ID for the selling side of the trade. | bigint | | **buying_offer_id** | The offer ID for the buying side of the trade. | bigint | | **selling_liquidity_pool_id** | The identifier for the liquidity pool involved in the selling side of the trade, if applicable. | varchar | | **liquidity_pool_fee** | The fee in lumens (XLM) for the liquidity pool, if applicable. | bigint | | **trade_type** | The type of trade (e.g., market, limit). | bigint | | **rounding_slippage** | The slippage amount due to rounding in the trade execution. | bigint | | **seller_is_exact** | A boolean indicating whether the seller's amount was exact in the trade. | boolean | | **closed_at** | The timestamp when the trade was closed. | timestamp(3) with time zone | | **updated_at** | The time when the trade record was last updated. | timestamp(3) with time zone | | **ingested_at** | The time when the trade data was ingested into the system. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_trades](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_trades) # stellar.history_transactions Source: https://docs.dune.com/data-catalog/stellar/history_transactions Stellar transaction records — source account, fee, memo, and operation count. ## Table description The `stellar.history_transactions` table contains transaction details, linking to multiple operations within a transaction. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **closed_at_date** | The date when the transaction was closed. | date | | **id** | The unique identifier for the transaction. | bigint | | **transaction_hash** | The hash of the transaction, in binary format. | varbinary | | **ledger_sequence** | The sequence number of the ledger in which the transaction is included. | bigint | | **account** | The account address that originated the transaction. | varchar | | **account_sequence** | The source account's sequence number that this transaction consumed. | bigint | | **max_fee** | The maximum fee that the account was willing to pay for the transaction. | bigint | | **operation_count** | The number of operations contained within this transaction. | bigint | | **created_at** | The timestamp when the transaction was created. | timestamp(3) with time zone | | **memo_type** | The type of memo attached to the transaction (e.g., text, id, hash). | varchar | | **memo** | The optional unstructured memo data attached to the transaction. | varchar | | **time_bounds** | The optional UNIX timestamp of the lower and upper bounds for when the transaction will be valid. | varchar | | **successful** | Indicates if the transaction succeeded. | boolean | | **fee_charged** | The fee charged for executing the transaction. | bigint | | **inner_transaction_hash** | The hash of a transaction wrapped with its signatures for fee-bump transactions. | varbinary | | **fee_account** | The account that paid for the transaction fees, which may differ from the originating account. | varchar | | **new_max_fee** | The maximum fee that the fee-payer is willing to pay for the transaction's fees. | bigint | | **account_muxed** | The virtual account address under a traditional Stellar account (multiplexed account). | varchar | | **fee_account_muxed** | The virtual address of the fee-paying account if it is a multiplexed account. | varchar | | **ledger_bounds** | Optional restrictions on the ledger range within which the transaction is valid. | varchar | | **min_account_sequence** | The minimum account sequence number required for this transaction to be valid. | bigint | | **min_account_sequence_age** | The minimum age (in seconds) of the sequence number. | bigint | | **min_account_sequence_ledger_gap** | The minimum number of ledgers between this transaction and the account's last transaction. | bigint | | **tx_envelope** | The raw XDR of the transaction that was submitted. | varchar | | **tx_result** | The raw XDR of the transaction result after execution. | varchar | | **tx_meta** | The raw XDR of the ledger state changes based on the transaction. | varchar | | **tx_fee_meta** | The raw XDR of the fee changes associated with the transaction. | varchar | | **extra_signers** | Any additional signers attached to the transaction (array of addresses). | array(varchar) | | **resource_fee** | The resource fee charged for executing the transaction. | bigint | | **soroban_resources_instructions** | The number of instructions used in Soroban smart contracts during the transaction. | bigint | | **soroban_resources_read_bytes** | The number of bytes read during Soroban smart contract execution. | bigint | | **soroban_resources_write_bytes** | The number of bytes written during Soroban smart contract execution. | bigint | | **closed_at** | The timestamp when the transaction was closed. | timestamp(3) with time zone | | **transaction_result_code** | The result code that includes error codes for failed transactions. | varchar | | **inclusion_fee_bid** | The fee bid by the account to include the transaction in the ledger. | bigint | | **inclusion_fee_charged** | The actual fee charged for the transaction to be included in the ledger. | bigint | | **resource_fee_refund** | The refunded portion of the resource fee. | bigint | | **non_refundable_resource_fee_charged** | The portion of the resource fee that is non-refundable. | bigint | | **refundable_resource_fee_charged** | The portion of the resource fee that can be refunded. | bigint | | **rent_fee_charged** | The fee charged for rent of contract storage or data resources. | bigint | | **tx_signers** | The array of signers involved in signing the transaction. | array(varchar) | | **refundable_fee** | The fee that can be refunded to the account based on transaction execution. | bigint | | **updated_at** | The time when the transaction record was last updated. | timestamp(3) with time zone | | **ingested_at** | The time when the transaction data was ingested into the system. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=history_transactions) # stellar.liquidity_pools Source: https://docs.dune.com/data-catalog/stellar/liquidity_pools Stellar AMM liquidity pools — pool assets, reserves, and share supply. ## Table description The `stellar.liquidity_pools` table stores data on Stellar’s liquidity pools, such as the type, fee, assets involved etc. Liquidity Pools provide a simple, non-interactive way to trade large amounts of capital and enable high volumes of trading. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **closed_at_date** | The date when the liquidity pool entry was closed. | date | | **liquidity_pool_id** | The unique identifier for the liquidity pool. | varchar | | **type** | The type of liquidity pool (e.g., constant product, stable). | varchar | | **fee** | The fee rate, in basis points, for trading within the liquidity pool. | bigint | | **trustline_count** | The number of trustlines associated with the liquidity pool. | bigint | | **pool_share_count** | The total number of pool shares outstanding, representing ownership in the pool. | double | | **asset_a_type** | The type of the first asset in the liquidity pool. | varchar | | **asset_a_code** | The code of the first asset in the liquidity pool. | varchar | | **asset_a_issuer** | The issuer of the first asset in the liquidity pool. | varchar | | **asset_a_id** | The unique identifier for the first asset in the liquidity pool. | bigint | | **asset_a_amount** | The total amount of the first asset held in the liquidity pool. | double | | **asset_b_type** | The type of the second asset in the liquidity pool. | varchar | | **asset_b_code** | The code of the second asset in the liquidity pool. | varchar | | **asset_b_issuer** | The issuer of the second asset in the liquidity pool. | varchar | | **asset_b_id** | The unique identifier for the second asset in the liquidity pool. | bigint | | **asset_b_amount** | The total amount of the second asset held in the liquidity pool. | double | | **last_modified_ledger** | The sequence number of the ledger where the liquidity pool entry was last modified. | bigint | | **ledger_entry_change** | Indicates the type of change made to the ledger entry (insert, update, delete). | bigint | | **deleted** | A boolean indicating whether the liquidity pool entry has been deleted from the ledger. | boolean | | **closed_at** | The timestamp when the liquidity pool entry was closed. | timestamp(3) with time zone | | **ledger_sequence** | The sequence number of the ledger in which the liquidity pool entry is included. | bigint | | **updated_at** | The time when the liquidity pool record was last updated. | timestamp(3) with time zone | | **ingested_at** | The time when the liquidity pool data was ingested into the system. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=liquidity_pools](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=liquidity_pools) # Stellar Data Source: https://docs.dune.com/data-catalog/stellar/overview Stellar blockchain data on Dune ## What is Stellar? Stellar is an open-source, decentralized blockchain designed for fast, low-cost financial transactions. Built around the Stellar Consensus Protocol (SCP), a unique proof-of-agreement (PoA) mechanism, Stellar focuses on facilitating cross-border payments, asset issuance, and decentralized finance (DeFi) applications. Stellar’s network prioritizes energy efficiency and speed, with transactions confirmed within 5 seconds and the network capable of processing up to 1,000 operations per ledger. Stellar's native token, the lumen (XLM), plays a key role in maintaining the network’s health by ensuring account activity and discouraging spam through a small transaction fee and minimum balance requirement. ## Key Concepts of Stellar Stellar’s blockchain architecture and mechanisms are designed for high-speed financial transactions and asset transfers, underpinned by a few critical components that set it apart from other blockchain platforms. ### **Ledger Structure** Stellar’s blockchain operates using ledgers, similar to blocks on other blockchains. A ledger records the state of accounts, balances, smart contracts, and other relevant data. Each ledger contains a ledger header, summarizing essential metadata such as the sequence number, transaction fees, and validator signatures. ### **Proof-of-Agreement Consensus** Stellar uses the Stellar Consensus Protocol (SCP), a proof-of-agreement consensus that enables rapid transaction processing while ensuring decentralization. Unlike proof-of-work (PoW) or proof-of-stake (PoS) models, SCP relies on trusted nodes reaching a consensus through agreement, making Stellar energy-efficient and fast. ### **Accounts and Trustlines** Stellar accounts hold **lumen (XLM)** and other token balances via **trustlines**. A trustline is an established link between a user account and a token issuer, allowing the user to hold, send, or receive tokens other than lumens. While **accounts** store native lumens, **trustlines** track the balances of other tokens, including popular assets like USDC and USDT. ### **Token Issuance** One of Stellar’s most powerful features is its support for **asset issuance**. Developers can create tokenized assets that represent fiat currencies, commodities, or other real-world value. These assets can be traded on Stellar’s native decentralized exchange (DEX), making Stellar an ideal platform for borderless payments and asset transfers. ### **Transaction Lifecycle & Fees** Each Stellar transaction is an atomic operation that can involve multiple **operations**, such as payments, creating accounts, or managing offers on the DEX. Fees are minimal, with the current minimum per-transaction fee being 0.00001 XLM. Stellar’s architecture ensures efficient cross-border transactions with a finality time of around 5 seconds. ### **Smart Contracts** Stellar supports smart contracts through a combination of **operations** and **contract data** stored on the ledger. Smart contracts can define various on-chain actions, such as token management or enforcing custom rules for transactions. Stellar's smart contract execution is energy-efficient, focusing on lightweight operations for scalability. > [card] [Stellar documentation](https://developers.stellar.org/docs/learn/fundamentals) > > Explore comprehensive documentation of Stellar, detailing its architecture, protocol, and resources for developers. > [card] [Stellar data model diagram](https://developers.stellar.org/docs/data/hubble/data-catalog/data-model-diagram) > > See the relationship between history and state tables in Stellar's data model. ## Stellar Data on Dune Stellar blockchain data is categorized into traditional time series tables (e.g., **history\_** tables for actions affecting the state of the ledger) and **ledger state** tables (e.g., **accounts**, representing the current state). This division allows users to explore historical actions and current ledger state for deeper analysis. Here are the Stellar tables available on Dune: > [card] [Accounts](/data-catalog/stellar/accounts) > > Tracks the native token (Lumens) balances held by accounts. > [card] [Contract Data](/data-catalog/stellar/contract_data) > > Stores state data for smart contracts, including supported tokens and storage costs. > [card] [Trust Lines](/data-catalog/stellar/trust_lines) > > Tracks balances of accounts for non-native tokens (such as USDC or USDT). > [card] [Liquidity Pools](/data-catalog/stellar/liquidity_pools) > > Stores data on Stellar’s liquidity pools, such as the type, fee, assets involved etc. > [card] [TTL (Time to Live)](/data-catalog/stellar/ttl) > > Records time limits for smart contract data, enforcing storage expiry rules. > [card] [History Contract Events](/data-catalog/stellar/history_contract_events) > > Captures all smart contract events and traces, with details on contract execution. > [card] [History Ledgers](/data-catalog/stellar/history_ledgers) > > Tracks ledgers info (equivalent of blocks on other blockchain), including metadata such as sequence numbers, transactions included, and fees. > [card] [History Operations](/data-catalog/stellar/history_operations) > > Tracks operational details of transaction in ledgers/blocks. > [card] [History Trades](/data-catalog/stellar/history_trades) > > Records trades performed on Stellar's decentralized exchange. > [card] [History Transactions](/data-catalog/stellar/history_transactions) > > Contains transaction details, linking to multiple operations within a transaction. > [card] [History Effects](/data-catalog/stellar/history_effects) > > Records specific changes that occur in the ledger as a result of success operations, but are not necessarily directly reflected in the ledger or history, as transactions and operations are. # stellar.trust_lines Source: https://docs.dune.com/data-catalog/stellar/trust_lines Stellar trustlines — authorized asset holdings per account. ## Table description The `stellar.trust_lines` table tracks balances of accounts for non-native tokens (such as USDC or USDT). Trustlines are an explicit opt-in for an account to hold and trade a particular asset. To hold a specific asset, an account must establish a trustline with the issuing account using the change_trust operation. Trustlines track the balance of an asset and can also limit the amount of an asset that an account can hold. A trustline must be established for an account to receive any asset except lumens (XLM). You can create a claimable balance to send assets to an account without a trustline, but the recipient has to create a trustline to claim that balance. Learn more here: Claimable Balances Encyclopedia Entry A trustline also tracks liabilities. Buying liabilities equal the total amount of the asset offered to buy aggregated over all offers owned by an account, and selling liabilities equal the total amount of the asset offered to sell aggregated over all offers owned by an account. A trustline must always have a balance sufficiently large to satisfy its selling liabilities and a balance sufficiently below its limit to accommodate its buying liabilities. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **ledger_key** | The unique identifier for the trustline entry in the ledger. | varchar | | **account_id** | The account address associated with the trustline. | varchar | | **asset_type** | The type of asset for which the trustline is established (e.g., native, issued). | varchar | | **asset_issuer** | The issuer of the asset for which the trustline is established. | varchar | | **asset_code** | The code of the asset for which the trustline is established. | varchar | | **asset_id** | The unique identifier for the asset in the trustline. | bigint | | **liquidity_pool_id** | The identifier of the liquidity pool related to the trustline, if applicable. | varchar | | **balance** | The balance of the asset held by the account in the trustline. | double | | **trust_line_limit** | The maximum balance of the asset that the account is willing to hold via the trustline. | bigint | | **buying_liabilities** | The total liabilities for buying offers on the account for this trustline. | double | | **selling_liabilities** | The total liabilities for selling offers on the account for this trustline. | double | | **flags** | A set of flags representing various properties of the trustline, such as authorization requirements. | bigint | | **last_modified_ledger** | The ledger sequence number where the trustline entry was last modified. | bigint | | **ledger_entry_change** | Indicates the type of change made to the ledger entry (insert, update, delete). | bigint | | **deleted** | A boolean indicating whether the trustline entry has been deleted from the ledger. | boolean | | **sponsor** | The account that is sponsoring this trustline's resources. | varchar | | **closed_at** | The timestamp when the trustline entry was closed. | timestamp(3) with time zone | | **ledger_sequence** | The sequence number of the ledger in which the trustline entry is included. | bigint | | **updated_at** | The time when the trustline record was last updated. | timestamp(3) with time zone | | **ingested_at** | The time when the trustline data was ingested into the system. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=trust_lines](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=trust_lines) # stellar.ttl Source: https://docs.dune.com/data-catalog/stellar/ttl Stellar contract data time-to-live records. ## Table description The `stellar.ttl` table records time limits for smart contract data, enforcing storage expiry rules. ## Column Descriptions | **Column** | **Description** | **Type** | | - | - | - | | **closed_at_date** | The date when the TTL (Time-to-Live) entry was closed. | date | | **key_hash** | The hash of the key used to identify the TTL entry, in binary format. | varbinary | | **live_until_ledger_seq** | The ledger sequence number until which the TTL entry remains live. | bigint | | **last_modified_ledger** | The ledger sequence number where the TTL entry was last modified. | bigint | | **ledger_entry_change** | Indicates the type of change made to the ledger entry (insert, update, delete). | bigint | | **deleted** | A boolean indicating whether the TTL entry has been deleted from the ledger. | boolean | | **closed_at** | The timestamp when the TTL entry was closed. | timestamp(3) with time zone | | **ledger_sequence** | The sequence number of the ledger in which the TTL entry is included. | bigint | | **updated_at** | The time when the TTL record was last updated. | timestamp(3) with time zone | | **ingested_at** | The time when the TTL data was ingested into the system. | timestamp(3) with time zone | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=ttl](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=stellar\&table_name_t6f0df=ttl) # polkadot.balances Source: https://docs.dune.com/data-catalog/substrate/balances Description of Substrate balances tables on Dune. ## Table description The `balances` table (e.g. `polkadot.balances`) stores a snapshot of all account balances at the end of each day: `free`, `reserved`, `misc_frozen`, and their USD value, if available. ## Table Schema | Column | Type | Description | | - | - | - | | `year` | `INTEGER` | Calendar year of the snapshot (partition column) | | `month` | `INTEGER` | Calendar month of the snapshot (partition column) | | `day` | `INTEGER` | Calendar day of the snapshot (partition column) | | `ts` | `TIMESTAMP` | Timestamp of the end-of-day balance snapshot | | `symbol` | `VARCHAR` | Token symbol (e.g. `DOT`, `KSM`) | | `address_ss58` | `VARCHAR` | SS58-encoded address of the account holder | | `address_pubkey` | `VARBINARY` | Public key of the account holder | | `id` | `VARCHAR` | Unique identifier for the asset | | `chain_name` | `VARCHAR` | Name of the Substrate chain (e.g. `polkadot`, `kusama`) | | `asset` | `VARCHAR` | Asset type or name | | `para_id` | `BIGINT` | Parachain ID, if the balance is on a parachain | | `free` | `DOUBLE` | Freely transferable balance (human-readable units) | | `reserved` | `DOUBLE` | Reserved balance locked for on-chain activities (human-readable units) | | `misc_frozen` | `DOUBLE` | Balance frozen for miscellaneous reasons (human-readable units) | | `frozen` | `DOUBLE` | Total frozen balance (human-readable units) | | `nonce` | `BIGINT` | Account transaction nonce at the time of the snapshot | | `free_raw` | `VARCHAR` | Raw free balance in smallest denomination (Planck) | | `reserved_raw` | `VARCHAR` | Raw reserved balance in smallest denomination (Planck) | | `misc_frozen_raw` | `VARCHAR` | Raw misc frozen balance in smallest denomination (Planck) | | `frozen_raw` | `VARCHAR` | Raw frozen balance in smallest denomination (Planck) | | `flags_raw` | `VARCHAR` | Raw account flags value | | `updated_at` | `TIMESTAMP` | When this record was last updated in the database | | `ingested_at` | `TIMESTAMP` | When this record was first ingested into the database | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=balances) # polkadot.blocks Source: https://docs.dune.com/data-catalog/substrate/blocks Description of Substrate blocks table on Dune. ## Table description The `polkadot.blocks` table stores basic information about Substrate blocks, with one record per block, including the block hash and statistics on the number of extrinsics, events, and transfers contained in each block. ## Table Schema | Column | Type | Description | | - | - | - | | `year` | `INTEGER` | Calendar year of the block (partition column) | | `month` | `INTEGER` | Calendar month of the block (partition column) | | `day` | `INTEGER` | Calendar day of the block (partition column) | | `block_time` | `TIMESTAMP` | The timestamp when the block was produced | | `number` | `BIGINT` | The sequential block number | | `spec_version` | `BIGINT` | Runtime specification version active at this block | | `relay_block_number` | `BIGINT` | Corresponding relay chain block number (for parachains) | | `hash` | `VARBINARY` | Unique hash identifying this block | | `parent_hash` | `VARBINARY` | Hash of the preceding block | | `state_root` | `VARBINARY` | Root hash of the state trie after this block | | `extrinsics_root` | `VARBINARY` | Root hash of the extrinsics trie for this block | | `author_ss58` | `VARCHAR` | SS58-encoded address of the block author/validator | | `author_pub_key` | `VARBINARY` | Public key of the block author/validator | | `relay_state_root` | `VARBINARY` | State root of the relay chain at this block (for parachains) | | `extrinsic_count` | `BIGINT` | Number of extrinsics included in this block | | `event_count` | `BIGINT` | Number of events emitted in this block | | `transfer_count` | `BIGINT` | Number of token transfers in this block | | `trace_count` | `BIGINT` | Number of traces recorded for this block | | `updated_at` | `TIMESTAMP` | When this record was last updated in the database | | `ingested_at` | `TIMESTAMP` | When this record was first ingested into the database | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=blocks](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=blocks) # polkadot.calls Source: https://docs.dune.com/data-catalog/substrate/calls Description of Substrate calls tables on Dune. ## Table description The `polkadot.calls` table represents *internal* calls within Substrate extrinsics, including recursive calls from `proxy` and `utility` (batch) pallets, and provides detailed call arguments at each level of the call tree. Unlike the `extrinsics` table which only captures the top-level call, this table exposes the full call hierarchy. Common queries on the `calls` table will typically filter on `block_time`, `call_section` and `call_method` and extract JSON encoded information in `data` or `decoded_data`. ## Table Schema | Column | Type | Description | | - | - | - | | `year` | `INTEGER` | Calendar year of the block (partition column) | | `month` | `INTEGER` | Calendar month of the block (partition column) | | `call_section` | `VARCHAR` | The pallet (module) of this call (e.g. `Balances`, `Staking`) | | `call_method` | `VARCHAR` | The method name within the pallet (e.g. `transfer`, `bond`) | | `block_number` | `BIGINT` | The sequential number of the block containing this call | | `block_time` | `TIMESTAMP` | The timestamp of the block containing this call | | `extrinsic_id` | `VARCHAR` | Identifier of the parent extrinsic (format: `blockNumber-extrinsicIndex`) | | `relay_chain` | `VARCHAR` | Name of the relay chain (e.g. `polkadot`, `kusama`) | | `para_id` | `BIGINT` | Parachain ID, if this call is on a parachain | | `id` | `VARCHAR` | Unique identifier for this call | | `block_hash` | `VARBINARY` | Hash of the block containing this call | | `extrinsic_hash` | `VARBINARY` | Hash of the parent extrinsic | | `extrinsic_section` | `VARCHAR` | The pallet of the top-level extrinsic | | `extrinsic_method` | `VARCHAR` | The method of the top-level extrinsic | | `call_id` | `VARCHAR` | Identifier for this specific call within the extrinsic | | `call_index` | `VARBINARY` | Encoded index of the call within the pallet | | `call_args` | `VARCHAR` | JSON-encoded arguments passed to this call | | `call_args_def` | `VARCHAR` | JSON-encoded definition/schema of the call arguments | | `root` | `BOOLEAN` | Whether this is the root (top-level) call in the extrinsic | | `leaf` | `BOOLEAN` | Whether this is a leaf call with no further nested calls | | `fee` | `DOUBLE` | Transaction fee paid for this call | | `weight` | `BIGINT` | Execution weight consumed by this call | | `signed` | `BOOLEAN` | Whether the parent extrinsic was signed | | `signer_ss58` | `VARCHAR` | SS58-encoded address of the extrinsic signer | | `signer_pub_key` | `VARBINARY` | Public key of the extrinsic signer | | `lifetime` | `VARCHAR` | Validity period of the extrinsic (mortal/immortal era) | | `updated_at` | `TIMESTAMP` | When this record was last updated in the database | | `ingested_at` | `TIMESTAMP` | When this record was first ingested into the database | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=calls](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=calls) # polkadot.events Source: https://docs.dune.com/data-catalog/substrate/events Substrate runtime events across Polkadot, Kusama, and parachain networks. ## Table description The `events` table (e.g. `polkadot.events`) holds all events that occur on the chain, including their pallet `section` and `method`, as well as the decoded data involved in the event. Common queries on the `events` table will typically filter on `block_time`, `section` and `method` and extract JSON encoded information in `data` or `decoded_data`. ## Table Schema | Column | Type | Description | | - | - | - | | `year` | `INTEGER` | Calendar year of the block (partition column) | | `month` | `INTEGER` | Calendar month of the block (partition column) | | `section` | `VARCHAR` | The pallet (module) that emitted this event (e.g. `Balances`, `System`) | | `method` | `VARCHAR` | The event method name within the pallet (e.g. `Transfer`, `ExtrinsicSuccess`) | | `block_time` | `TIMESTAMP` | The timestamp of the block containing this event | | `block_number` | `BIGINT` | The sequential number of the block containing this event | | `extrinsic_id` | `VARCHAR` | Identifier of the extrinsic that triggered this event | | `event_id` | `VARCHAR` | Unique identifier for this event (format: `blockNumber-eventIndex`) | | `data` | `VARCHAR` | JSON-encoded event data | | `extrinsic_hash` | `VARBINARY` | Hash of the extrinsic that triggered this event | | `block_hash` | `VARBINARY` | Hash of the block containing this event | | `data_decoded` | `VARCHAR` | Human-readable decoded event data | | `updated_at` | `TIMESTAMP` | When this record was last updated in the database | | `ingested_at` | `TIMESTAMP` | When this record was first ingested into the database | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=events) # polkadot.extrinsics Source: https://docs.dune.com/data-catalog/substrate/extrinsics Description of Substrate extrinsics table on Dune. ## Table description Extrinsics (aka "transactions") normally contain a signature, some data to describe if the extrinsic has passed some validity checks and a reference to the pallet and call that it is intended for. Extrinsics may be signed or unsigned. Some extrinsics have a complex structure, e.g. when using proxy or utility pallets, resulting in the top-level call initiating other calls involving other pallets. Common queries on the `extrinsics` table (e.g. `polkadot.extrinsics`) will typically filter on `block_time`, `section` and `method` and extract JSON encoded information in `data` or `decoded_data`. In many cases, an initial query on the `extrinsics` table is best developed on the calls table instead to properly capture how users often use proxy and utility constructs to interact with the Substrate chain. ## Table Schema | Column | Type | Description | | - | - | - | | `year` | `INTEGER` | Calendar year of the block (partition column) | | `month` | `INTEGER` | Calendar month of the block (partition column) | | `section` | `VARCHAR` | The pallet (module) of the top-level call (e.g. `Balances`, `Staking`) | | `method` | `VARCHAR` | The method name within the pallet (e.g. `transferKeepAlive`, `nominate`) | | `block_time` | `TIMESTAMP` | The timestamp of the block containing this extrinsic | | `block_number` | `BIGINT` | The sequential number of the block containing this extrinsic | | `extrinsic_id` | `VARCHAR` | Unique identifier for this extrinsic (format: `blockNumber-extrinsicIndex`) | | `hash` | `VARBINARY` | Hash of this extrinsic | | `block_hash` | `VARBINARY` | Hash of the block containing this extrinsic | | `lifetime` | `VARCHAR` | Validity period of the extrinsic (mortal/immortal era) | | `params` | `VARCHAR` | JSON-encoded parameters of the top-level call | | `fee` | `DOUBLE` | Transaction fee paid for this extrinsic | | `weight` | `BIGINT` | Execution weight consumed by this extrinsic | | `signed` | `BOOLEAN` | Whether this extrinsic includes a cryptographic signature | | `signer_ss58` | `VARCHAR` | SS58-encoded address of the signer | | `signer_pub_key` | `VARBINARY` | Public key of the signer | | `status` | `BOOLEAN` | Whether the extrinsic executed successfully (`true`) or failed (`false`) | | `updated_at` | `TIMESTAMP` | When this record was last updated in the database | | `ingested_at` | `TIMESTAMP` | When this record was first ingested into the database | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=extrinsics](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=extrinsics) # Materialized Views Source: https://docs.dune.com/data-catalog/substrate/materialized_views Useful materialized views for Polkadot, Kusama & their parachains. > [!NOTE] > > Materialized views store pre-computed query results as tables, enabling faster queries and simplified data pipelines. To learn more about creating and using materialized views, see the [Materialized Views page](/query-engine/materialized-views). A list of useful queries that we have [materialized](https://dune.com/queries?category=third_party_data\&catalog=dune\&schema=substrate) for usability. Some complex dashboards can be constructed more efficiently by referencing these materialized views. Forks and additions are welcome! ## Polkadot | Materialized View | Query ID | Description | | - | - | - | | dune.substrate.result_polkadot_validators | [query_3302709](https://dune.com/queries/3302709) | Analyzes Polkadot validators' performance and staking rewards, including nominator associations and APR calculations. | | dune.substrate.result_polkadot_nominationpools | [query_3327350](https://dune.com/queries/3327350) | Tracks and assesses Nomination Pool rewards, fees, and APR within the Polkadot ecosystem. | | dune.substrate.result_polkadot_nominators | [query_3326829](https://dune.com/queries/3326829) | Summarizes active nominator contributions, rewards, and their share in validators' stakes in Polkadot. | | dune.substrate.result_polkadot_poolmembers | [query_3327479](https://dune.com/queries/3327479) | Details individual Nomination Pool member contributions, rewards, and unclaimed amounts in Polkadot. | | dune.substrate.result_polkadot_identity | [query_3420617](https://dune.com/queries/3420617) | A mapping between Polkadot and Kusama identities, linking addresses and verifying authenticity. | | dune.substrate.result_polkadot_referenda_total_voting_power | [query_3394422](https://dune.com/queries/3394422) | Summarizes Polkadot referenda votes, detailing direct and delegated voting power and convictions. | | dune.substrate.result_polkadot_staking_nomination_total | [query_3426963](https://dune.com/queries/3426963) | Displays Polkadot nominators, their staked totals per validator, and validator identities by era. | | dune.substrate.result_polkadot_open_gov_delegation | [query_3393179](https://dune.com/queries/3393179) | Details staked totals by Polkadot nominators across validators and eras, including validator names. | | dune.substrate.result_polkadot_vote_record | [query_3415321](https://dune.com/queries/3415321) | Polkadot referenda vote information, integrating direct, proxy, and delegated votes with dynamic links and voter identities. | | dune.substrate.result_polkadot_proposals_proposed | [query_3394156](https://dune.com/queries/3394156) | Tracks Polkadot referenda statuses including proposer details, timelines, and outcome, with direct links to further information. | | dune.substrate.result_polkadot_referenda_direct_vote | [query_3391225](https://dune.com/queries/3391225) | All Polkadot referendum direct votes (filter expired votes). | | dune.substrate.result_polkadot_each_vote_record | [query_3393684](https://dune.com/queries/3393684) | Aggregates Polkadot referendum voting details, showing voter identities, vote types, convictions, and power, including direct and delegated votes. | | dune.substrate.result_polkadot_referenda_origin_map | [query_3399352](https://dune.com/queries/3399352) | Associates Polkadot referenda with their origins. | | dune.substrate.result_polkadot_failed_calls_in_batch | [query_3457139](https://dune.com/queries/3457139) | Finds some failed calls hidden in a utility batch on Polkadot. | ## Kusama | Materialized View | Query ID | Description | | - | - | - | | dune.substrate.result_kusama_validators | [query_3477509](https://dune.com/queries/3477509) | Analyzes Kusama validators' performance and staking rewards, including nominator associations and APR calculations. | | dune.substrate.result_kusama_nominationpools | [query_3477568](https://dune.com/queries/3477568) | Tracks and assesses Nomination Pool rewards, fees, and APR within the Kusama ecosystem. | | dune.substrate.result_kusama_nominators | [query_3477192](https://dune.com/queries/3477192) | Summarizes active nominator contributions, rewards, and their share in validators' stakes in Kusama. | | dune.substrate.result_kusama_poolmembers | [query_3477877](https://dune.com/queries/3477877) | Details individual Nomination Pool member contributions, rewards, and unclaimed amounts in Kusama. | | dune.substrate.result_kusama_referenda_total_voting_power | [query_3480624](https://dune.com/queries/3480624) | Summarizes Kusama referenda votes, detailing direct and delegated voting power and convictions. | | dune.substrate.result_kusama_open_gov_delegation | [query_3480477](https://dune.com/queries/3480477) | Details staked totals by Kusama nominators across validators and eras, including validator names. | | dune.substrate.result_kusama_vote_record | [query_3480405](https://dune.com/queries/3480405) | Kusama referenda vote information, integrating direct, proxy, and delegated votes with dynamic links and voter identities. | | dune.substrate.result_kusama_proposals_proposed | [query_3480370](https://dune.com/queries/3480370) | Tracks Kusama referenda statuses including proposer details, timelines, and outcome, with direct links to further information. | | dune.substrate.result_kusama_referenda_direct_vote | [query_3480617](https://dune.com/queries/3480617) | All Kusama referendum direct votes (filter expired votes). | | dune.substrate.result_kusama_each_vote_record | [query_3480878](https://dune.com/queries/3480878) | Aggregates Kusama referendum voting details, showing voter identities, vote types, convictions, and power, including direct and delegated votes. | | dune.substrate.result_kusama_referenda_origin_map | [query_3480454](https://dune.com/queries/3480454) | Associates Kusama referenda with their origins. | | dune.substrate.result_kusama_failed_calls_in_batch | [query_3480469](https://dune.com/queries/3480469) | Finds some failed calls hidden in a utility batch on Kusama. | ## Interlay | Materialized View | Query ID | Description | | - | - | - | | dune.substrate.result_interlay_oracle | [query_3445402](https://dune.com/queries/3445402) | All graphs that use a price on Interlay | | dune.substrate.result_interlay_vault_creation | [query_3437565](https://dune.com/queries/3437565) | All graphs that show vaults with their collateral | | dune.substrate.result_hydradx_oracle | [query_3459562](https://dune.com/queries/3459562) | All graphs that use trade volume or prices on HydraDX. | # Polkadot & Substrate Overview Source: https://docs.dune.com/data-catalog/substrate/overview Substrate chains (e.g. Polkadot and its parachains) are on Dune. > [!WARNING] > > **Deprecation Notice**: Starting from the 7th of July 2025 Dune is not live ingesting and indexing Polkadot data. The historical data of the chain will remain available to be used. The Polkadot Relay Chain is a proof-of-stake blockchain that provides shared security and secure interoperability to other blockchains, known as parachains. Parachain's transactions are processed in parallel by Polkadot. Kusama is a sister relay chain, designed as a canary blockchain, largely to test new Polkadot functionality before being deployed on Polkadot. Both relay chains and all their parachains are built with Substrate. Substrate is the primary blockchain SDK used by developers to create parachains that make up the Polkadot and Kusama networks. There also is a growing number of chains built with Substrate that are outside of Polkadot's shared security infrastructure. In Dune, Substrate tables model the activity of Substrate chains and are ingested hourly. All Substrate chains share identical schemas. For documentation purposes, we use `polkadot.` to showcase how to use all other `.`. > [!NOTE] > > > > Polkadot and all of the substrate chains are ingested by [Colorful Notion](https://colorfulnotion.com) > and are supported by [Polkadot OpenGov](https://polkadot.opengov.io). ## Onboarding Status Both Polkadot and Kusama relay chains and several leading parachains have been onboarded as of March 2024. All Polkadot system chains and Polkadot parachains (as of early 2024) are being onboarded in early Q2 2024. Modeling EVM Activity within Substrate is planned in mid to late Q2 2024. [https://dune.com/embeds/3523887/5925917](https://dune.com/embeds/3523887/5925917) ## Substrate Tables All tables are organized by a temporal variable (`block_time` or `ts`). Because Substrate is organized by *pallets*, several of the key tables (`calls`, `events` and `extrinsics`) are usually filtered by the pallet section and method (`call_section` and `call_method` for `calls`, or `section` and `method` for `events` and `extrinsics`). Decoded data is available in `decoded_data` for these tables in JSON form. > [card] [Blocks](/data-catalog/substrate/blocks) > > Each block in the blockchain, summarized with its hash and key statistics for quick overview. > [card] [Extrinsics](/data-catalog/substrate/extrinsics) > > Detailed transaction data, encompassing both signed and unsigned operations, directly invoking pallet functions. > [card] [Balances](/data-catalog/substrate/balances) > > Daily snapshots capturing the state of user assets, reflecting the end-of-day balances. > [card] [Calls](/data-catalog/substrate/calls) > > Comprehensive info on function calls, expanding top-level extrinsics with internal calls. > [card] [Events](/data-catalog/substrate/events) > > All events emitted by the runtime, including system events, and events from all pallets. > [card] [Transfers](/data-catalog/substrate/transfers) > > Complete ledger of asset transfers across the network, capturing the movement of tokens between accounts. > [card] [Traces](/data-catalog/substrate/traces) > > In-depth Substrate storage data, offering insights that are not readily available from the events data alone. > [card] [Stakings](/data-catalog/substrate/stakings) > > Raw staking data including details on Validators, Nominators, Pools, and Pool Members, specific to Polkadot and Kusama Relay Chains. > [card] [Materialized Views](/data-catalog/substrate/materialized_views) > > Optimized data views storing pre-processed information from other tables, streamlining access to pipelined chain data. ## Sample Queries As Substrate chains use SS58 Addresses, the following Dune function is very useful: * [SS58 functions: from_ss58(varchar) + to_ss58(varbinary, int)](/query-engine/Functions-and-operators/ss58) ### overview of recent blocks ```sql theme={null} SELECT DATE(block_time) AS logDT, count(distinct number) numBlocks, MAX(block_time) AS lastBlockTime, MIN(number) AS b0, MAX(number) AS b1, (MAX(number) -MIN(number) - count(distinct number)) + 1 as missing FROM polkadot.blocks WHERE block_time > DATE('2024-01-01') GROUP BY 1 order by 1 desc; ``` ### popular pallets Query the most popular pallets and their methods. ```sql theme={null} select count(distinct signer_ss58) numUsers, count(*) numCalls, call_section, call_method from polkadot.calls where call_section not in ('timestamp', 'utility', 'proxy') group by call_section, call_method order by count(*) desc ``` ### frequent events Query the most frequent events, excluding system events. ```sql theme={null} select count(*) numEvents, concat(section, ':', method) as sm from polkadot.events where section not in ('system') group by 2 order by count(*) desc ``` ### other chains To query other chains, replace `polkadot` with the chain name, e.g. `kusama`, `interlay`, `astar` etc. ```sql theme={null} SELECT date_format(block_time, '%Y-%m') as monthDT, call_method, COUNT(DISTINCT signer_ss58) AS numUniqueActiveUsers, COUNT(Distinct extrinsic_id ) AS numCalls FROM assethub.calls WHERE call_section IN ('nfts') AND call_method IN ('buyItem', 'mint') AND block_time >= TIMESTAMP '2023-01-01' GROUP BY 1, 2 ORDER BY 1, 2; ``` ### JSON extraction You will often need to extract data from JSON fields. Here is an example of how to extract data from the `events` table. ```sql theme={null} SELECT E.block_time, JSON_VALUE(E.data, 'strict $[0]') as account, JSON_VALUE(E.data_decoded, 'strict $[0].address') as pub_key, CAST(JSON_VALUE(E.data, 'strict $[1]') AS SMALLINT) as asset_id_1, CAST(JSON_VALUE(E.data, 'strict $[2]') AS SMALLINT) as asset_id_2, (JSON_VALUE(E.data, 'strict $[3]'))as amount_1, (JSON_VALUE(E.data, 'strict $[4]'))as amount_2, (JSON_VALUE(E.data, 'strict $[5]'))as hub_in, (JSON_VALUE(E.data, 'strict $[6]'))as hub_out, (JSON_VALUE(E.data, 'strict $[7]'))as asset_fee, (JSON_VALUE(E.data, 'strict $[8]'))as protocol_fee, A1.decimals as decimals_1, A1.ticker as ticker_1, A2.decimals as decimals_2, A2.ticker as ticker_2, method FROM hydradx.events E LEFT JOIN query_3482301 A1 on A1.asset_id=CAST(JSON_VALUE(data, 'strict $[1]') as INT) LEFT JOIN query_3482301 A2 on A2.asset_id=CAST(JSON_VALUE(data, 'strict $[2]') as INT) WHERE section='omnipool' and method in('SellExecuted', 'BuyExecuted') ``` # polkadot.stakings Source: https://docs.dune.com/data-catalog/substrate/stakings Polkadot staking data — validator nominations, staking rewards, and slash events. ## Table description The `polkadot.stakings` table includes all the data necessary to compute staking-related metrics for Validators, Nominators, Pools, and Pool Members. This is currently supported for Polkadot and Kusama Relay Chain only. ## Table Schema | Column | Type | Description | | - | - | - | | `year` | `INTEGER` | Calendar year of the record (partition column) | | `month` | `INTEGER` | Calendar month of the record (partition column) | | `section` | `VARCHAR` | The pallet section for this staking record (e.g. `Staking`, `NominationPools`) | | `storage` | `VARCHAR` | The specific storage item being tracked (e.g. `Validators`, `Nominators`) | | `block_number` | `BIGINT` | The block number at which this staking snapshot was taken | | `ts` | `TIMESTAMP` | Timestamp of the staking snapshot | | `era` | `BIGINT` | The staking era number | | `address_ss58` | `VARCHAR` | SS58-encoded address of the validator, nominator, or pool member | | `address_pubkey` | `VARBINARY` | Public key of the validator, nominator, or pool member | | `block_hash` | `VARBINARY` | Hash of the block at which the snapshot was taken | | `submitted_in` | `BIGINT` | The era in which the nominator's nomination was submitted | | `suppressed` | `BOOLEAN` | Whether the validator is suppressed (excluded from election) | | `validator_total` | `DOUBLE` | Total stake backing this validator (own + nominated) | | `validator_own` | `DOUBLE` | Validator's own bonded stake | | `validator_commission` | `DOUBLE` | Validator's commission rate (0.0 to 1.0) | | `validator_reward_shares` | `DOUBLE` | Proportion of total staking rewards earned by this validator | | `validator_reward_points` | `BIGINT` | Reward points earned by this validator in the era | | `validator_staking_rewards` | `DOUBLE` | Staking rewards earned by this validator in the era | | `total_staked` | `DOUBLE` | Total amount staked across all validators in the era | | `total_reward_points` | `BIGINT` | Total reward points across all validators in the era | | `total_staking_rewards` | `DOUBLE` | Total staking rewards distributed in the era | | `nominationpools_id` | `BIGINT` | Nomination pool ID | | `nominationpools_total` | `DOUBLE` | Total staked in the nomination pool | | `nominationpools_member_cnt` | `BIGINT` | Number of members in the nomination pool | | `nominationpools_commission` | `DOUBLE` | Commission rate of the nomination pool | | `nominationpools_rewardpools` | `VARCHAR` | JSON-encoded reward pool data for the nomination pool | | `member_bonded` | `DOUBLE` | Amount bonded by a pool member | | `member_unbonded` | `DOUBLE` | Amount in the process of unbonding for a pool member | | `member_share` | `DOUBLE` | Pool member's share of the pool's total stake | | `targets` | `ARRAY(VARCHAR)` | List of validator addresses targeted by this nominator | | `pv` | `VARCHAR` | Protocol version or parameter value | | `track` | `VARCHAR` | Governance track for OpenGov-related staking data | | `updated_at` | `TIMESTAMP` | When this record was last updated in the database | | `ingested_at` | `TIMESTAMP` | When this record was first ingested into the database | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=stakings](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=stakings) # polkadot.traces Source: https://docs.dune.com/data-catalog/substrate/traces Polkadot execution traces — detailed runtime execution data across pallets. ## Table description The `polkadot.traces` table, also known as the "snapshot" table, stores relevant on-chain state data that is otherwise difficult to acquire from base Substrate tables such as extrinsics and events. The traces tables are populated with special scripts modeling key storage elements at the end of the hour or day. Having these snapshots enables Dune analysts to build useful dashboards on Dune such as: * [Polkadot Staking](https://dune.com/substrate/polkadot-staking) * [Polkadot OpenGov](https://dune.com/substrate/polkadot-gov) * [HydraDX OmniPool](https://dune.com/substrate/hydradx) * [Interlay Vaults](https://dune.com/substrate/interlay) ## Table Schema | Column | Type | Description | | - | - | - | | `year` | `INTEGER` | Calendar year of the snapshot (partition column) | | `month` | `INTEGER` | Calendar month of the snapshot (partition column) | | `section` | `VARCHAR` | The pallet (module) of the storage item being traced | | `storage` | `VARCHAR` | The specific storage item name being traced | | `ts` | `TIMESTAMP` | Timestamp of the state snapshot | | `block_number` | `BIGINT` | The block number at which the snapshot was taken | | `block_hash` | `VARBINARY` | Hash of the block at which the snapshot was taken | | `chain_name` | `VARCHAR` | Name of the Substrate chain (e.g. `polkadot`, `kusama`, `hydradx`) | | `address_ss58` | `VARCHAR` | SS58-encoded address associated with this trace entry | | `address_pubkey` | `VARBINARY` | Public key associated with this trace entry | | `track` | `VARCHAR` | Category or governance track for grouping trace data | | `track_val` | `VARCHAR` | Value associated with the track | | `kv` | `VARCHAR` | JSON-encoded key-value data from the storage item | | `pv` | `VARCHAR` | Protocol version or parameter value | | `source` | `VARCHAR` | Source or origin of the trace data | | `updated_at` | `TIMESTAMP` | When this record was last updated in the database | | `ingested_at` | `TIMESTAMP` | When this record was first ingested into the database | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=traces) [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kusama\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=kusama\&table_name_t6f0df=traces) [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=assethub\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=assethub\&table_name_t6f0df=traces) [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=interlay\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=interlay\&table_name_t6f0df=traces) [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hydradx\&table_name_t6f0df=traces](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=hydradx\&table_name_t6f0df=traces) # polkadot.transfers Source: https://docs.dune.com/data-catalog/substrate/transfers Polkadot native token (DOT) transfers — sender, recipient, amount, and transfer type. ## Table description The `polkadot.transfers` table the Substrate transfers table stores the types of stored assets, the sender and recipient, and the estimated value of the tokens converted into USD, if available. ## Table Schema | Column | Type | Description | | - | - | - | | `year` | `INTEGER` | Calendar year of the block (partition column) | | `month` | `INTEGER` | Calendar month of the block (partition column) | | `day` | `INTEGER` | Calendar day of the block (partition column) | | `block_time` | `TIMESTAMP` | The timestamp of the block containing this transfer | | `block_number` | `BIGINT` | The sequential number of the block containing this transfer | | `event_id` | `VARCHAR` | Unique identifier of the event that recorded this transfer | | `extrinsic_id` | `VARCHAR` | Identifier of the extrinsic that initiated this transfer | | `section` | `VARCHAR` | The pallet (module) that processed this transfer (e.g. `Balances`) | | `method` | `VARCHAR` | The transfer method name (e.g. `Transfer`, `TransferKeepAlive`) | | `extrinsic_hash` | `VARBINARY` | Hash of the extrinsic that initiated this transfer | | `block_hash` | `VARBINARY` | Hash of the block containing this transfer | | `from_ss58` | `VARCHAR` | SS58-encoded address of the sender | | `from_pub_key` | `VARBINARY` | Public key of the sender | | `to_ss58` | `VARCHAR` | SS58-encoded address of the recipient | | `to_pub_key` | `VARBINARY` | Public key of the recipient | | `asset` | `VARCHAR` | Asset type or identifier being transferred | | `symbol` | `VARCHAR` | Token symbol of the transferred asset (e.g. `DOT`, `KSM`) | | `decimals` | `BIGINT` | Number of decimal places for the token | | `amount` | `DOUBLE` | Transfer amount in human-readable units | | `raw_amount` | `DECIMAL(38,9)` | Transfer amount in the smallest denomination (Planck) | | `updated_at` | `TIMESTAMP` | When this record was last updated in the database | | `ingested_at` | `TIMESTAMP` | When this record was first ingested into the database | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=polkadot\&table_name_t6f0df=transfers) # succinct.bids Source: https://docs.dune.com/data-catalog/succinct/bids Succinct prover bids — bid amounts, prover addresses, and auction outcomes. The `succinct.bids` table contains all proof generation bids submitted by provers in the Succinct Network. Each bid represents a prover's offer to generate a ZK proof for a specific request at a given price, participating in the auction-based proof contest mechanism. ## Table Schema | Column Name | Data Type | Description | | - | - | - | | id | long | Unique identifier for the bid | | tx_hash | binary | Transaction hash of the bid submission | | prover | binary | Address of the prover submitting the bid | | request_id | binary | Unique identifier for the proof request | | amount | bigint | Amount of PROVE tokens bid for the proof generation | | created_at | timestamp | Timestamp when the bid was submitted | | stake | decimal(38,0) | Amount of PROVE tokens staked by the prover | | date | date | Date when the bid was submitted | | \_updated_at | timestamp | Last update timestamp | | \_ingested_at | timestamp | Ingestion timestamp | ## Sample Query ```sql theme={null} -- Get the total number of bids and total amount bid per prover SELECT prover, COUNT(*) as bid_count, SUM(amount) as total_bid_amount FROM succinct.bids WHERE created_at >= NOW() - INTERVAL '7' DAY GROUP BY prover ORDER BY total_bid_amount DESC LIMIT 10; ``` # Succinct Source: https://docs.dune.com/data-catalog/succinct/overview Succinct protocol data on Dune Succinct is a protocol on Ethereum that proves the world's software. It coordinates hardware teams, infrastructure operators, and application developers to facilitate the generation of zero knowledge proofs. Application developers send programs in normal code that are wrapped with SP1 to the Succinct Network, allowing infrastructure and hardware teams (jointly called provers) to compete to generate proofs of the programs' execution. ## Key Features * **Decentralized Prover Network**: The world's first decentralized protocol for ZK proving, enabling permissionless participation * **High Performance Architecture**: Verifiable application (vApp) that settles to Ethereum with off-chain auctioneer service and on-chain settlement contracts * **Competitive Pricing**: Auction-based mechanism where provers compete to generate proofs at the lowest cost * **PROVE Token**: Native token enabling payments, incentivizing provers, and securing the network through staking and governance * **Universal Compatibility**: Supports ZK rollups, bridges, games, oracles, AI agents, and more ## Protocol Architecture The Succinct Network operates as a global, two-sided marketplace composed of provers and requesters. Provers compete to generate ZK proofs of programs submitted by requesters through an auction mechanism called proof contests. The network is architected as a verifiable application that settles to Ethereum, providing high performance while maintaining verifiability. ## Succinct Data on Dune > [card] [Bids](/data-catalog/succinct/bids) > > Contains all proof generation bids submitted by provers in the network > [card] [Requests](/data-catalog/succinct/requests) > > Contains all proof requests submitted by application developers > [card] [Succinct Documentation](https://docs.succinct.xyz/docs/protocol/what-is-succinct) > > The official documentation for Succinct, providing detailed information on the protocol, architecture, and developer resources # succinct.requests Source: https://docs.dune.com/data-catalog/succinct/requests Succinct proof generation requests — proof type, input parameters, and submission details. The `succinct.requests` table contains all proof requests submitted by application developers to the Succinct Network. Each request represents a demand for ZK proof generation, which provers can then bid on through the auction mechanism. ## Table Schema | Column Name | Data Type | Description | | - | - | - | | vk_hash | binary | Verification key hash for the proof request | | requester | binary | Address of the application developer submitting the request | | fulfiller_address | binary | Address of the prover that fulfilled the request | | gas_price | bigint | Gas price for the request transaction | | max_price_per_gas | bigint | Maximum price per gas unit the requester is willing to pay | | gas_used | bigint | Gas used for the request transaction | | gas_limit | bigint | Gas limit for the request transaction | | cycles | bigint | Number of computational cycles required for the proof | | created_at | timestamp | Timestamp when the request was submitted | | fulfilled_at | timestamp | Timestamp when the request was fulfilled | | deadline | timestamp | Deadline by which the proof must be generated | | date | date | Date when the request was submitted | | tx_hash | binary | Transaction hash of the request submission | | id | binary | Unique identifier for the proof request | | sender | binary | Address of the sender (may be different from requester) | | base_fee | decimal(38,0) | Base fee for the transaction | | min_auction_period | bigint | Minimum auction period in seconds | | \_updated_at | timestamp | Last update timestamp | | \_ingested_at | timestamp | Ingestion timestamp | ## Sample Query ```sql theme={null} -- Get the total number of requests and fulfillment rates by requester SELECT requester, COUNT(*) as total_requests, COUNT(CASE WHEN fulfiller_address IS NOT NULL THEN 1 END) as fulfilled_requests, COUNT(CASE WHEN fulfiller_address IS NOT NULL THEN 1 END) * 100.0 / COUNT(*) as fulfillment_rate FROM succinct.requests WHERE created_at >= NOW() - INTERVAL '30' DAY GROUP BY requester ORDER BY total_requests DESC LIMIT 10; ``` ## Sample Query ```sql theme={null} -- Get request activity and gas usage over time SELECT DATE_TRUNC('day', created_at) as day, COUNT(*) as total_requests, AVG(gas_used) as avg_gas_used, SUM(gas_used) as total_gas_used FROM succinct.requests WHERE created_at >= NOW() - INTERVAL '7' DAY GROUP BY DATE_TRUNC('day', created_at) ORDER BY day DESC; ``` # sui.checkpoints Source: https://docs.dune.com/data-catalog/sui/checkpoints Sui checkpoints — finalized checkpoint data with transaction digests and timestamps. ## Table Description The `sui.checkpoints` table contains checkpoint data from the Sui blockchain. Checkpoints are fundamental units of consensus in Sui, representing a collection of transactions that have been finalized and agreed upon by validators. This table is partitioned by date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **checkpoint_digest** | string | Unique hash identifier of the checkpoint | | **sequence_number** | decimal(20,0) | Sequential number of the checkpoint | | **epoch** | decimal(20,0) | Epoch number when the checkpoint was created | | **timestamp_ms** | decimal(20,0) | Unix timestamp in milliseconds when the checkpoint was created | | **date** | date | Date of when the checkpoint was created | | **previous_checkpoint_digest** | string | Hash of the previous checkpoint | | **end_of_epoch** | boolean | Whether this checkpoint marks the end of an epoch | | **total_gas_cost** | bigint | Total gas cost for all transactions in this checkpoint | | **computation_cost** | decimal(20,0) | Total computation cost for transactions in this checkpoint | | **storage_cost** | decimal(20,0) | Total storage cost for transactions in this checkpoint | | **storage_rebate** | decimal(20,0) | Total storage rebate for transactions in this checkpoint | | **non_refundable_storage_fee** | decimal(20,0) | Non-refundable storage fees | | **total_transaction_blocks** | decimal(20,0) | Total number of transaction blocks in this checkpoint | | **total_transactions** | decimal(20,0) | Total number of transactions in this checkpoint | | **total_successful_transaction_blocks** | decimal(20,0) | Total number of successful transaction blocks in this checkpoint | | **total_successful_transactions** | decimal(20,0) | Total number of successful transactions in this checkpoint | | **network_total_transaction** | decimal(20,0) | Total number of transactions processed by the network up to this checkpoint | | **validator_signature** | string | Validator signature for this checkpoint | | **\_updated_at** | timestamp | Last time the record was updated | | **\_ingested_at** | timestamp | Time when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=checkpoints](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=checkpoints) # sui.events Source: https://docs.dune.com/data-catalog/sui/events Sui on-chain events — events emitted by Move packages during execution. ## Table Description The `sui.events` table contains event data emitted by smart contracts and system operations on the Sui blockchain. Events provide a way for smart contracts to communicate state changes and important information to external systems. This table is partitioned by date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **transaction_digest** | string | Hash of the transaction that emitted this event | | **event_index** | decimal(20,0) | Index/sequence number of the event within the transaction | | **checkpoint** | decimal(20,0) | Checkpoint sequence number containing this event | | **epoch** | decimal(20,0) | Epoch number when the event was emitted | | **timestamp_ms** | decimal(20,0) | Unix timestamp in milliseconds when the event was emitted | | **date** | date | Date of when the event was emitted | | **sender** | binary | Binary representation of the sender address | | **package** | binary | Binary representation of the package ID that emitted the event | | **module** | string | Module name that emitted the event | | **event_type** | string | Type of the event (e.g., TransferObject, CoinBalanceChange) | | **bcs** | string | Binary Canonical Serialization of the event data | | **event_json** | string | JSON representation of the event data | | **bcs_length** | decimal(20,0) | Length of the BCS data in bytes | | **\_updated_at** | timestamp | Last time the record was updated | | **\_ingested_at** | timestamp | Time when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=events) # sui.move_call Source: https://docs.dune.com/data-catalog/sui/move_call Sui Move function calls — package, module, and function invocations. ## Table Description The `sui.move_call` table contains data about Move function calls executed on the Sui blockchain. This table tracks all smart contract function invocations, including the package, module, and function details. This table is partitioned by date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **transaction_digest** | string | Hash of the transaction containing this move call | | **checkpoint** | decimal(20,0) | Checkpoint sequence number containing this move call | | **epoch** | decimal(20,0) | Epoch number when the move call was executed | | **timestamp_ms** | decimal(20,0) | Unix timestamp in milliseconds when the move call was executed | | **date** | date | Date of when the move call was executed | | **package** | binary | Binary representation of the package ID containing the called function | | **module** | string | Name of the module containing the called function | | **function** | string | Name of the called function | | **\_updated_at** | timestamp | Last time the record was updated | | **\_ingested_at** | timestamp | Time when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=move_call](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=move_call) # sui.move_package Source: https://docs.dune.com/data-catalog/sui/move_package Sui Move package deployments — published packages and upgrade records. ## Table Description The `sui.move_package` table contains information about Move packages deployed on the Sui blockchain. Move packages are collections of Move modules that define smart contracts and their functionality. This table tracks package deployments, updates, and metadata. This table is partitioned by date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **package_id** | binary | Binary representation of the unique identifier of the Move package | | **checkpoint** | decimal(20,0) | Checkpoint sequence number containing this package operation | | **epoch** | decimal(20,0) | Epoch number when the package was deployed/updated | | **timestamp_ms** | decimal(20,0) | Unix timestamp in milliseconds when the package was deployed/updated | | **date** | date | Date of when the package was deployed/updated | | **bcs** | string | Binary Canonical Serialization of the package data | | **transaction_digest** | string | Hash of the transaction that deployed/updated this package | | **package_version** | decimal(20,0) | Version number of the package | | **original_package_id** | binary | Binary representation of the original package ID (for upgrades) | | **bcs_length** | decimal(20,0) | Length of the BCS data in bytes | | **\_updated_at** | timestamp | Last time the record was updated | | **\_ingested_at** | timestamp | Time when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=move_package](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=move_package) # sui.objects Source: https://docs.dune.com/data-catalog/sui/objects Sui object data — owned and shared objects with type, version, and ownership info. ## Table Description The `sui.objects` table contains data about Sui objects, which are the fundamental units of data storage on the Sui blockchain. Unlike traditional blockchains that use key-value stores, Sui uses an object-centric model where data is stored as objects with unique identifiers. This table is partitioned by date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **object_id** | binary | Binary representation of the unique identifier of the object | | **version** | decimal(20,0) | Version number of the object | | **digest** | string | Hash digest of the object contents | | **type\_** | string | Type of the object (e.g., "0x2::coin::Coin\<0x2::sui::SUI>") | | **checkpoint** | decimal(20,0) | Checkpoint sequence number containing this object operation | | **epoch** | decimal(20,0) | Epoch number when the object was created/updated | | **timestamp_ms** | decimal(20,0) | Unix timestamp in milliseconds when the object was created/updated | | **date** | date | Date of when the object was created/updated | | **owner_type** | string | Type of ownership (e.g., "AddressOwner", "ObjectOwner", "Shared", "Immutable") | | **owner_address** | binary | Binary representation of the owner address (if applicable) | | **object_status** | string | Status of the object (e.g., "Created", "Mutated", "Deleted") | | **initial_shared_version** | decimal(20,0) | Initial shared version for shared objects | | **previous_transaction** | string | Hash of the previous transaction that modified this object | | **has_public_transfer** | boolean | Whether the object can be publicly transferred | | **is_consensus** | boolean | Whether this is a consensus object | | **storage_rebate** | decimal(20,0) | Storage rebate for this object | | **bcs** | string | Binary Canonical Serialization of the object data | | **coin_type** | string | Type of coin if this object is a coin | | **coin_balance** | decimal(20,0) | Balance of the coin if this object is a coin | | **struct_tag** | string | Struct tag of the object | | **object_json** | string | JSON representation of the object data | | **bcs_length** | decimal(20,0) | Length of the BCS data in bytes | | **\_updated_at** | timestamp | Last time the record was updated | | **\_ingested_at** | timestamp | Time when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=objects](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=objects) # Sui Data Source: https://docs.dune.com/data-catalog/sui/overview Sui blockchain data on Dune ## What is Sui? Sui is a layer 1 blockchain protocol designed for high performance and scalability. The name derives from the Japanese word for water, reflecting the platform's fluid and adaptable nature. Sui features several key innovations: * **Object-Centric Architecture**: Unlike traditional blockchains that use key-value stores, Sui treats blocks as objects that define assets, enabling more sophisticated programmability. * **Delegated Proof-of-Stake (DPoS)**: Energy-efficient consensus mechanism where validators stake SUI tokens to secure the network. * **Move Programming Language**: A robust logic engine specifically designed for Sui's object-based approach to blockchain technology. * **Parallel Transaction Processing**: Enables high throughput by processing independent transactions simultaneously. ## Sui Networks Sui operates across multiple networks serving different purposes: * **Mainnet**: Production network processing real transactions and handling SUI trading and NFT activities * **Testnet**: Staging environment for quality assurance and developer testing * **Devnet**: Development network for testing new features and latest planned capabilities * **Localnet**: Local development environment for optimized workflows ## SUI Token Economics The native token for Sui is **SUI**, with **MIST** serving as the smallest unit (1 SUI = 1 billion MIST). All transaction costs, including gas fees and data storage, are paid using SUI tokens. The platform uses a delegated proof-of-stake model where validators must stake SUI to participate in consensus, aligning their interests with network security and efficiency. ## Sui Data on Dune Sui blockchain data is organized into several key tables that capture different aspects of on-chain activity: > [card] [Checkpoints](/data-catalog/sui/checkpoints) > > Checkpoint data representing finalized collections of transactions agreed upon by validators. > [card] [Events](/data-catalog/sui/events) > > Event data emitted by smart contracts and system operations on the Sui blockchain. > [card] [Move Call](/data-catalog/sui/move_call) > > Data about Move function calls executed on the Sui blockchain. > [card] [Move Package](/data-catalog/sui/move_package) > > Information about Move packages deployed on the Sui blockchain. > [card] [Objects](/data-catalog/sui/objects) > > Sui's unique object-centric data including object states, ownership, and metadata. > [card] [Transaction Objects](/data-catalog/sui/transaction_objects) > > Objects involved in transactions, tracking which objects are read, written, or deleted. > [card] [Transactions](/data-catalog/sui/transactions) > > Comprehensive transaction data including transfers, smart contract interactions, and system operations. > [card] [Wrapped Object](/data-catalog/sui/wrapped_object) > > Data about wrapped objects and their hierarchical ownership structure. # sui.transaction_objects Source: https://docs.dune.com/data-catalog/sui/transaction_objects Sui transaction-object relationships — objects created, mutated, or deleted per transaction. ## Table Description The `sui.transaction_objects` table contains data about objects that are involved in transactions on the Sui blockchain. This table tracks which objects are read, written, or deleted in each transaction, providing a comprehensive view of object interactions. This table is partitioned by date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **object_id** | binary | Binary representation of the unique identifier of the object | | **version** | decimal(20,0) | Version of the object in this transaction | | **transaction_digest** | string | Hash of the transaction | | **checkpoint** | decimal(20,0) | Checkpoint sequence number containing this transaction | | **epoch** | decimal(20,0) | Epoch number when the transaction was executed | | **timestamp_ms** | decimal(20,0) | Unix timestamp in milliseconds when the transaction was executed | | **date** | date | Date of when the transaction was executed | | **input_kind** | string | Kind of input for this object (e.g., "Input", "SharedInput", "Receiving") | | **object_status** | string | Status of the object (e.g., "Created", "Mutated", "Deleted", "Unchanged") | | **\_updated_at** | timestamp | Last time the record was updated | | **\_ingested_at** | timestamp | Time when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=transaction_objects](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=transaction_objects) # sui.transactions Source: https://docs.dune.com/data-catalog/sui/transactions Sui transaction records — sender, gas, status, and transaction kind. ## Table Description The `sui.transactions` table contains comprehensive transaction data from the Sui blockchain. This table records all transactions processed on the network, including transfers, smart contract interactions, and system operations. This table is partitioned by date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **transaction_digest** | string | Unique hash identifier of the transaction | | **checkpoint** | decimal(20,0) | Checkpoint sequence number containing this transaction | | **epoch** | decimal(20,0) | Epoch number when the transaction was executed | | **timestamp_ms** | decimal(20,0) | Unix timestamp in milliseconds when transaction was executed | | **date** | date | Date of when the transaction was executed | | **sender** | binary | Binary representation of the address that initiated the transaction | | **transaction_kind** | string | Type of transaction (e.g., "ProgrammableTransaction", "ChangeEpoch", "Genesis") | | **is_system_txn** | boolean | Whether this is a system transaction | | **is_sponsored_tx** | boolean | Whether this is a sponsored transaction | | **transaction_count** | decimal(20,0) | Number of transactions in the batch | | **execution_success** | boolean | Whether the transaction executed successfully | | **input** | decimal(20,0) | Number of input objects | | **shared_input** | decimal(20,0) | Number of shared input objects | | **gas_coins** | decimal(20,0) | Number of gas coins used | | **created** | decimal(20,0) | Number of objects created | | **mutated** | decimal(20,0) | Number of objects mutated | | **deleted** | decimal(20,0) | Number of objects deleted | | **transfers** | decimal(20,0) | Number of transfers performed | | **split_coins** | decimal(20,0) | Number of coin splits performed | | **merge_coins** | decimal(20,0) | Number of coin merges performed | | **publish** | decimal(20,0) | Number of packages published | | **upgrade** | decimal(20,0) | Number of package upgrades | | **others** | decimal(20,0) | Number of other operations | | **move_calls** | decimal(20,0) | Number of move calls made | | **packages** | string | Packages involved in the transaction | | **gas_owner** | binary | Binary representation of the gas owner address | | **gas_object_id** | binary | Binary representation of the gas object ID | | **gas_object_sequence** | decimal(20,0) | Sequence number of the gas object | | **gas_object_digest** | string | Digest of the gas object | | **gas_budget** | decimal(20,0) | Gas budget allocated for the transaction | | **total_gas_cost** | bigint | Total gas cost for the transaction | | **computation_cost** | decimal(20,0) | Computation cost component of gas | | **storage_cost** | decimal(20,0) | Storage cost component of gas | | **storage_rebate** | decimal(20,0) | Storage rebate received | | **non_refundable_storage_fee** | decimal(20,0) | Non-refundable storage fees | | **gas_price** | decimal(20,0) | Gas price for the transaction | | **raw_transaction** | string | Raw transaction data | | **has_zklogin_sig** | boolean | Whether the transaction has zkLogin signature | | **has_upgraded_multisig** | boolean | Whether the transaction has upgraded multisig | | **transaction_json** | string | JSON representation of the transaction | | **effects_json** | string | JSON representation of the transaction effects | | **transaction_position** | decimal(20,0) | Position of the transaction within the checkpoint | | **events_digest** | string | Digest of events emitted by the transaction | | **transaction_data_bcs_length** | decimal(20,0) | Length of transaction data BCS in bytes | | **effects_bcs_length** | decimal(20,0) | Length of effects BCS in bytes | | **events_bcs_length** | decimal(20,0) | Length of events BCS in bytes | | **signatures_bcs_length** | decimal(20,0) | Length of signatures BCS in bytes | | **\_updated_at** | timestamp | Last time the record was updated | | **\_ingested_at** | timestamp | Time when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=transactions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=transactions) # sui.wrapped_object Source: https://docs.dune.com/data-catalog/sui/wrapped_object Sui wrapped object records — objects contained within other objects. ## Table Description The `sui.wrapped_object` table contains data about wrapped objects on the Sui blockchain. Wrapped objects are objects that have been wrapped by another object, creating a hierarchical ownership structure. This table tracks the wrapping relationships and metadata. This table is partitioned by date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **object_id** | binary | Binary representation of the unique identifier of the wrapped object | | **root_object_id** | binary | Binary representation of the unique identifier of the root object that contains this wrapped object | | **root_object_version** | decimal(20,0) | Version of the root object | | **checkpoint** | decimal(20,0) | Checkpoint sequence number containing this wrapping operation | | **epoch** | decimal(20,0) | Epoch number when the object was wrapped | | **timestamp_ms** | decimal(20,0) | Unix timestamp in milliseconds when the object was wrapped | | **date** | date | Date of when the object was wrapped | | **json_path** | string | JSON path to the wrapped object within the root object | | **struct_tag** | string | Struct tag of the wrapped object | | **\_updated_at** | timestamp | Last time the record was updated | | **\_ingested_at** | timestamp | Time when the record was ingested | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=wrapped_object](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=sui\&table_name_t6f0df=wrapped_object) # thorchain.core_block Source: https://docs.dune.com/data-catalog/thorchain/core_block THORChain block data — block height, timestamp, and chain metadata. ## Table Description The `thorchain.core_block` table contains block-level data from the THORChain blockchain including block headers, timestamps, and block statistics. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_id** | bigint | Identifier | | **block_time** | timestamp | Timestamp of when the block was created | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_date** | timestamp | Date of when the block was created | | **block_hour** | timestamp | Block Hour | | **block_week** | timestamp | Block Week | | **block_month** | timestamp | Block Month | | **block_quarter** | timestamp | Block Quarter | | **block_year** | timestamp | Block Year | | **block_dayofmonth** | timestamp | Block Dayofmonth | | **block_dayofweek** | timestamp | Block Dayofweek | | **block_dayofyear** | timestamp | Block Dayofyear | | **timestamp** | timestamp | Timestamp of the record | | **hash** | varchar | Hash | | **agg_state** | varchar | Agg State | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_block](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_block) # thorchain.core_instantiate_events Source: https://docs.dune.com/data-catalog/thorchain/core_instantiate_events THORChain module instantiation events. ## Table Description The `thorchain.core_instantiate_events` table event data for contract instantiation events on THORChain. This table tracks when smart contracts are instantiated on the network. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **contract_address** | varchar | Address | | **admin_address** | varchar | Address | | **code_id** | bigint | Identifier | | **sender** | varchar | Sender | | **label** | varchar | Label | | **msg** | varchar | Msg | | **funds** | varchar | Funds | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_instantiate_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_instantiate_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_instantiate_events) # thorchain.core_network_version_events Source: https://docs.dune.com/data-catalog/thorchain/core_network_version_events THORChain network version upgrade events. ## Table Description The `thorchain.core_network_version_events` table event data for network version on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **version** | varchar | Version | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_network_version_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_network_version_events) # thorchain.core_set_mimir_events Source: https://docs.dune.com/data-catalog/thorchain/core_set_mimir_events THORChain Mimir governance parameter change events. ## Table Description The `thorchain.core_set_mimir_events` table event data for set mimir on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **key** | varchar | Key | | **value** | varchar | Value | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_set_mimir_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_set_mimir_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_set_mimir_events) # thorchain.core_thorname_change_events Source: https://docs.dune.com/data-catalog/thorchain/core_thorname_change_events THORChain THORName registration and update events. ## Table Description The `thorchain.core_thorname_change_events` table event data for thorname change on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **owner** | varchar | Owner | | **chain** | varchar | Chain | | **address** | varchar | Address | | **expire** | varchar | Expire | | **name** | varchar | Name | | **fund_amount_e8** | bigint | Amount value | | **registration_fee_e8** | bigint | Registration Fee E8 | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_thorname_change_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_thorname_change_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_thorname_change_events) # thorchain.core_transfer_events Source: https://docs.dune.com/data-catalog/thorchain/core_transfer_events THORChain native RUNE transfer events. ## Table Description The `thorchain.core_transfer_events` table event data for native asset transfers on THORChain. This table captures transfer events between addresses. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **asset** | varchar | Asset identifier | | **amount_e8** | bigint | Amount in e8 units (1e8 = 1 unit) | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_transfer_events_id** | bigint | Surrogate key for the transfer event record | | **day** | timestamp | Date of the record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_transfer_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_transfer_events) # thorchain.core_transfers Source: https://docs.dune.com/data-catalog/thorchain/core_transfers THORChain token transfer records — RUNE and synth movements. ## Table Description The `thorchain.core_transfers` table records all native asset transfers on THORChain. This table tracks RUNE and other asset transfers between addresses on the THORChain network. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_id** | bigint | Identifier | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **asset** | varchar | Asset identifier | | **rune_amount** | decimal(38,0) | Amount in RUNE | | **rune_amount_usd** | decimal(20,6) | USD value of RUNE amount | | **\_unique_key** | varchar | Unique Key | | **\_INSERTED_TIMESTAMP** | timestamp | Timestamp of the record | | **fact_transfers_id** | bigint | Surrogate key for the fact record | | **day** | timestamp | Date of the record | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_transfers](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_transfers) # thorchain.core_tss_keygen_failure_events Source: https://docs.dune.com/data-catalog/thorchain/core_tss_keygen_failure_events THORChain TSS key generation failure events. ## Table Description The `thorchain.core_tss_keygen_failure_events` table event data for tss keygen failure on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **fail_reason** | varchar | Fail Reason | | **is_unicast** | varchar | Is Unicast | | **blame_nodes** | varchar | Blame Nodes | | **round** | varchar | Round | | **height** | varchar | Height | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_tss_keygen_failure_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_tss_keygen_failure_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_tss_keygen_failure_events) # thorchain.core_tss_keygen_success_events Source: https://docs.dune.com/data-catalog/thorchain/core_tss_keygen_success_events THORChain TSS key generation success events. ## Table Description The `thorchain.core_tss_keygen_success_events` table event data for tss keygen success on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **pub_key** | varchar | Pub Key | | **members** | varchar | Members | | **height** | varchar | Height | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_tss_keygen_success_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_tss_keygen_success_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_tss_keygen_success_events) # thorchain.core_wasm_contracts_events Source: https://docs.dune.com/data-catalog/thorchain/core_wasm_contracts_events THORChain CosmWasm contract execution events. ## Table Description The `thorchain.core_wasm_contracts_events` table event data for wasm contracts on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **contract_address** | varchar | Address | | **contract_type** | varchar | Contract Type | | **sender** | varchar | Sender | | **attributes** | varchar | Attributes | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_wasm_contracts_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_wasm_contracts_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=core_wasm_contracts_events) # thorchain.defi_active_vault_events Source: https://docs.dune.com/data-catalog/thorchain/defi_active_vault_events THORChain active vault rotation events. ## Table Description The `thorchain.defi_active_vault_events` table event data for active vault on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **add_asgard_addr** | varchar | Add Asgard Addr | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_active_vault_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_active_vault_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_active_vault_events) # thorchain.defi_add_events Source: https://docs.dune.com/data-catalog/thorchain/defi_add_events THORChain liquidity add events — assets deposited to pools. ## Table Description The `thorchain.defi_add_events` table event data for liquidity addition actions on THORChain. This table captures events when users add liquidity to pools. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **fact_add_events_id** | bigint | Surrogate key for the add liquidity event record | | **day** | timestamp | Date of the record | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **dim_block_id** | bigint | Reference to the block dimension table | | **tx_id** | bigint | Transaction ID | | **rune_e8** | bigint | RUNE amount in e8 units | | **blockchain** | varchar | Source blockchain identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **pool_name** | varchar | Name of the liquidity pool | | **memo** | varchar | Transaction memo | | **to_address** | varchar | Destination address | | **from_address** | varchar | Source address | | **asset** | varchar | Asset identifier | | **\_TX_TYPE** | varchar | Tx Type | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_add_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_add_events) # thorchain.defi_affiliate_fee_events Source: https://docs.dune.com/data-catalog/thorchain/defi_affiliate_fee_events THORChain affiliate fee collection events. ## Table Description The `thorchain.defi_affiliate_fee_events` table event data for affiliate fee on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **fee_amt** | varchar | Fee Amt | | **gross_amt** | varchar | Gross Amt | | **fee_bps** | varchar | Fee Bps | | **memo** | varchar | Transaction memo | | **asset** | varchar | Asset identifier | | **rune_address** | varchar | Address | | **thorname** | varchar | Thorname | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_affiliate_fee_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_affiliate_fee_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_affiliate_fee_events) # thorchain.defi_asgard_fund_yggdrasil_events Source: https://docs.dune.com/data-catalog/thorchain/defi_asgard_fund_yggdrasil_events THORChain vault funding events — Asgard to Yggdrasil transfers. ## Table Description The `thorchain.defi_asgard_fund_yggdrasil_events` table event data for asgard fund yggdrasil on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx** | varchar | Tx | | **asset** | varchar | Asset identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **vault_key** | varchar | Vault Key | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **tx_id** | bigint | Transaction ID | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_asgard_fund_yggdrasil_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_asgard_fund_yggdrasil_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_asgard_fund_yggdrasil_events) # thorchain.defi_block_pool_depths Source: https://docs.dune.com/data-catalog/thorchain/defi_block_pool_depths THORChain pool depth snapshots per block — asset and RUNE balances. ## Table Description The `thorchain.defi_block_pool_depths` table block-level data for block pool depths on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **pool_name** | varchar | Name of the liquidity pool | | **asset_e8** | bigint | Asset amount in e8 units | | **rune_e8** | bigint | RUNE amount in e8 units | | **synth_e8** | bigint | Synth E8 | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_block_pool_depths](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_block_pool_depths) # thorchain.defi_block_rewards Source: https://docs.dune.com/data-catalog/thorchain/defi_block_rewards THORChain block reward distributions — emissions to pools and node operators. ## Table Description The `thorchain.defi_block_rewards` table block-level data for block rewards on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **day** | date | Date of the record | | **liquidity_fee** | varchar | Identifier | | **block_rewards** | varchar | Block Rewards | | **earnings** | varchar | Earnings | | **bonding_earnings** | varchar | Bonding Earnings | | **liquidity_earnings** | varchar | Identifier | | **avg_node_count** | varchar | Avg Node Count | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_block_rewards](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_block_rewards) # thorchain.defi_bond_actions Source: https://docs.dune.com/data-catalog/thorchain/defi_bond_actions THORChain node bond actions — bond and unbond operations. ## Table Description The `thorchain.defi_bond_actions` table records of bond actions on THORChain. This table tracks bonding and unbonding actions for validators and includes asset amounts and USD values. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **fact_bond_actions_id** | varchar | Surrogate key for the bond action record | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **dim_block_id** | varchar | Reference to the block dimension table | | **tx_id** | varchar | Transaction ID | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **asset** | varchar | Asset identifier | | **blockchain** | varchar | Source blockchain identifier | | **bond_type** | varchar | Type of bond action | | **asset_amount** | decimal(38,0) | Amount of asset | | **asset_usd** | decimal(20,6) | USD value of asset amount | | **memo** | varchar | Transaction memo | | **\_TX_TYPE** | varchar | Transaction type | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_bond_actions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_bond_actions) # thorchain.defi_bond_events Source: https://docs.dune.com/data-catalog/thorchain/defi_bond_events THORChain bond lifecycle events — deposits, withdrawals, and slashes. ## Table Description The `thorchain.defi_bond_events` table event data for bond actions on THORChain. This table tracks bonding and unbonding events for validators. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **blockchain** | varchar | Source blockchain identifier | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **asset** | varchar | Asset identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **memo** | varchar | Transaction memo | | **bond_type** | varchar | Bond Type | | **e8** | varchar | E8 | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **\_tx_type** | varchar | Tx Type | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_bond_events_id** | bigint | Surrogate key for the bond event record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_bond_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_bond_events) # thorchain.defi_daily_earnings Source: https://docs.dune.com/data-catalog/thorchain/defi_daily_earnings THORChain daily protocol earnings — fees, rewards, and revenue breakdown. ## Table Description The `thorchain.defi_daily_earnings` table daily earnings statistics for THORChain. This table tracks liquidity fees, block rewards, and total earnings distributed to nodes and pools. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **day** | date | Date of the record | | **liquidity_fees** | varchar | Identifier | | **liquidity_fees_usd** | decimal(20,6) | Identifier | | **block_rewards** | varchar | Block Rewards | | **block_rewards_usd** | decimal(20,6) | Block Rewards Usd | | **total_earnings** | varchar | Total Earnings | | **total_earnings_usd** | decimal(20,6) | Total Earnings Usd | | **earnings_to_nodes** | varchar | Earnings To Nodes | | **earnings_to_nodes_usd** | decimal(20,6) | Earnings To Nodes Usd | | **earnings_to_pools** | varchar | Earnings To Pools | | **earnings_to_pools_usd** | decimal(20,6) | Earnings To Pools Usd | | **avg_node_count** | varchar | Avg Node Count | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_daily_earnings_id** | bigint | Surrogate key for the fact record | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_daily_earnings](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_daily_earnings) # thorchain.defi_daily_pool_stats Source: https://docs.dune.com/data-catalog/thorchain/defi_daily_pool_stats THORChain daily pool statistics — volume, fees, APY, and depth by pool. ## Table Description The `thorchain.defi_daily_pool_stats` table daily statistics for Continuous Liquidity Pools (CLPs) on THORChain. CLPs are THORChain's advanced AMM mechanism that allows for native asset swaps without wrapped tokens. This table tracks daily pool statistics including liquidity, swaps, fees, and rewards. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **DAY** | date | Date of the record | | **pool_name** | varchar | Name of the liquidity pool | | **system_rewards** | varchar | System Rewards | | **system_rewards_usd** | decimal(20,6) | System Rewards Usd | | **asset_liquidity** | varchar | Identifier | | **asset_price** | varchar | Asset Price | | **asset_price_usd** | decimal(20,6) | Asset Price Usd | | **rune_liquidity** | varchar | Identifier | | **rune_price** | varchar | Rune Price | | **rune_price_usd** | decimal(20,6) | Rune Price Usd | | **add_liquidity_count** | varchar | Identifier | | **add_asset_liquidity** | varchar | Identifier | | **add_asset_liquidity_usd** | decimal(20,6) | Identifier | | **add_rune_liquidity** | varchar | Identifier | | **add_rune_liquidity_usd** | decimal(20,6) | Identifier | | **withdraw_count** | varchar | Withdraw Count | | **withdraw_asset_liquidity** | varchar | Identifier | | **withdraw_asset_liquidity_usd** | decimal(20,6) | Identifier | | **withdraw_rune_liquidity** | varchar | Identifier | | **withdraw_rune_liquidity_usd** | decimal(20,6) | Identifier | | **il_protection_paid** | varchar | Identifier | | **il_protection_paid_usd** | decimal(20,6) | Identifier | | **average_slip** | varchar | Average Slip | | **to_asset_average_slip** | varchar | To Asset Average Slip | | **to_rune_average_slip** | varchar | To Rune Average Slip | | **swap_count** | varchar | Swap Count | | **to_asset_swap_count** | varchar | To Asset Swap Count | | **to_rune_swap_count** | varchar | To Rune Swap Count | | **swap_volume_rune** | varchar | Swap Volume Rune | | **swap_volume_rune_usd** | decimal(20,6) | Swap Volume Rune Usd | | **to_asset_swap_volume** | varchar | To Asset Swap Volume | | **to_rune_swap_volume** | varchar | To Rune Swap Volume | | **total_swap_fees_rune** | varchar | Total Swap Fees Rune | | **total_swap_fees_usd** | decimal(20,6) | Total Swap Fees Usd | | **total_asset_swap_fees** | varchar | Total Asset Swap Fees | | **total_asset_rune_fees** | varchar | Total Asset Rune Fees | | **unique_member_count** | varchar | Unique Member Count | | **unique_swapper_count** | varchar | Unique Swapper Count | | **liquidity_units** | varchar | Identifier | | **\_unique_key** | varchar | Unique Key | | **fact_daily_pool_stats_id** | bigint | Surrogate key for the daily pool stats record | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_daily_pool_stats](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_daily_pool_stats) # thorchain.defi_daily_tvl Source: https://docs.dune.com/data-catalog/thorchain/defi_daily_tvl THORChain daily total value locked — aggregate TVL across all pools. ## Table Description The `thorchain.defi_daily_tvl` table daily total value locked (TVL) statistics for THORChain. This table tracks the total value locked across all pools on a daily basis. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **day** | date | Date of the record | | **total_value_pooled** | varchar | Total Value Pooled | | **total_value_pooled_usd** | decimal(20,6) | Total Value Pooled Usd | | **total_value_bonded** | varchar | Total Value Bonded | | **total_value_bonded_usd** | decimal(20,6) | Total Value Bonded Usd | | **total_value_locked** | varchar | Total Value Locked | | **total_value_locked_usd** | decimal(20,6) | Total Value Locked Usd | | **fact_daily_tvl_id** | bigint | Surrogate key for the fact record | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_daily_tvl](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_daily_tvl) # thorchain.defi_errata_events Source: https://docs.dune.com/data-catalog/thorchain/defi_errata_events THORChain errata correction events — manual adjustments to chain state. ## Table Description The `thorchain.defi_errata_events` table event data for errata on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **in_tx** | varchar | In Tx | | **asset** | varchar | Asset identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **rune_e8** | bigint | RUNE amount in e8 units | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_errata_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_errata_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_errata_events) # thorchain.defi_failed_deposit_messages Source: https://docs.dune.com/data-catalog/thorchain/defi_failed_deposit_messages THORChain failed deposit attempts — rejected inbound transactions. ## Table Description The `thorchain.defi_failed_deposit_messages` table contains data for failed deposit messages on THORChain. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **amount_e8** | bigint | Amount in e8 units (1e8 = 1 unit) | | **asset** | varchar | Asset identifier | | **from_addr** | varchar | From Addr | | **memo** | varchar | Transaction memo | | **code** | varchar | Code | | **reason** | varchar | Reason | | **tx_id** | bigint | Transaction ID | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **from_address** | varchar | Source address | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_failed_deposit_messages_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_failed_deposit_messages](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_failed_deposit_messages) # thorchain.defi_fee_events Source: https://docs.dune.com/data-catalog/thorchain/defi_fee_events THORChain fee collection events — swap fees, network fees, and outbound fees. ## Table Description The `thorchain.defi_fee_events` table event data for fee events on THORChain. This table captures fee-related events including pool deductions and asset fees. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_time** | timestamp | Timestamp of when the block was created | | **block_date** | date | Date of when the block was created | | **block_month** | timestamp | Month of when the block was created | | **block_height** | bigint | Block height | | **tx_id** | varchar | Transaction ID | | **event_id** | varchar | Event identifier | | **asset** | varchar | Asset identifier | | **pool_deduct** | varchar | Pool deduction information | | **asset_e8** | bigint | Asset amount in e8 units | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_fee_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_fee_events) # thorchain.defi_gas_events Source: https://docs.dune.com/data-catalog/thorchain/defi_gas_events THORChain gas reimbursement events — gas costs for outbound transactions. ## Table Description The `thorchain.defi_gas_events` table event data for gas on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **asset** | varchar | Asset identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **rune_e8** | bigint | RUNE amount in e8 units | | **tx_count** | varchar | Tx Count | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | varchar | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_gas_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_gas_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_gas_events) # thorchain.defi_inactive_vault_events Source: https://docs.dune.com/data-catalog/thorchain/defi_inactive_vault_events THORChain vault deactivation events. ## Table Description The `thorchain.defi_inactive_vault_events` table event data for inactive vault on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **add_asgard_addr** | varchar | Add Asgard Addr | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **add_asgard_address** | varchar | Address | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_inactive_vault_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_inactive_vault_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_inactive_vault_events) # thorchain.defi_liquidity_actions Source: https://docs.dune.com/data-catalog/thorchain/defi_liquidity_actions THORChain liquidity actions — adds, withdrawals, and position changes. ## Table Description The `thorchain.defi_liquidity_actions` table records of liquidity provision and withdrawal actions on THORChain. This table tracks when users add or remove liquidity from Continuous Liquidity Pools (CLPs). This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_id** | bigint | Identifier | | **tx_id** | bigint | Transaction ID | | **lp_action** | varchar | Type of liquidity action (add or withdraw) | | **pool_name** | varchar | Name of the liquidity pool | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **rune_amount** | decimal(38,0) | Amount in RUNE | | **rune_amount_usd** | decimal(20,6) | USD value of RUNE amount | | **asset_amount** | decimal(38,0) | Amount of asset | | **asset_amount_usd** | decimal(20,6) | USD value of asset amount | | **stake_units** | varchar | Pool units (LP tokens) received or burned | | **asset_tx_id** | bigint | Identifier | | **asset_address** | varchar | Address | | **asset_blockchain** | varchar | Asset Blockchain | | **il_protection** | varchar | Il Protection | | **il_protection_usd** | decimal(20,6) | Il Protection Usd | | **unstake_asymmetry** | varchar | Unstake Asymmetry | | **unstake_basis_points** | int | Unstake Basis Points | | **\_unique_key** | varchar | Unique Key | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_liquidity_actions_id** | bigint | Surrogate key for the liquidity action record | | **day** | timestamp | Date of the record | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_liquidity_actions](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_liquidity_actions) # thorchain.defi_loan_open_events Source: https://docs.dune.com/data-catalog/thorchain/defi_loan_open_events THORChain lending — loan origination events with collateral and debt details. ## Table Description The `thorchain.defi_loan_open_events` table event data for loan open on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **owner** | varchar | Owner | | **collateralization_ratio** | varchar | Collateralization Ratio | | **collateral_asset** | varchar | Collateral Asset | | **target_asset** | varchar | Target Asset | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **collateral_deposited** | varchar | Collateral Deposited | | **debt_issued** | varchar | Debt Issued | | **tx_id** | bigint | Transaction ID | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | varchar | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_loan_open_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_loan_open_events) # thorchain.defi_loan_repayment_events Source: https://docs.dune.com/data-catalog/thorchain/defi_loan_repayment_events THORChain lending — loan repayment events. ## Table Description The `thorchain.defi_loan_repayment_events` table event data for loan repayment on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **owner** | varchar | Owner | | **collateral_asset** | varchar | Collateral Asset | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **collateral_withdrawn** | varchar | Collateral Withdrawn | | **debt_repaid** | varchar | Identifier | | **tx_id** | bigint | Transaction ID | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | varchar | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_loan_repayment_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_loan_repayment_events) # thorchain.defi_mint_burn_events Source: https://docs.dune.com/data-catalog/thorchain/defi_mint_burn_events THORChain synthetic asset mint and burn events. ## Table Description The `thorchain.defi_mint_burn_events` table event data for mint burn on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **asset** | varchar | Asset identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **supply** | varchar | Supply | | **reason** | varchar | Reason | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_mint_burn_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_mint_burn_events) # thorchain.defi_outbound_events Source: https://docs.dune.com/data-catalog/thorchain/defi_outbound_events THORChain outbound transaction events — assets sent to external chains. ## Table Description The `thorchain.defi_outbound_events` table event data for outbound on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **blockchain** | varchar | Source blockchain identifier | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **asset** | varchar | Asset identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **asset_amount** | decimal(38,0) | Amount of asset | | **memo** | varchar | Transaction memo | | **in_tx** | varchar | In Tx | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | varchar | Block Month | | **\_tx_type** | varchar | Tx Type | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_outbound_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_outbound_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_outbound_events) # thorchain.defi_pending_liquidity_events Source: https://docs.dune.com/data-catalog/thorchain/defi_pending_liquidity_events THORChain pending liquidity events — asymmetric deposits awaiting pairing. ## Table Description The `thorchain.defi_pending_liquidity_events` table event data for pending liquidity on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **pool_name** | varchar | Name of the liquidity pool | | **asset_tx_id** | bigint | Identifier | | **asset_blockchain** | varchar | Asset Blockchain | | **asset_address** | varchar | Address | | **asset_e8** | bigint | Asset amount in e8 units | | **asset_amount** | decimal(38,0) | Amount of asset | | **rune_tx_id** | bigint | Identifier | | **rune_address** | varchar | Address | | **rune_e8** | bigint | RUNE amount in e8 units | | **rune_amount** | decimal(38,0) | Amount in RUNE | | **pending_type** | varchar | Pending Type | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | varchar | Block Month | | **pool_chain** | varchar | Pool Chain | | **pool_asset** | varchar | Pool Asset | | **fact_pending_liquidity_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pending_liquidity_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pending_liquidity_events) # thorchain.defi_pool_balance_change_events Source: https://docs.dune.com/data-catalog/thorchain/defi_pool_balance_change_events THORChain pool balance change events — triggered by swaps, adds, and withdrawals. ## Table Description The `thorchain.defi_pool_balance_change_events` table event data for pool balance change on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **asset** | varchar | Asset identifier | | **rune_amt** | varchar | Rune Amt | | **rune_add** | varchar | Rune Add | | **asset_amt** | varchar | Asset Amt | | **asset_add** | varchar | Asset Add | | **reason** | varchar | Reason | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **rune_amount** | decimal(38,0) | Amount in RUNE | | **asset_amount** | decimal(38,0) | Amount of asset | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_pool_balance_change_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pool_balance_change_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pool_balance_change_events) # thorchain.defi_pool_block_balances Source: https://docs.dune.com/data-catalog/thorchain/defi_pool_block_balances THORChain pool balances per block — RUNE and asset depths. ## Table Description The `thorchain.defi_pool_block_balances` table block-level balances for Continuous Liquidity Pools (CLPs) on THORChain. This table tracks RUNE, asset, and synthetic asset balances in pools at each block. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **fact_pool_block_balances_id** | varchar | Surrogate key for the pool block balance record | | **day** | date | Date of the record | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **dim_block_id** | varchar | Reference to the block dimension table | | **pool_name** | varchar | Name of the liquidity pool | | **rune_amount** | decimal(38,0) | RUNE balance in the pool | | **rune_amount_usd** | decimal(20,6) | USD value of RUNE balance | | **asset_amount** | decimal(38,0) | Asset balance in the pool | | **asset_amount_usd** | decimal(20,6) | USD value of asset balance | | **synth_amount** | decimal(38,0) | Synthetic asset amount in the pool | | **synth_amount_usd** | decimal(20,6) | USD value of synthetic asset amount | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pool_block_balances](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pool_block_balances) # thorchain.defi_pool_block_fees Source: https://docs.dune.com/data-catalog/thorchain/defi_pool_block_fees THORChain pool fees per block — swap and liquidity fees collected. ## Table Description The `thorchain.defi_pool_block_fees` table block-level data for pool fees on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **DAY** | date | Date of the record | | **pool_name** | varchar | Name of the liquidity pool | | **rewards** | varchar | Rewards | | **total_liquidity_fees_rune** | varchar | Identifier | | **asset_liquidity_fees** | varchar | Identifier | | **rune_liquidity_fees** | varchar | Identifier | | **earnings** | varchar | Earnings | | **\_unique_key** | varchar | Unique Key | | **\_INSERTED_TIMESTAMP** | timestamp | Timestamp of the record | | **fact_pool_block_fees_id** | bigint | Surrogate key for the fact record | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pool_block_fees](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pool_block_fees) # thorchain.defi_pool_block_statistics Source: https://docs.dune.com/data-catalog/thorchain/defi_pool_block_statistics THORChain pool statistics per block — volume, swap count, and slip. ## Table Description The `thorchain.defi_pool_block_statistics` table block-level data for pool statistics on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **day** | date | Date of the record | | **add_asset_liquidity_volume** | varchar | Identifier | | **add_liquidity_count** | varchar | Identifier | | **add_liquidity_volume** | varchar | Identifier | | **add_rune_liquidity_volume** | varchar | Identifier | | **asset** | varchar | Asset identifier | | **asset_depth** | varchar | Asset Depth | | **asset_price** | varchar | Asset Price | | **asset_price_usd** | decimal(20,6) | Asset Price Usd | | **average_slip** | varchar | Average Slip | | **impermanent_loss_protection_paid** | varchar | Identifier | | **rune_depth** | varchar | Rune Depth | | **status** | varchar | Status | | **swap_count** | varchar | Swap Count | | **swap_volume** | varchar | Swap Volume | | **to_asset_average_slip** | varchar | To Asset Average Slip | | **to_asset_count** | varchar | To Asset Count | | **to_asset_fees** | varchar | To Asset Fees | | **to_asset_volume** | varchar | To Asset Volume | | **to_rune_average_slip** | varchar | To Rune Average Slip | | **to_rune_count** | varchar | To Rune Count | | **to_rune_fees** | varchar | To Rune Fees | | **to_rune_volume** | varchar | To Rune Volume | | **totalfees** | varchar | Totalfees | | **unique_member_count** | varchar | Unique Member Count | | **unique_swapper_count** | varchar | Unique Swapper Count | | **units** | varchar | Units | | **withdraw_asset_volume** | varchar | Withdraw Asset Volume | | **withdraw_count** | varchar | Withdraw Count | | **withdraw_rune_volume** | varchar | Withdraw Rune Volume | | **withdraw_volume** | varchar | Withdraw Volume | | **total_stake** | varchar | Total Stake | | **depth_product** | varchar | Depth Product | | **synth_units** | varchar | Synth Units | | **pool_units** | varchar | Pool Units | | **liquidity_unit_value_index** | varchar | Identifier | | **prev_liquidity_unit_value_index** | varchar | Identifier | | **\_unique_key** | varchar | Unique Key | | **fact_pool_block_statistics_id** | bigint | Surrogate key for the fact record | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pool_block_statistics](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pool_block_statistics) # thorchain.defi_pool_events Source: https://docs.dune.com/data-catalog/thorchain/defi_pool_events THORChain pool lifecycle events — creation, suspension, and status changes. ## Table Description The `thorchain.defi_pool_events` table event data for pool-related events on THORChain. This table captures various pool events including balance changes and pool operations. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **asset** | varchar | Asset identifier | | **status** | varchar | Status | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **fact_pool_events_id** | bigint | Surrogate key for the fact record | | **day** | timestamp | Date of the record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pool_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_pool_events) # thorchain.defi_refund_events Source: https://docs.dune.com/data-catalog/thorchain/defi_refund_events THORChain refund events — returned transactions that couldn't be processed. ## Table Description The `thorchain.defi_refund_events` table event data for refund on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **blockchain** | varchar | Source blockchain identifier | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **asset** | varchar | Asset identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **asset_2nd** | varchar | Asset 2Nd | | **asset_2nd_e8** | bigint | Asset 2Nd E8 | | **memo** | varchar | Transaction memo | | **code** | varchar | Code | | **reason** | varchar | Reason | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | varchar | Block Month | | **\_tx_type** | varchar | Tx Type | | **\_inserted_timestamp** | timestamp | Timestamp of the record | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_refund_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_refund_events) # thorchain.defi_reserve_events Source: https://docs.dune.com/data-catalog/thorchain/defi_reserve_events THORChain reserve fund events — emissions from the protocol reserve. ## Table Description The `thorchain.defi_reserve_events` table event data for reserve on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **blockchain** | varchar | Source blockchain identifier | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **asset** | varchar | Asset identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **memo** | varchar | Transaction memo | | **address** | varchar | Address | | **e8** | varchar | E8 | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **\_tx_type** | varchar | Tx Type | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_reserve_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_reserve_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_reserve_events) # thorchain.defi_rewards_event_entries Source: https://docs.dune.com/data-catalog/thorchain/defi_rewards_event_entries THORChain reward distribution entries — per-pool reward allocations. ## Table Description The `thorchain.defi_rewards_event_entries` table contains individual reward distribution entries on THORChain. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **pool_name** | varchar | Name of the liquidity pool | | **rune_e8** | bigint | RUNE amount in e8 units | | **saver_e8** | bigint | Saver E8 | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_rewards_event_entries_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_rewards_event_entries](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_rewards_event_entries) # thorchain.defi_rewards_events Source: https://docs.dune.com/data-catalog/thorchain/defi_rewards_events THORChain reward distribution events — block-level reward summaries. ## Table Description The `thorchain.defi_rewards_events` table event data for rewards on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **bond_e8** | bigint | Bond E8 | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **fact_rewards_events_id** | bigint | Surrogate key for the fact record | | **day** | timestamp | Date of the record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_rewards_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_rewards_events) # thorchain.defi_rune_pool_deposit_events Source: https://docs.dune.com/data-catalog/thorchain/defi_rune_pool_deposit_events THORChain RUNEPool deposit events. ## Table Description The `thorchain.defi_rune_pool_deposit_events` table event data for rune pool deposit on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **rune_addr** | varchar | Rune Addr | | **amount_e8** | bigint | Amount in e8 units (1e8 = 1 unit) | | **units** | varchar | Units | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **rune_address** | varchar | Address | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_rune_pool_deposit_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_rune_pool_deposit_events) # thorchain.defi_rune_pool_withdraw_events Source: https://docs.dune.com/data-catalog/thorchain/defi_rune_pool_withdraw_events THORChain RUNEPool withdrawal events. ## Table Description The `thorchain.defi_rune_pool_withdraw_events` table event data for rune pool withdraw on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **rune_addr** | varchar | Rune Addr | | **amount_e8** | bigint | Amount in e8 units (1e8 = 1 unit) | | **units** | varchar | Units | | **basis_points** | int | Basis Points | | **affiliate_basis_pts** | varchar | Affiliate Basis Pts | | **affiliate_amount_e8** | bigint | Amount value | | **affiliate_addr** | varchar | Affiliate Addr | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **rune_address** | varchar | Address | | **affiliate_basis_points** | int | Affiliate Basis Points | | **affiliate_address** | varchar | Address | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_rune_pool_withdraw_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_rune_pool_withdraw_events) # thorchain.defi_scheduled_outbound_events Source: https://docs.dune.com/data-catalog/thorchain/defi_scheduled_outbound_events THORChain scheduled outbound queue — pending external chain transactions. ## Table Description The `thorchain.defi_scheduled_outbound_events` table event data for scheduled outbound on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **blockchain** | varchar | Source blockchain identifier | | **to_address** | varchar | Destination address | | **asset** | varchar | Asset identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **asset_decimals** | decimal(38,0) | Asset Decimals | | **gas_rate** | varchar | Gas Rate | | **memo** | varchar | Transaction memo | | **in_hash** | varchar | In Hash | | **out_hash** | varchar | Out Hash | | **max_gas_amount** | decimal(38,0) | Amount value | | **max_gas_decimals** | decimal(38,0) | Max Gas Decimals | | **max_gas_asset** | varchar | Max Gas Asset | | **module_name** | varchar | Module Name | | **vault_pub_key** | varchar | Vault Pub Key | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | varchar | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_scheduled_outbound_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_scheduled_outbound_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_scheduled_outbound_events) # thorchain.defi_secure_asset_deposit_events Source: https://docs.dune.com/data-catalog/thorchain/defi_secure_asset_deposit_events THORChain secure asset deposit events. ## Table Description The `thorchain.defi_secure_asset_deposit_events` table event data for secure asset deposit on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **amount_e8** | bigint | Amount in e8 units (1e8 = 1 unit) | | **asset** | varchar | Asset identifier | | **asset_address** | varchar | Address | | **rune_address** | varchar | Address | | **tx_id** | bigint | Transaction ID | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_secure_asset_deposit_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_secure_asset_deposit_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_secure_asset_deposit_events) # thorchain.defi_secure_asset_withdraw_events Source: https://docs.dune.com/data-catalog/thorchain/defi_secure_asset_withdraw_events THORChain secure asset withdrawal events. ## Table Description The `thorchain.defi_secure_asset_withdraw_events` table event data for secure asset withdraw on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **amount_e8** | bigint | Amount in e8 units (1e8 = 1 unit) | | **asset** | varchar | Asset identifier | | **asset_address** | varchar | Address | | **rune_address** | varchar | Address | | **tx_id** | bigint | Transaction ID | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_secure_asset_withdraw_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_secure_asset_withdraw_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_secure_asset_withdraw_events) # thorchain.defi_send_messages Source: https://docs.dune.com/data-catalog/thorchain/defi_send_messages THORChain send messages — internal transfer directives. ## Table Description The `thorchain.defi_send_messages` table contains outgoing send messages on THORChain. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **amount_e8** | bigint | Amount in e8 units (1e8 = 1 unit) | | **asset** | varchar | Asset identifier | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **memo** | varchar | Transaction memo | | **tx_id** | bigint | Transaction ID | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_send_messages_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_send_messages](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_send_messages) # thorchain.defi_stake_events Source: https://docs.dune.com/data-catalog/thorchain/defi_stake_events THORChain staking events (legacy) — bond operations. ## Table Description The `thorchain.defi_stake_events` table event data for stake on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **pool_name** | varchar | Name of the liquidity pool | | **asset_tx_id** | bigint | Identifier | | **asset_blockchain** | varchar | Asset Blockchain | | **asset_address** | varchar | Address | | **asset_e8** | bigint | Asset amount in e8 units | | **stake_units** | varchar | Pool units (LP tokens) received or burned | | **rune_tx_id** | bigint | Identifier | | **rune_address** | varchar | Address | | **rune_e8** | bigint | RUNE amount in e8 units | | **\_ASSET_IN_RUNE_E8** | bigint | Asset In Rune E8 | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **\_INSERTED_TIMESTAMP** | timestamp | Timestamp of the record | | **fact_stake_events_id** | bigint | Surrogate key for the fact record | | **day** | timestamp | Date of the record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_stake_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_stake_events) # thorchain.defi_streaming_swap_details_events Source: https://docs.dune.com/data-catalog/thorchain/defi_streaming_swap_details_events THORChain streaming swap progress — partial fill details for large swaps. ## Table Description The `thorchain.defi_streaming_swap_details_events` table event data for streaming swap details on THORChain. This table captures detailed information about streaming swaps including intervals, quantities, and success metrics. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_time** | timestamp | Timestamp of when the block was created | | **block_date** | date | Date of when the block was created | | **block_month** | timestamp | Month of when the block was created | | **block_height** | bigint | Block height | | **tx_id** | varchar | Transaction ID | | **event_id** | varchar | Event identifier | | **interval** | varchar | Streaming swap interval | | **quantity** | bigint | Quantity in the streaming swap | | **count** | bigint | Count of swaps in the streaming | | **last_height** | bigint | Last block height | | **deposit_asset** | varchar | Deposit asset identifier | | **deposit_e8** | bigint | Deposit amount in e8 units | | **in_asset** | varchar | Input asset identifier | | **in_e8** | bigint | Input amount in e8 units | | **out_asset** | varchar | Output asset identifier | | **out_e8** | bigint | Output amount in e8 units | | **failed_swaps** | array(varchar) | Array of failed swap information | | **failed_swap_reasons** | array(varchar) | Array of reasons for failed swaps | | **is_successful** | boolean | Whether the streaming swap was successful | | **failed_swap_count** | bigint | Number of failed swaps | | **trade_direction** | varchar | Trade direction (sell_rune, buy_rune, asset_to_asset) | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_streaming_swap_details_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_streaming_swap_details_events) # thorchain.defi_swap_events Source: https://docs.dune.com/data-catalog/thorchain/defi_swap_events THORChain swap events — cross-chain and intra-chain asset swaps with pricing. ## Table Description The `thorchain.defi_swap_events` table provides event-level data for swaps executed on THORChain. This table captures detailed swap events including amounts, fees, slippage, and streaming swap information. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **blockchain** | varchar | Source blockchain identifier | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **from_asset** | varchar | Source asset identifier | | **from_e8** | bigint | From E8 | | **to_asset** | varchar | Destination asset identifier | | **to_e8** | bigint | To E8 | | **memo** | varchar | Transaction memo | | **pool_name** | varchar | Name of the liquidity pool | | **to_e8_min** | bigint | To E8 Min | | **swap_slip_bp** | varchar | Swap slippage in basis points | | **liq_fee_e8** | bigint | Liq Fee E8 | | **liq_fee_in_rune_e8** | bigint | Liq Fee In Rune E8 | | **\_DIRECTION** | varchar | Direction | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **streaming_count** | varchar | Streaming Count | | **streaming_quantity** | varchar | Streaming Quantity | | **\_TX_TYPE** | varchar | Tx Type | | **\_INSERTED_TIMESTAMP** | timestamp | Timestamp of the record | | **fact_swap_events_id** | bigint | Surrogate key for the swap event record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_swap_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_swap_events) # thorchain.defi_swaps Source: https://docs.dune.com/data-catalog/thorchain/defi_swaps THORChain swap records — comprehensive swap data with fees, slip, and routing. ## Table Description The `thorchain.defi_swaps` table records all cross-chain native asset swaps executed on THORChain. This table captures swap transactions that allow users to swap native assets across multiple chains without wrapped or pegged tokens. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_id** | bigint | Identifier | | **tx_id** | bigint | Transaction ID | | **blockchain** | varchar | Source blockchain identifier | | **pool_name** | varchar | Name of the liquidity pool | | **from_address** | varchar | Source address | | **native_to_address** | varchar | Address | | **to_pool_address** | varchar | Address | | **affiliate_address** | varchar | Address | | **affiliate_fee_basis_points** | int | Affiliate Fee Basis Points | | **affiliate_addresses_array** | array(varchar) | Address | | **affiliate_fee_basis_points_array** | int | Affiliate Fee Basis Points Array | | **from_asset** | varchar | Source asset identifier | | **to_asset** | varchar | Destination asset identifier | | **from_amount** | decimal(38,0) | Amount of source asset | | **to_amount** | decimal(38,0) | Amount of destination asset | | **min_to_amount** | decimal(38,0) | Amount value | | **from_amount_usd** | decimal(20,6) | USD value | | **to_amount_usd** | decimal(20,6) | USD value | | **rune_usd** | decimal(20,6) | Rune Usd | | **asset_usd** | decimal(20,6) | Asset Usd | | **to_amount_min_usd** | decimal(20,6) | USD value | | **swap_slip_bp** | varchar | Swap slippage in basis points | | **liq_fee_rune** | varchar | Liquidity fee in RUNE | | **liq_fee_rune_usd** | decimal(20,6) | USD value of liquidity fee in RUNE | | **liq_fee_asset** | varchar | Liq Fee Asset | | **liq_fee_asset_usd** | decimal(20,6) | Liq Fee Asset Usd | | **streaming_count** | varchar | Streaming Count | | **streaming_quantity** | varchar | Streaming Quantity | | **\_TX_TYPE** | varchar | Tx Type | | **\_unique_key** | varchar | Unique Key | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_swaps_id** | bigint | Surrogate key for the swap record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_swaps](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_swaps) # thorchain.defi_switch_events Source: https://docs.dune.com/data-catalog/thorchain/defi_switch_events THORChain BEP2/ERC20 to native RUNE switch events. ## Table Description The `thorchain.defi_switch_events` table event data for switch on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **burn_asset** | varchar | Burn Asset | | **burn_e8** | bigint | Burn E8 | | **mint_e8** | bigint | Mint E8 | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_switch_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_switch_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_switch_events) # thorchain.defi_tcy_claim_events Source: https://docs.dune.com/data-catalog/thorchain/defi_tcy_claim_events THORChain TCY claim events. ## Table Description The `thorchain.defi_tcy_claim_events` table event data for tcy claim on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **rune_address** | varchar | Address | | **l1_address** | varchar | Address | | **asset** | varchar | Asset identifier | | **tcy_amt** | varchar | Tcy Amt | | **memo** | varchar | Transaction memo | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_tcy_claim_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_tcy_claim_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_tcy_claim_events) # thorchain.defi_tcy_distribution_events Source: https://docs.dune.com/data-catalog/thorchain/defi_tcy_distribution_events THORChain TCY distribution events. ## Table Description The `thorchain.defi_tcy_distribution_events` table event data for tcy distribution on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **rune_address** | varchar | Address | | **rune_amt** | varchar | Rune Amt | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_tcy_distribution_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_tcy_distribution_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_tcy_distribution_events) # thorchain.defi_tcy_stake_events Source: https://docs.dune.com/data-catalog/thorchain/defi_tcy_stake_events THORChain TCY staking events. ## Table Description The `thorchain.defi_tcy_stake_events` table event data for tcy stake on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **amount** | decimal(38,0) | Amount value | | **rune_address** | varchar | Address | | **memo** | varchar | Transaction memo | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_tcy_stake_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_tcy_stake_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_tcy_stake_events) # thorchain.defi_tcy_unstake_events Source: https://docs.dune.com/data-catalog/thorchain/defi_tcy_unstake_events THORChain TCY unstaking events. ## Table Description The `thorchain.defi_tcy_unstake_events` table event data for tcy unstake on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx_id** | bigint | Transaction ID | | **amount** | decimal(38,0) | Amount value | | **rune_address** | varchar | Address | | **memo** | varchar | Transaction memo | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_tcy_unstake_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_tcy_unstake_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_tcy_unstake_events) # thorchain.defi_total_block_rewards Source: https://docs.dune.com/data-catalog/thorchain/defi_total_block_rewards THORChain total block rewards — aggregate emissions per block. ## Table Description The `thorchain.defi_total_block_rewards` table block-level data for total rewards on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_id** | bigint | Identifier | | **reward_entity** | varchar | Reward Entity | | **rune_amount** | decimal(38,0) | Amount in RUNE | | **rune_amount_usd** | decimal(20,6) | USD value of RUNE amount | | **\_unique_key** | varchar | Unique Key | | **\_INSERTED_TIMESTAMP** | timestamp | Timestamp of the record | | **fact_total_block_rewards_id** | bigint | Surrogate key for the fact record | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_total_block_rewards](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_total_block_rewards) # thorchain.defi_total_value_locked Source: https://docs.dune.com/data-catalog/thorchain/defi_total_value_locked THORChain TVL snapshots — total value locked across all pools and features. ## Table Description The `thorchain.defi_total_value_locked` table tracks total value locked (TVL) across THORChain pools. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **day** | date | Date of the record | | **total_value_pooled** | varchar | Total Value Pooled | | **total_value_bonded** | varchar | Total Value Bonded | | **total_value_locked** | varchar | Total Value Locked | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_total_value_locked_id** | bigint | Surrogate key for the fact record | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_total_value_locked](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_total_value_locked) # thorchain.defi_trade_account_deposit_events Source: https://docs.dune.com/data-catalog/thorchain/defi_trade_account_deposit_events THORChain trade account deposit events. ## Table Description The `thorchain.defi_trade_account_deposit_events` table event data for trade account deposit on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **amount_e8** | bigint | Amount in e8 units (1e8 = 1 unit) | | **asset** | varchar | Asset identifier | | **asset_address** | varchar | Address | | **rune_address** | varchar | Address | | **tx_id** | bigint | Transaction ID | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_trade_account_deposit_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_trade_account_deposit_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_trade_account_deposit_events) # thorchain.defi_trade_account_withdraw_events Source: https://docs.dune.com/data-catalog/thorchain/defi_trade_account_withdraw_events THORChain trade account withdrawal events. ## Table Description The `thorchain.defi_trade_account_withdraw_events` table event data for trade account withdraw on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **amount_e8** | bigint | Amount in e8 units (1e8 = 1 unit) | | **asset** | varchar | Asset identifier | | **asset_address** | varchar | Address | | **rune_address** | varchar | Address | | **tx_id** | bigint | Transaction ID | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_trade_account_withdraw_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_trade_account_withdraw_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_trade_account_withdraw_events) # thorchain.defi_update_node_account_status_events Source: https://docs.dune.com/data-catalog/thorchain/defi_update_node_account_status_events THORChain node status update events — active, standby, and disabled transitions. ## Table Description The `thorchain.defi_update_node_account_status_events` table event data for update node account status on THORChain. This table is partitioned by day. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **former_status** | varchar | Former Status | | **current_status** | varchar | Current Status | | **node_address** | varchar | Address | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_update_node_account_status_events_id** | date | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_update_node_account_status_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_update_node_account_status_events) # thorchain.defi_upgrades Source: https://docs.dune.com/data-catalog/thorchain/defi_upgrades THORChain protocol upgrade events — version changes and migration records. ## Table Description The `thorchain.defi_upgrades` table contains data for protocol upgrade events on THORChain. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_id** | bigint | Identifier | | **tx_id** | bigint | Transaction ID | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **burn_asset** | varchar | Burn Asset | | **rune_amount** | decimal(38,0) | Amount in RUNE | | **rune_amount_usd** | decimal(20,6) | USD value of RUNE amount | | **mint_amount** | decimal(38,0) | Amount value | | **mint_amount_usd** | decimal(20,6) | USD value | | **\_unique_key** | varchar | Unique Key | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_upgrades_id** | bigint | Surrogate key for the fact record | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_upgrades](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_upgrades) # thorchain.defi_withdraw_events Source: https://docs.dune.com/data-catalog/thorchain/defi_withdraw_events THORChain liquidity withdrawal events — assets removed from pools. ## Table Description The `thorchain.defi_withdraw_events` table event data for liquidity withdrawal actions on THORChain. This table captures events when users remove liquidity from pools. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **\_TX_TYPE** | varchar | Tx Type | | **\_INSERTED_TIMESTAMP** | timestamp | Timestamp of the record | | **fact_withdraw_events_id** | bigint | Surrogate key for the fact record | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **dim_block_id** | bigint | Reference to the block dimension table | | **tx_id** | bigint | Transaction ID | | **blockchain** | varchar | Source blockchain identifier | | **from_address** | varchar | Source address | | **to_address** | varchar | Destination address | | **asset** | varchar | Asset identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **emit_asset_e8** | bigint | Emit Asset E8 | | **emit_rune_e8** | bigint | Emit Rune E8 | | **memo** | varchar | Transaction memo | | **pool_name** | varchar | Name of the liquidity pool | | **stake_units** | varchar | Pool units (LP tokens) received or burned | | **basis_points** | int | Basis Points | | **asymmetry** | varchar | Asymmetry | | **imp_loss_protection_e8** | bigint | Imp Loss Protection E8 | | **\_emit_asset_in_rune_e8** | bigint | Emit Asset In Rune E8 | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_withdraw_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=defi_withdraw_events) # thorchain.gov_new_node_events Source: https://docs.dune.com/data-catalog/thorchain/gov_new_node_events THORChain new node registration events. ## Table Description The `thorchain.gov_new_node_events` table event data for new node registration events on THORChain. This table tracks when new validator nodes are registered on the network. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **node_addr** | varchar | Node Addr | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **node_address** | varchar | Address | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_new_node_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_new_node_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_new_node_events) # thorchain.gov_set_ip_address_events Source: https://docs.dune.com/data-catalog/thorchain/gov_set_ip_address_events THORChain node IP address configuration events. ## Table Description The `thorchain.gov_set_ip_address_events` table event data for set ip address on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **node_addr** | varchar | Node Addr | | **ip_addr** | varchar | Ip Addr | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **node_address** | varchar | Address | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_set_ip_address_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_set_ip_address_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_set_ip_address_events) # thorchain.gov_set_node_keys_events Source: https://docs.dune.com/data-catalog/thorchain/gov_set_node_keys_events THORChain node key rotation events. ## Table Description The `thorchain.gov_set_node_keys_events` table event data for set node keys on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **node_addr** | varchar | Node Addr | | **secp256k1** | varchar | Secp256K1 | | **ed25519** | varchar | Ed25519 | | **validator_consensus** | varchar | Identifier | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **node_address** | varchar | Address | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_set_node_keys_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_set_node_keys_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_set_node_keys_events) # thorchain.gov_set_node_mimir_events Source: https://docs.dune.com/data-catalog/thorchain/gov_set_node_mimir_events THORChain node Mimir vote events — node operator governance votes. ## Table Description The `thorchain.gov_set_node_mimir_events` table event data for set node mimir on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **address** | varchar | Address | | **key** | varchar | Key | | **value** | varchar | Value | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_set_node_mimir_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_set_node_mimir_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_set_node_mimir_events) # thorchain.gov_set_version_events Source: https://docs.dune.com/data-catalog/thorchain/gov_set_version_events THORChain node version declaration events. ## Table Description The `thorchain.gov_set_version_events` table event data for set version on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **node_addr** | varchar | Node Addr | | **version** | varchar | Version | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **node_address** | varchar | Address | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_set_version_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_set_version_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_set_version_events) # thorchain.gov_slash_events Source: https://docs.dune.com/data-catalog/thorchain/gov_slash_events THORChain slash events — validator penalties for misbehavior. ## Table Description The `thorchain.gov_slash_events` table event data for slashing events on THORChain. This table tracks validator slashing events including the pool, asset, and amount slashed. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **pool_name** | varchar | Name of the liquidity pool | | **asset** | varchar | Asset identifier | | **asset_e8** | bigint | Asset amount in e8 units | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_slash_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_slash_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_slash_events) # thorchain.gov_slash_points_events Source: https://docs.dune.com/data-catalog/thorchain/gov_slash_points_events THORChain slash point accumulation events. ## Table Description The `thorchain.gov_slash_points_events` table event data for slash points on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **node_address** | varchar | Address | | **slash_points** | int | Slash Points | | **reason** | varchar | Reason | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_slash_points_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_slash_points_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_slash_points_events) # thorchain.gov_validator_request_leave_events Source: https://docs.dune.com/data-catalog/thorchain/gov_validator_request_leave_events THORChain validator leave request events — nodes signaling intent to exit. ## Table Description The `thorchain.gov_validator_request_leave_events` table event data for validator request leave on THORChain. This table is partitioned by block_month. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **tx** | varchar | Tx | | **from_addr** | varchar | From Addr | | **node_addr** | varchar | Node Addr | | **event_id** | bigint | Event identifier | | **block_timestamp** | timestamp | Timestamp of when the block was created | | **tx_id** | bigint | Transaction ID | | **from_address** | varchar | Source address | | **node_address** | varchar | Address | | **block_time** | timestamp | Timestamp of when the block was created | | **block_month** | timestamp | Block Month | | **\_inserted_timestamp** | timestamp | Timestamp of the record | | **fact_validator_request_leave_events_id** | bigint | Surrogate key for the fact record | | **dim_block_id** | bigint | Reference to the block dimension table | | **inserted_timestamp** | timestamp | Time when the record was inserted | | **modified_timestamp** | timestamp | Time when the record was last modified | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_validator_request_leave_events](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=thorchain\&table_name_t6f0df=gov_validator_request_leave_events) # THORChain Data Source: https://docs.dune.com/data-catalog/thorchain/overview THORChain blockchain data on Dune ## What is THORChain? THORChain is an independent, cross-chain liquidity protocol that operates as a Layer 1 decentralised exchange (DEX). Built on the Cosmos SDK, it utilises the CometBFT consensus engine, the Cosmos-SDK state machine, and the GG20 Threshold Signature Scheme (TSS) to execute its purpose, which is to allow users to swap native assets across multiple chains with zero reliance on centralised third parties. In doing so, it stands as one of the few exchanges that verifiably ensures transparent and fair prices for cross-chain swaps of native assets. THORChain's design renders no need for wrapped or pegged assets. Instead, the protocol deploys what are called continuous liquidity pools (CLPs), which—with highly complex algorithms—maximise the efficiency of its transactions. These CLPs allow for THORChain to manage funds directly in on-chain vaults, and it secures those funds via an economic security model. For all this, THORChain might be best described as a "cross-chain automated market maker (AMM), like Uniswap", or even a "decentralised Binance". ### Key Features * **Native Cross-Chain Swaps**: Swap native assets across multiple chains without wrapped or pegged tokens * **Continuous Liquidity Pools (CLPs)**: Advanced AMM mechanism that maximizes transaction efficiency * **Economic Security Model**: Secures funds through bonded RUNE and validator economics * **THORNodes**: Anonymous validators who bond RUNE to provide validation services * **Permissionless Network**: Anyone with required funds can become a validator ### THORChain's Financial Offerings THORChain pursues two important financial primitives: 1. Allow a user to **Swap** Asset X on Chain A to Asset Y on Chain B. 2. Allow a user to **Pool** RUNE across liquidity pools. ## THORChain Data on Dune THORChain blockchain data is organized into several key tables that capture different aspects of on-chain activity: > [card] [Blocks](/data-catalog/thorchain/core_block) > > Core block data including block headers, timestamps, and block statistics. > [card] [Transfers](/data-catalog/thorchain/core_transfers) > > Native asset transfers between addresses on THORChain. > [card] [Swaps](/data-catalog/thorchain/defi_swaps) > > Cross-chain native asset swaps executed on THORChain. > [card] [Daily Pool Stats](/data-catalog/thorchain/defi_daily_pool_stats) > > Daily statistics for Continuous Liquidity Pools (CLPs) including liquidity, swaps, and fees. > [card] [Liquidity Actions](/data-catalog/thorchain/defi_liquidity_actions) > > Add and remove liquidity actions across THORChain pools. > [card] [Swap Events](/data-catalog/thorchain/defi_swap_events) > > Event-level data for swaps including amounts, fees, and slippage. ## Network Specifications * **Consensus**: CometBFT (Tendermint) * **State Machine**: Cosmos SDK * **Security**: GG20 Threshold Signature Scheme (TSS) * **Validator Model**: THORNodes with bonded RUNE * **Churn Schedule**: Every three days, rotating validators to prevent centralization ## Resources * [THORChain Documentation](https://docs.thorchain.org/) * [THORChain Developer Documentation](https://docs.thorchain.org/developers) # ton.accounts Source: https://docs.dune.com/data-catalog/ton/accounts TON account data — wallet addresses, contract types, balances, and status. ## Table Description The `ton.accounts` table contains all updates of accounts. Including updates of balance and code_hash. This table is created using [this SQL](https://github.com/duneanalytics/spellbook/blob/main/dbt_subprojects/daily_spellbook/models/ton/ton_accounts.sql). ## Column Descriptions | **Column** | **type** | **Description** | | - | - | - | | **address** | varchar | Account raw address | | **status** | varchar | Status of account | | **last_tx_hash** | varchar | Hash of the latest transaction | | **last_tx_at** | timestamp(3) with time zone | timetsmap of the latest transaction | | **balance** | bigint | Raw ton balance | | **code_hash** | varchar | Account code hash (on-chain value) | | **deployment_tx_hash** | varchar | Hash of transaction when account was deployed | | **deployment_at** | timestamp(3) with time zone | Timestamp when account was deployed | | **deployment_by_external** | boolean | Equals true when deployment of transactions was first transaction in trace, in other words when `(deployment tx_hash = deployment trace_id)`, false otherwise | | **initial_funding_tx_hash** | varchar | Transaction hash with the first occur of account in transactions | | **initial_funding_at** | timestamp(3) with time zone | Timestamp of the first occur of account in transactions | | **first_tx_sender** | varchar | Raw address of who intiated the first transaction with this account | | **interfaces** | array(varchar) | The list of known available interfaces (for example `wallet_v4r2`, [full list available here](https://github.com/duneanalytics/spellbook/blob/main/dbt_subprojects/daily_spellbook/models/ton/ton_accounts.sql)) | ## Table Sample Table sample can be found [here](https://dune.com/queries/3419983/5785629?table_name_t6f0df=accounts\&table_schema_t6f0df=ton). # ton.balances_history Source: https://docs.dune.com/data-catalog/ton/balances_history TON account balance history — Toncoin holdings over time. ## Table Description The `ton.balances_history` table contains information about all balances changes for native TON and jettons. This table allows to get point time balance for each address as well latest balances. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_time** | timestamp | Timestamp of when the block containing the balance change was created | | **block_date** | date | Date of when the block containing the balance change was created | | **address** | string | Account raw address | | **asset** | string | Asset address or **TON** for TON balance | | **amount** | decimal(38,0) | Asset balance | | **mintless_claimed** | boolean | Special flag for mintless jettons that mintless part was claimed | | **timestamp** | int | Unix timestamp of the transaction | | **lt** | bigint | Logical time of the transaction | ## Table Sample [https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ton\&table_name_t6f0df=balances_history](https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=ton\&table_name_t6f0df=balances_history) # ton.blocks Source: https://docs.dune.com/data-catalog/ton/blocks TON block data — workchain, shard, seqno, and global block identifiers. ## Table Description The `ton.blocks` table contains block-level data from the TON blockchain including block header information, validators, and block statistics. This table is partitioned by block_date. ## Column Descriptions | **Column** | **Type** | **Description** | | - | - | - | | **block_time** | timestamp | Timestamp of when the block was created | | **block_date** | date | Date of when the block was created | | **workchain** | int | Workchain identifier | | **shard** | bigint | Shard identifier | | **seqno** | int | Sequence number | | **root_hash** | string | Hash of the block root | | **file_hash** | string | Hash of the block file | | **mc_block_workchain** | int | Masterchain block workchain identifier | | **mc_block_shard** | bigint | Masterchain block shard identifier | | **mc_block_seqno** | int | Masterchain block sequence number | | **global_id** | int | Global identifier | | **version** | int | Block version | | **after_merge** | boolean | Flag indicating if block was created after merge | | **before_split** | boolean | Flag indicating if block was created before split | | **after_split** | boolean | Flag indicating if block was created after split | | **want_merge** | boolean | Flag indicating if block wants to merge | | **want_split** | boolean | Flag indicating if block wants to split | | **key_block** | boolean | Flag indicating if this is a key block | | **vert_seqno_incr** | boolean | Vertical sequence number increment flag | | **flags** | int | Block flags | | **gen_utime** | bigint | Generation unix time | | **start_lt** | bigint | Start logical time | | **end_lt** | bigint | End logical time | | **validator_list_hash_short** | int | Short hash of validator list | | **gen_catchain_seqno** | int | Generation catchain sequence number | | **min_ref_mc_seqno** | int | Minimum reference masterchain sequence number | | **prev_key_block_seqno** | int | Previous key block sequence number | | **vert_seqno** | int | Vertical sequence number | | **master_ref_seqno** | int | Master reference sequence number | | **rand_seed** | string | Random seed