Step 6 / Ethereum & Shared Applications
Supplying a pool changes what you own.
Count the assets left in the pool, as well as any fees earned.
Now imagine you supply the two jars. Traders put in one token and take out the other. The pool may collect a fee each time.
At the end, you can add up those fees. But that does not tell you the whole result. You no longer have the same number of each token, and their prices may have changed.
Compare supplying the pool with holding.
Begin with 100 A and 100 B. At the start, one A is worth one B. The A is therefore worth 100 B; add the 100 B already held to get a total starting value of 200 B.
Put those assets into the same fee-free constant-product pool. The reserves multiply to 10,000. We will leave out fees and costs so we can see only the effect of changing inventory.
Now the outside A price rises to 4 B per A. Traders buy A from the pool and put B in until its small-trade quote catches up. The pool ends with 50 A and 200 B.
Check the rule and quote: 50 × 200 = 10,000, and 200 ÷ 50 = 4. The new inventory fits both the fixed product and the outside price in this model.
What is the pool worth now? First price its A: 50 × 4 = 200 B. Add its 200 B reserve. The total is 400 B, up from the starting 200 B.
Now calculate the alternative. If you had kept the original 100 A and 100 B, the A would be worth 100 × 4 = 400 B. Add the 100 B you kept to get 500 B.
The pool grew in value, but holding grew more. Subtract 400 from 500 to find a 100 B gap. Divide that gap by the 500 B holding value: 100 ÷ 500 = 20 percent.
So the pool is 20 percent below holding at the same final price. Both statements are true: its value rose, and it did worse than keeping the original tokens.
Both comparisons start with 100 A and 100 B. The pool is full-range, fee-free, equal-value constant product with arbitrage. Other designs need different calculations.
“Impermanent” is a name, not a promise.
This gap versus keeping the original tokens is often called impermanent loss, or divergence loss. It is a comparison with holding. It does not mean every loss must be small, temporary, or only on paper.
In this simple model, the gap gets smaller if the relative price moves back toward its starting point. At the starting relative price, the gap disappears before fees and costs. The market is not required to return there.
If you withdraw while the price is different, you take the changed inventory out. Waiting inside the pool does not guarantee a better result.
Fees might cover the gap, or they might not. Reward tokens can add income, but their prices can fall. New issuance can also reduce existing holders’ share of their supply.
Keep the example’s limits beside its result. It uses a full-range, equal-value, constant-product position with ordinary tokens. It ignores fees and assumes arbitrage brings the pool’s quote to the outside price.
A concentrated position or a weighted pool needs a different calculation. The 20 percent result is not a rule for every AMM.
Count everything that changes your result.
A provider’s final result can include trading fees, rewards, changed token holdings, network fees, and the cost of moving positions. A displayed annual rate may just stretch recent activity into a full year. Those conditions may not continue.
For a concentrated position, the price can leave the chosen range. The position then holds one asset and stops earning swap fees while inactive. The asset can still fall in value; stopped fees do not mean stopped risk.
Fast traders may reach the pool before its quote catches up with news elsewhere. They trade against the inventory providers supplied. The fee needs to be compared with the cost of offering that inventory at the prices available.
The order of requests can affect the result too. A trade that runs first changes the reserves faced by the next trade. The optional example below follows this step by step.
Other losses are separate from this trading math. A token may fail. A token’s target price may break. A contract may be exploited, or an administrator may use a powerful permission. A one-click deposit can still put money at risk in all these ways.
Inside the interval: this position can supply active liquidity and earn applicable swap fees.
Illustrative range. Exact boundary behavior uses protocol ticks and position direction. Market risk continues while inactive.
How another trade can change your result
A buyer reads a quote and sends a swap. Before that swap runs, another trade goes first and changes the pool’s reserves. The buyer’s request now faces different amounts of A and B.
A minimum-received condition can make the request fail instead of accepting too little. It does not guarantee a profitable purchase, and a failed included request can still use paid work.
Some participants try to profit by choosing which requests are included or in what order. This is part of maximal extractable value, shortened to MEV.
One harmful pattern places a trade before a user’s swap and another after it. The person arranging the trades tries to gain from the changing prices, while the user can receive a worse result.
Ordinary arbitrage and other ordering activity do not all have the same effect. Ask who gained and what the trader or provider paid. A bad price by itself is not proof that an attack occurred.
The idea to keep
Compare the whole result with a clear alternative. Fees are income from providing a service. To decide what that service cost, also count changes in inventory, expenses, and the risks taken.
