Transcription of Uniswap v2 Core
{{id}} {{{paragraph}}}
Uniswap v2 CoreHayden 2020 AbstractThis technical whitepaper explains some of the design decisions behind the Uniswapv2 core contracts. It covers the contracts new features including arbitrary pairsbetween ERC20s, a hardened price oracle that allows other contracts to estimate thetime-weighted average price over a given interval, flash swaps that allow traders toreceive assets and use them elsewhere before paying for them later in the transaction,and a protocol fee that can be turned on in the future. It also re-architects the contractsto reduce their attack surface. This whitepaper describes the mechanics of Uniswap v2 s core contracts including the pair contract that stores liquidity providers funds andthe factory contract used to instantiate pair IntroductionUniswap v1 is an on-chain system of smart contracts on the Ethereum blockchain, imple-menting an automated liquidity protocol based on a constant product formula [1].
Speci cally, prices at a given moment are stored as UQ112.112 numbers, meaning that 112 fractional bits of precision are speci ed on either side of the decimal point, with no sign. These numbers have a range of [0, 2112 41] and a precision of 1 2112. The UQ112.112 format was chosen for a pragmatic reason | because these numbers can
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}