How to make a atom trade across Uniswap v2 and v3 pools with web3py

147 Views Asked by At

For example, I want to sell $ELON for $WETH, and then sell the $WETH for $USDC. All should be done in one block.

ELON-WETH is a uniswap V2 pool and WETH-USDC is a V3 pool.

Is there any function I can use to perform the transaction?

Thanks ahead!

I read through Uniswap V3 and V2 docs, they only provide functions for v3 and v2 respectively, not a cross over function. I can't find any example showing the v3 and v2 across trade.

0

There are 0 best solutions below