Dune Arcana #5 Explores Automated Market Makers Amiddex.trades Migration
June 2024 – DeFi analysts and developers are getting a fresh look at the fundamentals of automated market makers (AMMs) as Dune Analytics rolls out the fifth installment of its “Arcana” series. The guide arrives at a pivotal moment, coinciding with the ongoing migration of the popular “dex.trades” analytics suite to a new infrastructure.
A timely deep‑dive
The AMM model, first popularised by protocols such as Uniswap and Balancer, now underpins the majority of decentralized exchange (DEX) activity. Recognising that a robust understanding of AMM mechanics is essential for anyone tracking on‑chain trading data, Dune’s research team has compiled a primer that not only outlines the core concepts but also showcases practical queries that can be run directly on the platform.
The timing is intentional. As the “dex.trades” dashboards transition to a revamped backend, many users are re‑evaluating their data pipelines. Dune’s Arcana #5 offers a ready‑made framework for those looking to supplement or replace the soon‑to‑be‑deprecated analytics with custom, open‑source queries.
Core concepts revisited
While the series does not reinvent the wheel, it concisely revisits the building blocks that define AMM behaviour:
| Concept | What it means for DEXs | Typical on‑chain metric |
|---|---|---|
| Constant‑product curve | Liquidity providers (LPs) deposit token pairs into a pool that maintains the product x·y = k. | reserve_token0 * reserve_token1 |
| Liquidity depth | The total value locked (TVL) in a pool, dictating how much trade volume it can absorb before price impact becomes significant. | Sum of token reserves expressed in USD |
| Swap fee revenue | Fees collected on each trade (commonly 0.3%) that accrue to LPs, offsetting impermanent loss. | fee_rate * trade_volume |
| Impermanent loss | The divergence between the value of assets held in a pool versus holding them separately. | Calculated via price ratio changes over time |
| Arbitrage incentives | Price discrepancies between AMM pools and external markets that trigger profit‑seeking trades, realigning prices. | Frequency and size of “price‑impact‑correcting” swaps |
These fundamentals translate into a set of SQL‑based dashboards on Dune that let users slice the data by protocol, time window, or token pair.
Data‑driven analysis made accessible
The article walks readers through three starter queries that unlock immediate insight:
-
Pool health snapshot – Returns TVL, 24‑hour volume, and fee‑generated APR for the top 20 pools across Uniswap V3, SushiSwap, and Curve. This enables quick identification of “hot” liquidity hubs.
-
Liquidity churn – Tracks the flow of tokens entering and exiting pools, highlighting periods of capital reallocation. Analysts can correlate spikes with macro events (e.g., major token listings or governance proposals).
- Arbitrage detection – Flags swaps where the on‑chain price deviated from a reference oracle by more than 0.5 % before a subsequent trade restored parity. The query surfaces potential arbitrage bots and can be extended to examine profit distribution among participants.
By providing these templates, Dune encourages analysts to customise the logic — for instance, swapping the fee rate, expanding the token list, or layering additional risk metrics such as slippage tolerance.
Why the dex.trades migration matters
The dex.trades suite has been a go‑to resource for real‑time DEX analytics, but its upcoming migration to a new data pipeline has raised concerns about continuity. Dune’s Arcana offers a “bridge” solution: rather than relying on a single proprietary dashboard, users can recreate comparable visualisations on an open platform, preserving historical comparability while gaining the flexibility of bespoke queries.
Moreover, the migration underscores a broader industry trend: a move toward decentralised, community‑maintained analytics. By foregrounding on‑chain data that is inherently transparent, Dune positions itself as a resilient alternative to services that might become obsolete or subject to centralised control.
Key takeaways
- Foundational knowledge is crucial – Understanding AMM mechanics (constant‑product curves, liquidity depth, fee structures) is a prerequisite for meaningful on‑chain analysis.
- Dune provides ready‑made, extensible queries – The Arcana #5 guide equips users with immediate, actionable dashboards for pool health, liquidity movement, and arbitrage activity.
- The dex.trades migration highlights the need for self‑served analytics – As legacy tools shift, platforms like Dune enable continuity and customization without reliance on single vendors.
- Data transparency drives better market insights – Open‑source queries democratise access to metrics that can inform LP strategies, protocol governance, and risk assessment.
- Future analysis can expand beyond basics – With the templates as a foundation, analysts can layer advanced signals such as impermanent‑loss simulations, multi‑pool routing efficiency, or cross‑protocol liquidity fragmentation.
As DeFi continues to mature, the ability to interrogate AMM data directly on‑chain will become an essential skill set for traders, LPs, and developers alike. Dune’s Arcana #5 serves as both a refresher on the core concepts and a launchpad for deeper, data‑driven exploration of the decentralized exchange ecosystem.
Source: https://dune.com/blog/automated-market-maker-amm-dune-arcana-5
