# dex-analysis

> Claude/Codex skill by [@allium-labs](https://omgskills.com/library/allium-labs/index.md) · 0 stars · Updated 2026-10-23

Methodology playbook for analyzing DEX/AMM trade, liquidity, and pricing data on Allium — Uniswap, PancakeSwap, PumpSwap/Pump.fun, Orca, Pendle, aggregators (0x, 1inch), and perp DEXs like Hyperliquid. Use whenever a question touches swap volume, trade counts, liquidity positions, impermanent loss, aggregator fee/routing analysis, or DEX-derived token prices — even if the user just names a protocol or asks why a number "looks off" compared to a known reference. Covers the per-hop double-counting, protocol-vs-project grouping, and fee-leg reconstruction pitfalls that come up repeatedly before you write the SQL.

## Install

```sh
git clone https://github.com/allium-labs/allium-claude-plugin /tmp/allium-claude-plugin && ln -s /tmp/allium-claude-plugin/skills/dex-analysis ~/.claude/skills/dex-analysis
```

## From README

DEX Analysis The most common DEX-analysis mistake isn't a wrong table — it's treating a per-hop or per-side data model as if it were per-swap or per-trade. Check the grain of the table before aggregating. Trade rows are often per-hop, not per-swap Multi-hop routes (A→B→C) can produce 2-3 trade rows for what the user experienced as one swap. This inflates both volume and row counts — one real comparison found 1.3x inflation vs. an external source on a specific chain purely from hop fan-out. Compare COUNT() vs. COUNT(DISTINCT transactionhash) on a trades table before trusting a volume/count total — a large gap between them is the signature of multi-hop fan-out. When you need to compare volume against an external aggregator (DefiLlama, etc.), either divide by the observed hop ratio or aggregate at transactionhash grain first.

## Links

- HTML page: https://omgskills.com/library/allium-labs/allium-claude-plugin/skills/dex-analysis/
- GitHub: https://github.com/allium-labs/allium-claude-plugin
- Author: [@allium-labs](https://omgskills.com/library/allium-labs/index.md)

## More from this repo

- [allium-investigation](https://omgskills.com/library/allium-labs/allium-claude-plugin/skills/allium-investigation/index.md) — Investigate an onchain entity, protocol, market, or wallet question with Allium.
   - [@allium-labs](https://omgskills.com/library/allium-labs/index.md) · 0 stars
- [bridge-analysis](https://omgskills.com/library/allium-labs/allium-claude-plugin/skills/bridge-analysis/index.md) — Methodology playbook for analyzing cross-chain bridge and messaging-protocol data on Allium — CCTP, LayerZero,...
   - [@allium-labs](https://omgskills.com/library/allium-labs/index.md) · 0 stars
- [dashboard-design](https://omgskills.com/library/allium-labs/allium-claude-plugin/skills/dashboard-design/index.md) — Used to build and update Allium Explorer dashboards with set\_dashboard.
   - [@allium-labs](https://omgskills.com/library/allium-labs/index.md) · 0 stars
