AMMs deployed by the factory are now deployed at deterministic addresses. This address can be retrieved using a dedicated view-only helper method on the contract.
This has the following advantages (all mentioned in this comment, which I'm copying):
Avoid minor concern here about allowances that users have given to this contract then potentially being abused by some fake front-end that injects fake amm addresses, resulting in loss of funds for the user by scammers.
We can ensure that the amm at which the funds are being deposited is a canonical amm
This gives us a way of determining without indexing if the ConstantProduct is canonical, and can therefore be exempt from protocol fees in the backend.
A negative point:
There can be at most a single AMM for the same owner and tokens.
Part of making CoW AMM standalone (https://github.com/cowprotocol/cow-amm/pull/44).
AMMs deployed by the factory are now deployed at deterministic addresses. This address can be retrieved using a dedicated view-only helper method on the contract.
This has the following advantages (all mentioned in this comment, which I'm copying):
A negative point:
How to test
New unit tests. Existing e2e test.