Increment Swap is a uniswap-v2 like CPAMM-based decentralized exchange (DEX) on the flow blockchain.
It allows creation of trading pairs between arbitrary fungible tokens (FT) in a totally permissionless way, with functionalities like CreatePair, AddLiquidity, RemoveLiquidity, Swap, TWAP-Oracle, etc.
  • It adopts the factory pattern that each unique trading pair contract is deployed using the code from SwapPair template contract, with metedata of deployed pairs stored in the factory contract.
  • On-chain time-weighted average price oracle of each of the trading pair is supported by snapshoting cumulative data on the first call of any block. Developers can choose different window size to achieve different TWAP data.
  • The trading fee is fixed to 0.3%, with all of fees going to liquidity providers (LP). There's a switch that factory admin can opt to turn on in future to direct 1/6 of the trading fees (i.e. 0.05%) to either treasury account or incentivized staking pool, determined by the governance process.
  • Flash swap is not supported, yet.