00Overview
The DEX computes prices as `(amountIn * reserveOut) / reserveIn`. Repeatedly swapping all of one token for the other shifts reserves, causing each subsequent swap to yield more tokens. After several cycles, one reserve is drained to zero.
01Approve the DEX
javascript
await contract.approve(instance, 500)02Repeatedly swap all of one token
Each swap amplifies the imbalance. Continue until one pool is drained.
javascript
await contract.swap(token1, token2, await contract.balanceOf(token1, player))
// repeat alternating directions until drained03Level Completed
