🔬
JediSwap
  • 👋Welcome to JediSwap
  • 🛠️Become a contributor
  • 🎁DeFi spring STRK incentives for v2
  • 🎁DeFi Spring STRK incentives for v1
  • FAQ
  • How to use JediSwap
    • How to set up a Starknet wallet
      • How to set up an Argent X wallet
      • How to set up an Argent Web Wallet
      • How to set up a Braavos wallet
    • How to bridge assets to Starknet
      • How to bridge to Starknet using Starkgate
      • How to bridge to Starknet using Orbiter Finance
      • How to bridge to Starknet using LayerSwap
    • How to make a swap
    • How to add liquidity
      • How to add liquidity V1
      • How to add liquidity V2
    • How to ZAP
      • How to ZAP from Ethereum L1 to Starknet
      • How to ZAP on Starknet
    • Points
      • LP Leaderboard
      • Volume Leaderboard
  • For Developers
    • Jediswap v2
      • Core
        • jediswap_v2_factory
        • jediswap_v2_pool
      • Periphery
        • jediswap_v2_nft_position_manager
        • jediswap_v2_swap_router
      • Contract Addresses
      • Deprecated Contract Addresses
    • Jediswap v1
      • Smart Contract integration
        • Implement a swap
        • Providing liquidity
        • Pair Addresses
      • Smart contract reference
        • Router
        • Pair
        • Factory
        • Pair (ERC 20)
  • Risks associated with JediSwap
Powered by GitBook
On this page
  • Overview
  • Core
  • Periphery
  1. For Developers

Jediswap v2

PreviousVolume LeaderboardNextCore

Last updated 12 months ago

Overview

JediSwap V2 is a Cairo fork of Uniswap V3. The smart contract system comprises of many libraries, which together make the Core and Periphery.

Core contracts provide fundamental safety guarantees for all parties interacting with JediSwap. They define the logic of pool generation, the pools themselves, and the interactions involving the respective assets therein.

Periphery contracts interact with one or more Core contracts but are not part of the core. They are designed to provide methods of interacting with the core that increase clarity and user safety.

External calls will primarily call the periphery interfaces. Externally available functions are all viewable in the reference documentation. Internal functions are viewable on the JediSwap V2 Github repo.

Core

The core consists of a factory and a pool deployer contract. The factory creates the pools.

Factory

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.

Pools

Pools primarily serve as automated market makers for the paired assets.

Periphery

The periphery is a constellation of smart contracts designed to support interactions with the core. As the protocol is a permissionless system, the contracts described below have no special privileges and are only a small subset of possible periphery-like contracts.

SwapRouter

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

NFT Position Manager

The position manager handles the logic transactions involving the creation, adjustment, or exiting of positions.

Core Source Code
Factory Reference
Pool Reference
Periphery Source Code
Swap Router Reference
NFT Position Manager Reference
Swap Router Interface
NFT Position Manager Interface