At a glance
| Topic | swap size and price impact maths |
|---|---|
| Read time | About five minutes |
| Try it on | https://xauconnect.com/swap |
| Rule | Read output, impact, and slippage before signing |
Use XAUConnect
XAUConnect is a multi-chain DEX aggregator built around gold liquidity: best-price swaps across networks, XAU pools, bonding-curve launches on the Launchpad, trending pairs on Discover, and a developer API for routing.
To apply this page to your own situation, open the xauconnect swap and work through swap size and price impact maths: the plain guide with your own numbers in front of you.
Why does the next unit cost more than the unit before it?
In a common pool the two reserves move together so that multiplying one by the other still gives the same result. You add one asset and remove the other. After some of the second asset leaves, less of it remains, so the next piece costs more of what you are paying. Price walks as the trade walks.
The quote you are shown is the average along that walk, not the starting price copied onto every unit. A tiny order barely moves, so its average sits near the start. A large order walks farther, so its average is worse. The gap between those averages is price impact.
How do larger reserves shorten the same order?
Bigger reserves turn the same order into a shorter step along the curve. Smaller reserves turn that order into a longer step. Impact is not glued to the token name. It comes from your size set against those reserves, inside that pool, at the moment you look.
Grow the reserves and the same size walks less, so impact eases. Shrink the reserves and the same size walks more, so impact grows. A figure you worked out yesterday used yesterday's reserves. The live quote uses the reserves present now, which is why you read it again.
Which on screen number is impact, and which is slippage?
Impact is the move already implied by the size you typed. Slippage is the room you allow around the result before the trade should fail. This page states no fee, no minimum, and no percentage for either figure. The quote is where the impact for your size is shown.
The price of a dust sized probe is not the price of the whole order. You can set slippage wider than the impact and still receive a poor average, because the allowance did not undo the walk. Read the two numbers as neighbours. One label should not do both jobs.
Why does sending twice as much fail to return twice as much?
The later part of the order buys after the earlier part has already shifted the reserves, so that later part faces a worse price. Output still rises when you send more, yet it rises by less than a straight line would suggest. Twice the input does not become twice the output in this kind of pool.
You can see the bend without a made up example. Ask for a quote at one size and note the output. Ask for a fresh quote at a larger size and compare the two outputs. The shortfall against a straight doubling is the curve showing its shape. Keep the fresh quote, and do not multiply the small result and call that the maths.
Where does the swap screen carry this size relationship?
Output carries what the walk pays you. Impact names the price move your size already caused. Slippage is the limit you place on further movement before you sign. Read output, impact, and slippage before you sign, because the relationship is only useful for the order you will actually send.
Run the size change at https://xauconnect.com/swap and allow about five minutes. Move the amount and watch the three figures respond. You are watching a pool curve. You are not pricing physical gold, and you are not turning a gold token into metal. The token and the bar remain different things while you study the quote.
Questions people ask
Is price impact just a fee under another name?
No. Where a venue charges a fee, that charge is the venue charge. Impact is the price move from walking the reserves with your size. This guide gives neither a fee amount nor a percentage. Read the output on your real size and study that gap before you sign.
Can I price the full order from the mid price alone?
Not once the order is large enough to move the pool. The mid price is only a starting point. Your size shifts the reserves, so the average you receive sits worse than that start. Use the live quote for the amount you will send. Multiplying the mid price by size leaves the walk out.
Do several smaller swaps get around the curve?
Each piece still walks the reserves if you keep trading into the same pool. Pieces sent in a row can move the price in steps that add up. Splitting the order does not cancel the curve. Refresh output, impact, and slippage on every piece. Later pieces can pay a worse price.
Does this reserve walk describe a bar of physical gold?
No. The walk describes reserves inside a pool. Physical gold is metal, handled in the metal market. A gold token may be one asset in the pool while the bar stays outside that pool. Read size and impact on the token quote. Take metal questions to the metal market.
