Skip to main content

⚙️ AMM Architecture Overview

This section details the AMM contract architecture. To understand the motivations behind the AMM architecture please refer to the AMM overview page.

Main contracts#


The AMM.sol contract is the main contract that controls the logic of the pools. It is the contract the traders and LPs interact with to swap, add and remove liquidity.

LP Tokens#

The LPToken.sol contract handles the implementation of the LP Token. The LP Token for all different pools implement the ERC1155 standard.


The MasterChef.sol contract handles incentive rewards for liquidity providers who stake their LP Tokens in the MasterChef contract.


The AMMRegistry.sol acts both as a data store to map futures to their corresponding AMM instance, along with a whitelist of official pools.