Swaplytics

How it works

When you swap tokens, your wallet shows the network fee. The real cost is usually bigger: pools charge trading fees, and a big swap moves the price against you. Swaplytics works these out for each swap, from the record that the trading program wrote at the moment of the swap.

What the report shows

For each swap, we start from the pool's price just before the swap. At that price, with no costs, what you paid was worth a certain amount of the token you got. The difference between that amount and what you actually received is the cost. We split it into three parts:

Trading fees
Every fee the pool's program took. On PumpSwap: the fee for the people who provide the pool's money, the protocol fee, and the token creator's fee if there is one. On Orca: the pool's fee and the protocol fee. On pump.fun's launch curve: the protocol fee and the creator fee.
Price impact
A pool's price gets worse as a swap gets bigger. This is the gap between the pool's price just before your swap and the average price your swap got, before fees.
Other costs
Anything that did not reach a pool, or did not reach you. For example, a trading app may keep 1% of what you swap.

Network fees, tips, account deposits and SOL sent to other accounts in the same transaction are listed on their own, under "Also paid". They are not part of the hidden cost.

An example with round numbers

The pool's record says its price just before your swap was 150 USDC for 1 SOL. You paid 2 SOL, which at that price is worth 300.00 USDC. You received 296.70 USDC, so the swap cost 3.30 USDC, or 1.1%:

PartUSDC
Trading fees0.75
Price impact0.45
Other costs (an app's fee)2.10
Cost3.30

Each swap in a report has a "How this was worked out" section with its own numbers, and a link to the transaction on Solana Explorer.

Why we use the pool's own record

We first measured costs against CoinGecko's last price before each swap. To check that price, we compared it with the exact price just before each trade, from the trading program's own record. Our limit was a middle difference of 0.10%.

PoolsTradesMiddle difference9 in 10 withinWithin 0.10%
PumpSwap, 24 pools, mostly newer tokens831.01%, fails39.8%1
Orca, the first 12 pools listed by CoinGecko950.036%, passes0.20%75
SOL and USDC on Orca320.030%, passes0.04%31

For major tokens, CoinGecko's price was close. For new tokens, whose price can change every second, the error was as big as the cost we wanted to measure. With exact prices, the middle cost of these PumpSwap trades was 1.19%. With CoinGecko's prices, the same trades seemed to cost anything from -5.9% to 97.9%. Five sales came just after a crash, when CoinGecko's price was 8 to 47 times the trade's price. A crash must never look like a hidden cost.

So the report uses the price from the pool's own record, and uses CoinGecko's price only as a check.

How we read the records

PumpSwap writes a record of every buy and sell. It includes the pool's two balances just before the trade, and every fee. The price is the second token's balance divided by the first token's balance. PumpSwap also adds an extra amount of the second token, called virtual_quote_reserves, which can be negative since 30 September 2026. Without it, sells seemed to have negative fees. With it, the price fits every trade we checked. The layout of the record is in PumpSwap's public docs.

Orca writes a record called Traded for every trade. It includes the pool's price before and after the trade, and its two fees. The layout is in Orca's open source code.

pump.fun's launch curve is where new tokens trade before they move to PumpSwap. Its record, TradeEvent, shows the curve's virtual SOL and token reserves just after the trade, so the trade's own amounts give them just before. The pool address that CoinGecko gives is the curve itself, which pump.fun works out from the token's address. The curve's token account must also hold exactly 206.9 million tokens more than the record's "real" reserves: the part every curve keeps back for its move to PumpSwap. Curves priced in a token other than SOL are not read yet. The layout is in pump.fun's public docs, in idl/pump.json.

A swap that goes through several pools has a record for each one. We follow the pools from the token you paid to the token you received, and multiply their prices.

How we know a record is real

Any program can write text into a transaction's log, including a fake record. We only use a record when:

If Solana cut the log short, we do not use it.

When we do not give a number

We never guess. A swap is listed as "not measured", with the reason, when:

Swaps that were not measured are never in the totals, and the report always says how many there were.

Dollar values

We only turn an amount into dollars through SOL or a dollar stablecoin (USDC, USDT, PYUSD or USDG) that the swap paid or received on the way. The dollar prices come from CoinGecko's hourly price history for SOL and those coins, so a token's own price never sets its dollar value. If no pool on the way used one of them, the swap has no dollar value. Its cost is still shown, but it is left out of the dollar totals.

SOL's dollar price is the nearest hourly point, so a dollar amount can be off by as much as SOL moved within that hour. The percentages do not depend on it.

What CoinGecko does

We also found that on Orca, CoinGecko's usual gap from the exact price matched each pool's fee. This suggests that CoinGecko's price is the last trade's price, including that trade's fee.

Orca poolUsual gapPool's fee
HONEY0.294%0.30%
ZEC0.157%0.16%
TRUMP0.050%0.05%
JLP0.016%0.02%

What the report cannot tell you

This is not financial or tax advice.

How we tested it

Final test (769 transactions)

CheckFirst halfSecond half, kept sealed
The pool's price before a swap equals its price after the previous trade, read from a different transaction159 of 159 exactly equal159 of 159 exactly equal
CoinGecko and the records list the same amounts308 of 308302 of 302
Every cost adds up165 of 165165 of 165
Swaps measured165 of 374 (44.1%)165 of 395 (41.8%)

The second half stayed sealed until the code was final, so it was never used to make a rule. Full 30 day reports for 5 wallets each finished in under 2 minutes, after we made reading old transactions faster: the slowest took 84 seconds.

Privacy

You never connect a wallet or sign anything: we only read public data. A finished report stays in memory for 10 minutes so this page can show it, and is then deleted. To make reports faster, we keep copies of public data from Solana and CoinGecko for between 2 minutes and a year. We do not keep a list of who checked which address.

Check a wallet