๐Ÿ›ก๏ธNative Smart Contracts

Below we provide the overarching logic for the operational functionality of all deployed Merlin Contracts on ZkSync

MerlinCoreโ€‹

The core consists of our custom built factory, a pool deployer, and the many pools the factory will create.

MerlinFactoryโ€‹

The factory defines the logic for generating pools. A pool is defined by two tokens, which make up the asset pair, and a fee. There can be multiple pools of the same asset pair, distinguished only by their swap fee.

MerlinPoolsโ€‹

Pools primarily serve as automated market makers for the paired assets. Additionally, they expose price oracle data and may be used as an asset source for flash transactions.

MerlinSwapRouterโ€‹

The swap router supports all the basic requirements of front-end offering trading. It natively supports single trades (x to y) and multihop trades (e.g. x to y to z).

NonfungibleMagic Position Managerโ€‹

The position manager handles the logic transactions involving the creation, adjustment, or exiting of positions for NFM and its layering onto existing LP's.

MerlinOracleโ€‹

The oracle provides price and liquidity data useful for a wide variety of system designs, and is available in every deployed pool. For Merlin, we utilize Chainlink's Data Oracle.

Last updated