第16章:UniswapV2解析

参考

项目学习

  • Part 1, architecture of UniswapV2, adding liquidity, first tests in Solidity, removing liquidity.
  • Part 2, tokens swapping, re-entrancy attacks and protection, price oracle, integer overflow and underflow, safe transfer.
  • Part 3, factory contract, CREATE2 opcode, Router contract, Library contract
  • Part 4, LP-tokens burning bug, liquidity removal, output amount calculation, swapExactTokensForTokens, swapTokensForExactTokens, fixing swap fee bug, flash loans, fixing re-entrancy vulnerability, protocol fees
  • 代码:https://github.com/Jeiwan/zuniswapv2

白皮书