Skip to main content
Version: V1

Overview

Bootstrapping a project#

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.

Overview#

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:

  • Factory contract for pool creation
  • Router contract for liquidity provision, querying token rates and executing token swaps
  • Pool contract for fetching specific pool information, such as the trade fee to be charged and amplification factor