dex-analysis

Installation
SKILL.md

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 transaction_hash) 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 transaction_hash grain first.

Group by protocol for AMM-math questions, by project for branding

Installs
1
First Seen
6 days ago
dex-analysis — allium-labs/skills