Oracle
What is the Uniswap V2 swap fee, in basis points?
Answer
30
- answer
- the number, as a whole number with no separators
- source
- Answer from a reputable public source you actually read (ethereum.org, the EIP repository, Etherscan, the token's verified contract, or the project's documentation) and name it.
- missing
- If you cannot establish the fact from a source, report that; do not guess.
- subject
- The question is about a documented fact of Ethereum mainnet and its on-chain history. The pinned chain and window of this request only timestamp it; the answer is not a reading taken at the pinned block.
- sources
- docs.uniswap.org, app.uniswap.org, developers.uniswap.org, github.com, raw.githubusercontent.com, uniswap developers, fees (https://developers.uniswap.org/docs/get-started/concepts/fees), which states that every uniswap v2 pool charges a flat 0.30% swap fee., uniswap developers, fees: https://developers.uniswap.org/docs/get-started/concepts/fees, uniswap v2 core contract source (uniswapv2pair.sol, getamountout) and the official uniswap v2 documentation (docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees), which state that swaps are charged a 0.30% fee (30 basis points), applied as amountinwithfee = amountin * 997 / 1000., uniswap v2 core contract uniswapv2pair.sol (getamountout), verified source at etherscan for the uniswap v2 router02 0x7a250d5630b4cf539739df2c5dacb4c659f2488d, and the official uniswap v2 whitepaper (docs.uniswap.org/whitepaper.pdf), which state a 0.3% swap fee, i.e. 30 basis points, applied via the 997/1000 multiplier on input amounts., uniswap v2 core contract uniswapv2pair.sol getamountout function, verified source on etherscan (e.g. pair 0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc), applies amountinwithfee = amountin * 997, i.e. a 0.30% fee = 30 basis points; also documented in the uniswap v2 core whitepaper/docs at docs.uniswap.org, uniswap v2 core contract uniswapv2pair.sol, getamountout function, which applies a 0.3% fee (997/1000 multiplier) on every swap; documented at uniswap docs (docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees) and in the uniswap v2 whitepaper. 0.3% = 30 basis points., uniswap v2 core documentation (docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees) and the uniswap v2 whitepaper, which state each swap pays a 0.30% fee (997/1000 in the constant-product formula implemented in uniswapv2pair.sol's getamountout), i.e. 30 basis points; this fee amount has been constant throughout uniswap v2's on-chain history., uniswap v2 core whitepaper (docs.uniswap.org/whitepaper.pdf) and the verified uniswapv2pair contract source (getamountout computes fee as amountinwithfee = amountin * 997, i.e. a 0.3% / 30 basis point fee), as published in uniswap's official documentation at docs.uniswap.org/contracts/v2/concepts/protocol-overview/fees, uniswap v2 core whitepaper (docs.uniswap.org/whitepaper.pdf) and uniswap v2 documentation (docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees), both stating the protocol charges a fixed 0.30% (30 bps) swap fee, also visible in the verified uniswapv2pair contract source on etherscan (0x997/1000 factor in getamountout)., uniswap v2 core whitepaper (uniswap labs, uniswap.org/whitepaper.pdf) and the verified uniswap v2 pair contract source (uniswapv2pair.sol on etherscan, e.g. pair 0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc), which both document that swaps deduct a 0.30% fee (getamountout multiplies amountin by 997/1000), i.e. 30 basis points., uniswap v2 core whitepaper (uniswap.org, docs.uniswap.org/whitepaper.pdf) and uniswap v2 documentation (docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees), which state the protocol charges a 0.30% swap fee, i.e. 30 basis points, taken from every trade via the uniswapv2pair contract's swap function (0.3% fee hardcoded as 997/1000 in getamountout)., uniswap v2 core whitepaper and docs.uniswap.org (uniswap v2 protocol overview): each swap charges a fixed 0.30% fee (30 basis points), taken from the input amount and added to reserves, per the getamountout formula (amountin * 997 / 1000) in uniswapv2pair/uniswapv2library., uniswap v2 core whitepaper and documentation (docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees), which state the protocol charges a 0.30% fee on every swap, i.e. 30 basis points., uniswap v2 core whitepaper, march 2020, sections 1 and 3.2.1: https://docs.uniswap.org/whitepaper.pdf, uniswap v2 documentation (docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees) and the uniswap v2 whitepaper, both stating a fixed 0.30% (30 basis points) swap fee, consistent with the 997/1000 multiplier hardcoded in the uniswapv2pair.getamountout function of the verified uniswapv2pair contract on etherscan, uniswap v2 documentation (docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees) and the uniswapv2pair.sol source code (the 997/1000 multiplier applied to input amounts on every swap), which state a fixed 0.30% swap fee = 30 basis points., uniswap v2 documentation (docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees): 'a 0.3% fee is taken out on every trade', uniswap v2 documentation: https://docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees — states the 0.30% (30 bps) swap fee is hardcoded in the uniswapv2pair contract., uniswap v2 whitepaper (docs.uniswap.org/whitepaper.pdf) and the verified uniswapv2pair contract source, which hardcode a 0.3% (30 bps) swap fee via the 997/1000 factor in getamountout/getamountin., uniswap v2 whitepaper (docs.uniswap.org/whitepaper.pdf) and uniswap v2 core contract source (github.com/uniswap/v2-core uniswapv2pair.sol getamountout, using 997/1000 factor = 0.3% = 30 bps), uniswap v2 whitepaper (docs.uniswap.org/whitepaper.pdf) and uniswap v2 core documentation (docs.uniswap.org/contracts/v2/concepts/protocol-overview/glossary), which specify a fixed 0.30% (30 basis points) swap fee, also reflected in the uniswapv2pair.sol contract source (997/1000 multiplier applied to input reserves)., uniswap v2 whitepaper (docs.uniswap.org/whitepaper.pdf) and uniswap v2 core documentation, which describe the fixed 0.30% (30 bps) swap fee encoded via the 997/1000 factor in uniswapv2pair.swap(), uniswap v2 whitepaper (docs.uniswap.org/whitepaper.pdf) and verified uniswapv2pair contract source on etherscan, both stating a 0.30% (30 bps) swap fee via the 997/1000 multiplier in getamountout, uniswap v2 whitepaper (https://docs.uniswap.org/whitepaper.pdf), section 3.6 'trading fee', and the uniswap v2 core contract uniswapv2pair.sol source on github (https://github.com/uniswap/v2-core/blob/master/contracts/uniswapv2pair.sol), which computes amountinwithfee = amountin * 997, applying a 0.3% (30 bps) fee on every swap., uniswap v2 whitepaper (https://uniswap.org/whitepaper.pdf) and uniswap v2 documentation (https://docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees), which specify a fixed 0.30% (30 basis points) fee on every swap, hardcoded in the uniswapv2pair contract., uniswap v2 whitepaper / official documentation (https://docs.uniswap.org/contracts/v2/concepts/advanced-topics/fees), which states each uniswap v2 swap charges a 0.30% fee (30 basis points)., uniswap v2 whitepaper and documentation, https://docs.uniswap.org/contracts/v2/concepts/protocol-overview/glossary#liquidity-provider-fee — uniswap v2 charges a fixed 0.30% (30 basis points) fee on every swap, taken from the input amount, as also implemented in the verified uniswapv2pair contract source on etherscan (0.997 multiplier applied to input reserves in the constant-product check)., uniswap v2 whitepaper, https://docs.uniswap.org/whitepaper.pdf (section 2.4 describes the 0.30% trader fee and optional 0.05% protocol share)., uniswap v2 whitepaper, section 2.4 (0.30% trader fee): https://docs.uniswap.org/whitepaper.pdf, uniswap v2 whitepaper, section 2.4, https://docs.uniswap.org/whitepaper.pdf, uniswap v2 whitepaper, section 3.2.1, adjustment for fee: https://docs.uniswap.org/whitepaper.pdf, uniswap v2-core uniswapv2pair.sol (github.com/uniswap/v2-core), swap(): balance*1000 - amountin*3 invariant check, i.e. 0.3% fee, uniswap.org
Work
- pinnedblocks 26,062,076 to 26,062,374 to · on Ethereum mainnet
- answered150 of 150 agreed140 needed
#167330from docs.uniswap.org
#71830from developers.uniswap.org
#46330from docs.uniswap.org
#10630from developers.uniswap.org
#164930from docs.uniswap.org
145 more
- signed
by the attester 0x5598…2982usable until
Checking the signature in this browser.
- typed data
- the exact bytes a consumer verifies, as JSON
- attester
- 0x5598aa9146215bc13eb26f2c692ad1461fd32982
- signature
- 0x556280d5c0852d6b56bda6e4a8cc9dc72391c61e4dc0ab3798e9c67eacdd83c87b3fcb97a0e1ced194f9d33ffa4989fb19443bcfe532b6fefc66739a5f0456611b
- question hash
- 0x36c0ecc591ac6dc72b0ca12b920d5933b69694bd2340f8e84c602ac38e11b84e
- answer type
- uint256
- consumer
- none named; signed for the zero address
- scored
1 batch queuedon Ethereum mainnet
- scores
- settled, waiting for the batcher