⚙️ 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#
AMMThe 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 TokensThe LPToken.sol
contract handles the implementation of the LP Token. The LP Token for all different pools implement the ERC1155 standard.
#
MasterChefThe MasterChef.sol
contract handles incentive rewards for liquidity providers who stake their LP Tokens in the MasterChef contract.
#
AMMRegistryThe AMMRegistry.sol
acts both as a data store to map futures to their corresponding AMM instance, along with a whitelist of official pools.