Skip to main content

Protocol Overview

Kroko DEX is a decentralized exchange on the Kasplex blockchain that combines two proven AMM models — V2 (constant product) and V3 (concentrated liquidity) — under a unified routing layer.

Architecture

Components

ComponentRole
V2 PoolsConstant-product AMM (x * y = k). Simple, gas-efficient, full-range liquidity.
V3 PoolsConcentrated liquidity AMM. LPs choose a price range, improving capital efficiency.
Universal RouterExecutes swaps across V2 and V3 in a single transaction. Supports multi-hop and split routes.
Permit2Token approval manager. Users approve tokens once to Permit2, then grant per-spender permissions with expiration.
Swap APIOff-chain routing engine that finds optimal paths and generates transaction calldata.

How a Swap Works

  1. Approve — User approves their token to the Permit2 contract (one-time per token)
  2. Permit — User grants the Universal Router permission via Permit2 (one-time per token)
  3. Quote — Frontend requests an optimal route from the Swap API
  4. Calldata — Frontend requests encoded transaction data from the Swap API
  5. Execute — User sends the transaction to the Universal Router
The routing engine automatically selects the best path — single-hop or multi-hop, V2 or V3 or mixed — based on available liquidity and price impact.

V2 vs V3

FeatureV2V3
Liquidity rangeFull range (0 to infinity)Custom price range
FeeFixed 0.3%Selectable: 0.01%, 0.05%, 0.3%, 1%
LP tokenFungible ERC-20Non-fungible ERC-721 (NFT)
Capital efficiencyLowerHigher (up to 4000x for narrow ranges)
ComplexitySimpleAdvanced
Best forStable pairs, passive LPsActive LPs seeking higher returns

Native Token

Kasplex’s native currency is KAS (18 decimals). Since AMM contracts require ERC-20 tokens, KAS is wrapped as WKAS for on-chain operations. The Universal Router handles wrapping and unwrapping automatically — users interact with native KAS directly. See Native Token Handling for details.