In `swapTokensForTokens` and `priceImpact`, shouldn't the `amountIn` be added to `token0Reserve`?
eg in `swapTokensForTokens`, I think the first `if` should include a `this.token0Reserve += amountIn`, and similarly in the second `if` the amountIn should be added to token1Reserve
and in `priceImpact` I think the `priceAfter` in the first `if` should be
```
priceAfter = this.quote(
1,
this.token0Reserve + amountIn,
this.token1Reserve - delta
);
```
and in the second if
```
priceAfter = this.quote(
1,
this.token0Reserve - delta,
this.token1Reserve + amountIn
);
```
Am I missing something?
This isn't actually used anywhere, but was a playground for seeing if we wanted to simulate the AMMs too; so not really surprised it needs a little TLC.
I think you're right, it should definitely add the amountIn.