How to use it
- Enter your trade size in CAD.
- Enter the pool's total depth in CAD (both sides combined).
- Enter the pool's swap fee.
- Enter your slippage tolerance, as a percentage.
- Read the price impact and the maximum extra loss your tolerance allows, then try a lower tolerance or a smaller trade.
Price impact in a constant-product pool
A constant-product pool keeps the product of its two reserves fixed. Selling an amount into it returns R_out × Δx′ ÷ (R_in + Δx′), where Δx′ is your input after the fee. The larger your trade relative to the pool, the further the price moves during your own trade. The calculator assumes a pool split evenly by value with a starting price of one unit per CAD, and measures impact against what you would receive after the fee alone.
In percentage terms, impact grows roughly in line with trade size for small trades, but its CAD cost grows much faster: in a pool with $1,000,000 of total depth and a 0.3% fee, impact costs about $194.92 on a $10,000 trade and about $4,519.46 on a $50,000 trade.
| Trade size | Price impact |
|---|---|
| $1,000 | 0.199% |
| $10,000 | 1.955% |
| $50,000 | 9.066% |
| $100,000 | 16.625% |
Slippage tolerance is the most others can take
Your slippage tolerance sets the minimum output your transaction will accept. Everything between the expected output and that minimum is room that someone else can use. In a sandwich attack, a bot sees your pending swap in the public queue, trades just before it to worsen the price, lets your trade fill at that worse price and then trades back. What it can take is limited by the gap your tolerance allows. The same gap also absorbs ordinary price moves between signing and execution.
Illustrative example: a $10,000 swap into the pool above. The expected output is $9,775.08 against $9,970.00 with no impact, a price impact of 1.955%. A 1% tolerance sets the minimum at $9,677.33, leaving up to $97.75 exposed.
| Slippage tolerance | Minimum received | Maximum extra loss |
|---|---|---|
| 0.1% | $9,765.31 | $9.78 |
| 0.5% | $9,726.21 | $48.88 |
| 1% | $9,677.33 | $97.75 |
| 3% | $9,481.83 | $293.25 |
How to limit your exposure
A wider tolerance is sometimes needed for volatile or thinly traded tokens, but it is a decision to accept a worse price, and the calculator shows how much that decision could cost. These habits keep the exposure small:
- Set the lowest slippage tolerance that still lets your trade go through, and avoid automatic settings that pick a wide tolerance for you.
- Split large trades so each has less price impact, keeping in mind that each trade pays its own gas.
- Prefer deeper pools for the same pair, since impact falls as depth rises.
- Where your wallet offers it, consider private transaction submission that keeps swaps out of the public queue; it changes whom you are trusting.
- Check the minimum received shown before you sign, not just the expected output.
What the model leaves out
Real pools may use concentrated liquidity, several fee tiers or routing through more than one pool, all of which change the impact curve. The calculator does not estimate how likely a sandwich is, which depends on the network, the trade size and how the transaction is submitted. The exposure figure is a ceiling set by your tolerance, not a predicted loss.
See smart contract risk for the risks of the pool itself and wallet security for safe signing habits.
Canadian context
Under CRA's general crypto-asset guidance, each swap of one crypto-asset for another is a disposition. The CAD value you record is what you actually received, so price impact and any value lost to sandwiching are already reflected in your proceeds. Keep the records CRA asks for, including the date, CAD value and wallet addresses.
Swaps on decentralized exchanges happen outside the registered-platform framework that Canadian securities regulators apply to crypto trading platforms, so there is usually no one to complain to if a trade goes badly; see regulation.
