ZetariumDocs

Zet Swap

High-performance liquidity aggregator for optimised spot execution

Document Version: 2.0
Last Updated: January 2026
Smart Contract Version: Solidity ^0.8.24
MiCA-Aligned Disclosure


Abstract

The Zet Swap module aggregates liquidity across decentralised exchanges to optimise spot trade execution. It primarily serves as infrastructure support for the Zetarium ecosystem.

Disclaimer: This document is for informational purposes only. Zet Swap does not provide investment advice, guarantees, or custodial services.


1. Executive Summary

Liquidity fragmentation in the DeFi ecosystem makes it difficult for users to obtain the best prices and increases transaction costs. Zet Protocol is a high-performance liquidity aggregator solution developed to solve this problem.

At the heart of the protocol lies the Zet Executor, an advanced smart contract architecture that securely and efficiently executes complex swap operations in a single atomic transaction.

Access Zet Protocol at zetarium.world/swap for instant token swaps with the best rates.


2. Introduction

Zet Swap Interface

Decentralized Exchanges (DEXs) are the cornerstone of the blockchain ecosystem. However, each DEX operates its own liquidity pools, leading to price discrepancies across exchanges.

2.1 The Problem

IssueImpact
Fragmented LiquidityBest prices scattered across multiple DEXs
High SlippageLarge trades cause significant price impact
Complex RoutingUsers can't easily find optimal swap paths
Multiple TransactionsManual multi-hop swaps cost more gas
Time-ConsumingComparing prices across DEXs takes effort

2.2 The Zet Protocol Solution

Zet Protocol offers an integrated structure that:

  • Finds the deepest liquidity across all supported DEXs
  • Minimizes slippage through intelligent routing
  • Optimizes transaction fees on behalf of the user
  • Executes complex swaps in a single atomic transaction

The system primarily supports major protocols:

ProtocolVersion SupportNetwork
PancakeSwapV2 & V3BSC
UniswapV2 & V3Ethereum, Arbitrum, Polygon

3. System Architecture

Zet Protocol employs a hybrid architecture. The server side handles the computational load, while the blockchain side guarantees asset security and transaction finality.

3.1 Two-Component System

ZET PROTOCOL ARCHITECTURE

USER REQUEST
"Swap 1 BNB → USDT"

ZET API (OFF-CHAIN)
+- 1. Data Aggregation
|     • Fetch pool reserves from all DEXs
|     • Monitor gas prices in real-time
|     • Track token prices and liquidity depth
+- 2. Route Optimization
|     • Graph theory algorithms
|     • Multi-hop path discovery
|     • Slippage calculation
+- 3. Calldata Generation
      • Generate transaction data
      • Prepare Zet Executor instructions

ZET EXECUTOR (ON-CHAIN)
+- PULL: Get tokens from user
+- APPROVE: Grant DEX permission
+- CALL: Execute swap on optimal Router
+- FLUSH: Return all tokens to user

USER RECEIVES
USDT in wallet

3.2 Zet API (Intelligent Routing)

The server side continuously monitors blockchain data (token lists, pool reserves, gas prices). When a user initiates a swap:

StepProcess
1. Data AggregationReal-time price information is fetched from whitelisted DEX pools
2. Route OptimizationUsing graph theory algorithms, the most efficient path is calculated
3. Calldata GenerationTransaction data is generated for the selected route

3.3 Zet Executor (Smart Contract)

The Zet Executor is the muscle of the system. It is a specialized Solidity contract that manages assets with user authorization.

Core Functions

FunctionDescription
PullTransfers tokens from the user's wallet to the contract
ApproveGrants temporary approval to relevant DEX Routers
CallForwards the transaction to whitelisted secure targets
FlushReturns output tokens and residual balances to the user

4. Technical Specifications & Security

4.1 Supported Protocols & Whitelisting

ProtocolSupportDescription
PancakeSwapV2 & V3Full support for routers on BSC
UniswapV2 & V3Full support for routers on Ethereum
Target WhitelistStrictCall execution fails if target is not whitelisted

4.2 Security Layers

Security LayerDescription
Reentrancy GuardOpenZeppelin's standard protection against reentrancy attacks
Ownable2StepProtocol management protected by two-step verification
Target WhitelistOnly verified DEX routers can be called
Dust ProtectionOnly positive balance difference transferred to user

4.3 Fee Mechanism

ParameterValue
Configurable RateLow service fee (e.g., 0.03% - 3 bps)
Auto-DeductionFee automatically deducted from output token
Fee RecipientDirected to FeeRecipient address
TransparencyUser sees net amount before transaction

There are no hidden fees. The user always sees the exact amount they will receive before confirming the transaction.


5. Workflow

Step-by-Step Breakdown

StepActionDetails
1.User RequestUser requests "1 BNB → USDT" via interface
2.API ResponseZet API scans pools, finds best price, prepares execute code
3.SignatureUser approves transaction in wallet
4.ExecutionZet Executor pulls tokens, swaps, and returns output
5.ResultUser receives USDT balance in wallet

6. Multi-Hop Routing

6.1 Why Multi-Hop?

Sometimes the direct swap path isn't the most efficient. Multi-hop routes can provide:

  • Better prices through deeper liquidity pools
  • Lower slippage on large trades
  • Access to tokens without direct pairs

6.2 Example

Direct Route (Higher Slippage):
ZET → CAKE (2.5% slippage, low liquidity)

Multi-Hop Route (Optimized):
ZET → USDT → CAKE (0.2% total slippage)

Result: 12.5x better execution

7. Future Vision

7.1 New Chains

ChainStatus
Ethereum✅ Live
BNB Smart Chain✅ Live
Arbitrum🔜 Coming Soon
Polygon🔜 Coming Soon
Optimism📅 Planned
Base📅 Planned

7.2 Additional DEX Protocols

ProtocolTypeStatus
PancakeSwapAMM✅ Live
UniswapAMM✅ Live
CurveStable AMM🔜 Coming Soon
BalancerWeighted Pools📅 Planned

7.3 Cross-Chain Swaps

Future versions plan to include Cross-Chain swap features, allowing users to swap tokens between different blockchains in a single transaction.


8. Resources


Risk Disclosure

Usage Risks

Risk CategoryDescription
Smart Contract RiskDespite audits, vulnerabilities may exist
Slippage RiskActual execution price may differ from expected
Liquidity RiskInsufficient liquidity may impact execution
Network RiskBlockchain congestion may delay transactions

Important Disclaimers

  • Zet Swap provides no guarantees regarding swap outcomes
  • Usage does not constitute investment advice
  • Users should verify swap parameters before confirming
  • Always check token addresses to avoid scams

MiCA Compliance Note: This document is provided for informational purposes only and is structured to align with the disclosure, neutrality, and risk transparency principles set out under the Markets in Crypto-Assets Regulation (MiCA).


This documentation is provided for informational purposes only. Zet Swap does not provide investment advice, guarantees, or custodial services.

On this page