Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Opening in favor of AztecProtocol/aztec-packages#8644 due to @benesjan being away on vacation, and that PR using Graphite. Work here starts from commit a404b58e7d049ee7a56310702046f03a624fd1ee, which has been squashed into 81d7607d9d551aea4d6de78ec3ff535ec5d5a29a. This is the first implementation of Uniswap v2 style AMM that provides identity privacy. The contract is a single pool for two tokens with a fixed 0.3% swap fee. Adding and removing liquidity is done proportionally to the current ratio, resulting in no price impact and therefore no fees. Swaps can be performed by specifying either the amount in or the amount out. All three operations are completed in a single transaction each by leveraging partial notes. I created AztecProtocol/aztec-packages#10225 to track pending work. Some of the tasks in that epic are only work that arises from the AMM, but are not technically required to have a fully functioning system: this PR already achieves that. Only a happy-path end to end test is included here, since TXE currently lacks some of the features required in order to properly deal with partial notes. We should later write those as this will be a good test of TXE's capabilities and user experience, given the complexity of the setup. --- I added the e2e to be run on CI on all branches since it combines multiple complex features, and likely contains our largest transactions yet.
- Loading branch information