MERLIN
  • 🪄Overview
  • Starting on ZkSync
    • 💜Introducing ZkSync
      • 📚Getting started on zkSync
    • 🔮Starting on Merlin
      • 🛣️Platform Feature Guides
      • ✨Begin Lodging Liquidity
  • Protocol
    • ⚡Dynamic AMM
      • 🤝Custom Fees & Referrals
    • 💫Non-Fungible-Magic
    • ⚗️Cauldron Pools
    • 👨‍🌾Core Farming Pools
    • 🧙‍♂️MAGE Token
    • ⚜️stMAGE Token
      • 🔓Staked Mage Vesting
  • Contract Base
    • 🛡️Native Smart Contracts
  • Community Roundtable
    • 🔁Token distribution & Vesting
    • 🧯Techniques of Deflation
    • ❔Key Protocol Links
Powered by GitBook
On this page
  1. Contract Base

Native Smart Contracts

PreviousStaked Mage VestingNextToken distribution & Vesting

Last updated 2 years ago

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.

🛡️
​
​
​
​
​
​