Skip to content

An updated version of Uniswap V2 using Solidity 0.8.20, best practices & standards ||| OpenZeppelin : reentrancy guards & safeERC20, Solady: fixedPointMath, math & ERC20 ...

Notifications You must be signed in to change notification settings

Torof/Uniswap_V2_rebuild

Repository files navigation

Updating UniswapV2

  • using solidity 0.8.25
  • using IERC20 + solady ERC20
  • changing reentrancy guard to OpenZeppelin's
  • replace Uniswap fixed point numbers with custom data types
  • remove safeMath, not needed with 0.8+
  • replacing square rot function (beware of rounding)
  • change adequate storage variables to Immutable
  • replacing require with custom errors
  • adding unchecked in price oracles (expected to overflow)

Important concepts :

  • TWAP:

  • AMM:

  • constant:

  • impermanent loss:

  • fixed poin numbers & rounding (in favour of the contract):

About

An updated version of Uniswap V2 using Solidity 0.8.20, best practices & standards ||| OpenZeppelin : reentrancy guards & safeERC20, Solady: fixedPointMath, math & ERC20 ...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published