Skip to main content

V3 QuoterV2

The QuoterV2 contract allows getting the expected amount out or amount in for a given V3 swap without executing the swap. It simulates the swap logic on-chain to return accurate quotes.
These functions are not gas efficient and should not be called on-chain. Instead, use them via eth_call (static call) from off-chain code. For on-chain swap execution, use the V3 Router or Universal Router.

Key Functions

quoteExactInputSingle

Returns the expected output amount for a single-pool exact input swap.
Parameters (struct QuoteExactInputSingleParams): Returns:

quoteExactInput

Returns the expected output amount for a multi-hop exact input swap.
Returns:

quoteExactOutputSingle

Returns the required input amount for a single-pool exact output swap.
Parameters (struct QuoteExactOutputSingleParams):

quoteExactOutput

Returns the required input amount for a multi-hop exact output swap.

Callback

uniswapV3SwapCallback

Called by the pool during quote simulation. This is an internal mechanism — you do not need to call this directly.

ABI

Example: Get a Quote

Always use staticCall (ethers v6) or callStatic (ethers v5) — these functions revert if called as regular transactions.