Zenlink
WebsiteTwitterBlogCommunity
  • What is Zenlink
  • FAQ
  • Zenlink DEX Protocol
    • Architecture
    • Interface
    • Zenlink Development Kit
    • Module
    • WASM
    • EVM
  • ZENLINK DEX DAPP
    • User Guide
      • Install PolkadotJS
      • Install MetaMask
      • Add Network
      • Bridge (AnySwap/Bifrost for example)
      • Using Zenlink DEX
        • New APP
        • Old APP
      • Yield/Farming
      • Invite to Earn (Suspended)
    • X-Transfer
    • Bootstrap
    • Farming Mechanism
    • Mega Aggregator
      • Referral Program
      • Smart Order Routing
      • Integration Doc
    • Hybrid AMM
  • Zenlink Eden
    • Introduction
    • FAQ
    • Protocol Mechanisms
      • Glossary
      • Yield Tokenization
        • SY
        • Mint
        • PT
        • YT
      • Tokenomics, veZLK, Fees
        • Tokenomics
        • veZLK
        • Fees
    • User Guide
      • Yield Strategies
      • App Guide
        • Swap
        • Mint
        • Liquidity (Add & Remove)
        • veZLK (Lock & Vote)
        • Boost & Claim
  • RESOURCES
    • Github
    • Contracts
    • Public API
    • Whitepaper
    • Tokenomics
    • Roadmap
    • Audit Report
    • Glossary
  • Ecosystem
    • Token Distribution
    • Buyback
    • Bug Bounty Program
    • Web3 Foundation Grants Program
    • Zenlink Ambassador Program
    • Zenlink Community NFT
    • DAO Governance
    • Partnership
    • Community
    • Hiring
Powered by GitBook
On this page

Was this helpful?

  1. Zenlink DEX Protocol

EVM

PreviousWASMNextUser Guide

Last updated 3 years ago

Was this helpful?

The Ethereum Virtual Machine () has the pole position among blockchain developers. The EVM is what enables Ethereum to run smart contracts. Many parachains implement and import EVM pallets. The purpose is quite simple: migrate Ethereum projects to Polkadot seamlessly.

Zenlink aims to help parachains in the ecosystem by offering them a simple way to implement dex functionalities. So, writing EVM smart contracts with an EVM pallet is an effective way to deploy features. The benefit of this method is that people compile and deploy the smart contract to the parachain's EVM pallet, rather than modify the source code of the parachain.

The EVM smart contract consists of two parts: Exchange and Factory.

The Exchange contract is the core of the ZenLink Dex Protocol. It implements the following interfaces:

  • Initializing token trading pairs.

  • Token swaps.

  • Adding/extracting liquidity.

  • Defining the liquidity constant function used throughout the protocol.

The Factory contract can be used to create exchange contracts for any ERC20 token that does not already have one. It also functions as a registry of ERC20 tokens that have been added to the system, and the exchange with which they are associated.

For more setup and test details, please find EVM smart contract repo on the following page:

EVM
Github