Swaps
A swap is defined as a single token exchange event between two tokens facilitated by a DEX, aggregator, or protocol. Swaps represent the fundamental building blocks of liquidity flow within the Solana ecosystem. By indexing all swap events across major protocols, Prism ensures complete visibility into market activity and liquidity dynamics.Trades
A trade is a broader concept: it refers to a token exchange executed atomically by a single user within a single transaction. In practice, a trade may consist of one or more underlying swaps, as users often route transactions through multiple pools or protocols, whether for optimal pricing, arbitrage, or complex routing strategies. Tracking trades enables in-depth analysis of individual and aggregate trading behavior, supporting user-level market insights. To deliver both accuracy and responsiveness in trade analytics, Prism employs two complementary models:- Position-based tracking: This model follows each trade from its initial buy to its final sell, capturing the full lifecycle of trading positions and filtering out partial or fragmented trades.
- FIFO-based tracking: Using a first-in, first-out approach, this model matches each sell with the earliest corresponding buy, making it ideal for real-time analytics and short-term performance measurement.
Swaps vs. Trades
- Swaps
- Trades
- The smallest possible exchange unit, the “atom” of DEX activity.
- Typically used for liquidity analysis, pool activity analysis, and protocol performance analysis.
- Reflect the raw mechanics of liquidity flow, independent of user strategy or intent.