DeCrypto Markets

Floor 2: Exchanges and orders

AMM Swap

AMM Swap is a game about trading in an automated market maker pool. You predict the price impact of a swap in a constant-product pool, where x times y stays equal to k. Then you set the slippage tolerance. Too tight and the swap reverts; too loose and a bot sandwiches it. Decrypt shows the safe range.

Create a free account to play

Free, with a verified email address. An account saves your progress, and floors and tiers open as you level up.

What it teaches

How automated market makers price a trade, and why tolerance matters.

How a round plays

  1. Each round is one swap in a constant-product pool of a coin and USDT, with a 0.05%, 0.30% or 1% fee.
  2. First predict your swap's price impact, in percent.
  3. Then set the slippage tolerance. A trade from another user lands ahead of yours and moves the price, and a bot watches for room to sandwich you.
  4. Check, and Decrypt shows the safe range of tolerances, your minimum received, and what the bot would take at your setting.

How it is graded

The pool, the trade ahead and the bot are simulated exactly on integer units. The impact is graded within a tolerance that tightens with the level. The tolerance is graded against the exact safe window: from the smallest setting that does not revert, up to one basis point below the smallest setting a profitable bot can sandwich. Both edges are found by exact search. Impact counts 40% and the tolerance 60%.

The honest note

Real pools can hold worthless tokens, and anyone can create one. Smart contracts can have bugs. The bot here follows one fixed strategy; real bots compete and vary. A low price impact says nothing about whether the token is worth anything.

The guides behind it