Uniswap V2

  • X*Y >= K

  • Pair of any two ERC20 coins: (improvement over v1 where only ERC20/ETH pair is supported) + Router contract

  • Flash Swaps: (atomic transaction, bundle everything within 1 transaction):

  • 30bps transaction cost (potentially 5bps fee)

  • Price Oracle: use price at beginning/end of a block / TWAP

Reference:

https://uniswap.org/whitepaper.pdf

https://github.com/Uniswap/v2-periphery/blob/master/contracts/examples/ExampleFlashSwap.sol