Swap & Add liquidity on 🦄 Uniswap programatically
A Quoter contract in Uniswap V3 is a smart contract that provides price quotes for token trades on the Uniswap decentralized exchange. When a user wants to trade tokens on Uniswap V3, the Quoter contract calculates the expected price of the trade based on the current reserves of the tokens in the relevant liquidity pool.
The Quoter contract takes into account the amount of tokens being traded, the prices of the tokens, and the liquidity of the pool, among other factors. The result is an estimated price for the trade that takes into account the slippage that may occur due to the trade's impact on the pool's liquidity.
The Quoter contract is used in conjunction with the Uniswap V3 Swap contract, which executes the actual trade between the tokens. By providing accurate price quotes, the Quoter helps ensure that users receive fair and transparent pricing for their trades on the Uniswap V3 exchange.