It is likely that you will be using other DeFi protocols like Synthetix and Aave for lending purposes. Hence, to avoid having to deploy these protocols from scratch, and to best simulate mainnet conditions, we recommend using Hardhat's mainnet forking feature.
As there are possibly multiple pools per token pair, the first step is to fetch pool addresses and determine which pool is most suitable for querying swap rates, trade execution and liquidity provision.
Traders and arbitrageurs who need to take liquidity should view the section on swap execution.
The section on providing liquidity will guide liquidity providers through the process of adding and removing liquidity.
Generally, the contracts of interest are the following: