Outline
Warning
Zenswap is currently under active development. Features, functionality, and documentation are subject to change as we refine and improve things. While we strive to maintain consistency, there may be updates or adjustments in the future. We recommend checking back regularly for the latest information and updates. Thank you for your understanding and support!
Overview
Zenswap is a cross-chain swap solution that leverages USDC routing to provide users boundless liquidity as they swap native assets across different blockchains and networks. It is powered by Analog GMP and Circle CCTP, which abstract away the complexity of cross-chain interactions, offering users a seamless and secure way to exchange native assets across different chains. Currently, Zenswap sources liquidity from major DEXs, such as Uniswap, and supports developers in integrating its functionality into custom smart contracts. Future iterations aim to be DEX-agnostic, supporting native token swaps across multiple chains.
Features
Capital efficiency: Zenswap addresses the DeFi market’s “liquidity fragmentation” challenge by pairing all other assets within the protocol with USDC, a foundational routing layer. This approach improves capital efficiency, minimizes slippage, and attracts and retains liquidity from competitive market makers. For more details, see “Liquidity Management”.
Boosted Liquidity/Turbo Service: Zenswap’s novel Turbo Service, developed by Analog, enables cross-chain swaps to be settled in near-instant time, significantly enhancing efficiency and UX. Check out “Turbo Service” for more info.
Composability: Zenswap is a fully composable solution, meaning you can append extra logic to the asset transfer logic on the target blockchain. Imagine unstaking on chain A and then transferring the unstaked asset to chain B to use as collateral for a loan. Check out “SDK Quickstart” & “API Quickstart” to get started.
Optimized route selection: Algorithm evaluates routes based on fees, speed, and liquidity, including Turbo Service availability. For more details, see “Route Selection”.
Real-time transaction transparency: Users track swap progress through detailed status updates (e.g., SourceSwap, USDCburn, Completed). See “Transaction Status Tracking”.
Supported Blockchains & Assets
Blockchains
Blockchain | Network(s) |
---|---|
Ethereum | Sepolia |
Astar | Shibuya |
BNB Smart Chain (BSC) | Binance Testnet |
Polygon | Polygon Amoy |
Assets
Zenswap uses USDC as the default pairing for all its liquidity pools, leveraging DEXs to perform native swaps on the supported blockchains. Initially, Zenswap will integrate Uniswap for this functionality, meaning the protocol supports the same tokens as Uniswap. View the list of Uniswap supported tokens.
Getting Started
Zenswap offers three primary tools for cross-chain swaps:
- Zenswap App: A user-friendly dApp for seamless cross-chain swaps. The testnet version is live at https://testnet.zenswap.io/#/swap
- Zenswap SDK: A developer toolkit to integrate cross-chain swaps into custom dApps. For more details, see SDK Quickstart.
- Zenswap API: Enables programmatic access to Zenswap’s routing, liquidity, and swap execution. For more details, see API Quickstart.
Quickstart Guide
For Developers
Zenswap provides developer toolkits (SDK and API) to integrate cross-chain native swaps into your dApps.
SDK Quickstart
Prerequisites:
- Node.js v18+
- Wallet with testnet funds.
Steps:
- Installation/setup:
// Installation/setup code placeholder
- Initialize swap/Example swap:
// Initialize/Example swap code placeholder
API Quickstart
Endpoint: POST /api/v1/swap
Request:
// Request Body placeholder
{
"sourceChainId": "",
"destinationChainId": "",
"sourceTokenAddress": "",
"destinationTokenAddress": "",
"amount": "",
"recipientAddress": "",
"slippageTolerance": 0.005, // Example: 0.5%
"useTurbo": false // Optional: set to true to try Turbo Service
}
Response:
// Response Body placeholder
{
"transactionId": "",
"status": "Initial",
"estimatedCompletionTime": ""
// ... other relevant details
}
For Users
- Visit Zenswap Testnet.
- Connect your wallet (e.g., MetaMask).
- Select source/destination chains and tokens.
- Review swap details (fees, slippage, estimated time).
- Confirm and execute the swap.
Using Turbo Service:
- Select “Boost Mode” during route selection if liquidity is sufficient on the destination chain.
- Confirm transaction for high-speed execution.
Using Zenswap
Connecting Your Wallet
- Launch the Zenswap Testnet.
- Click “Connect wallet”
- Select your preferred wallet provider and follow the prompts.
Swapping via Zenswap App
- Connect Wallet:
- Click “Connect Wallet” and authorize.
- Select Chains/Tokens:
- Choose source/destination chains (e.g., Ethereum → Polygon).
- Select tokens (e.g., ETH → MATIC).
- Review Details:
- Before confirming a swap, review these important details by clicking on the Settings button:
- Check slippage tolerance, transaction deadline, and transaction fee.
- Slippage tolerance: Maximum acceptable price change
- Transaction deadline: Expected completion time
- Transaction fee: Fee deducted for cross-chain transaction
- Enter the recipient’s address (if it’s different from the sender’s address).
- Enable Turbo Service (if available and desired).
- Select the route for your swap transaction (see Route Selection).
- Check slippage tolerance, transaction deadline, and transaction fee.
- Before confirming a swap, review these important details by clicking on the Settings button:
- Execute Swap:
- Confirm the transaction in your wallet.
Route Selection
- When you select tokens and chains, Zenswap calculates optimal routes for your swap. Each route option displays:
- Approximate time: Expected completion time.
- Approximate fees: Fee deducted for the cross-chain transaction.
- Chain path details: Details about the chains involved.
- If available, Turbo Service will appear as an additional option.
- Select your preferred route option and click “Swap.”
Swapping Basics
Overview
Zenswap's native cross-chain functionality operates on a “fire-and-forget” basis, requiring no further user interaction after initiating a swap. The swapping process starts when users deposit their tokens on the origin blockchain. The protocol uses Analog GMP and Circle CCTP to make cross-chain swaps more secure and efficient.
Whenever funds are deposited on the origin chain, Analog GMP and Circle CCTP witness the deposit event and subsequently relay the information to the destination chain, where the tokens are swapped to the corresponding assets.
Key Concepts
Native Cross-Chain Swap
Refers to exchanging one native token (e.g., ETH on Ethereum) for another token (e.g., BNB on BNB Chain).
Note
Note that the exchanging native tokens reside on different blockchains.
Zenswap leverages USDC as a routing layer to facilitate swaps across supported blockchains. For example, if Alice wants to swap native ETH on the Ethereum for BNB on the BNB Chain, here’s how the Zenswap protocol will enable the swap (using the classic service):
Example 1 (Classic Service): MATIC to BNB Swap
- Your token (MATIC) on the source chain (Polygon) is swapped to USDC.
- The USDC is burned via Circle CCTP on Polygon.
- The burn parameters are transferred to the destination chain (BNB Chain) via Analog GMP.
- USDC is minted on the BNB Chain.
- The USDC is swapped to your desired token (BNB).
- BNB is sent to your wallet on the BNB Chain.
Example 2: ETH to ARB Swap with Turbo Service
Bob wants to quickly swap ETH on Ethereum for ARB on Arbitrum with Turbo Service enabled:
- Bob deposits ETH into Zenswap's contracts on Ethereum.
- The protocol swaps ETH to USDC on Ethereum.
- With Turbo Service, an LP instantly provides USDC on Arbitrum.
- The USDC is immediately swapped to ARB on Arbitrum.
- Bob receives ARB in his wallet almost instantly.
In the background, the normal Analog GMP and CCTP process completes and replenishes the LP’s funds.
Liquidity Management
The defining idea of Zenswap is boundless liquidity: liquidity that allows users to swap any amount of USDC without experiencing slippages. Unlike other protocols constrained by limited liquidity pools, Zenswap, supported by Circle CCTP, utilizes a common base pair for all pools. This novel approach minimizes liquidity fragmentation and significantly reduces overall slippages.
Transaction Finality
Transaction finality denotes the irreversible point at which a transaction is deemed final on the blockchain. The degree of finality varies across blockchains, with some offering instant finality while others require multiple confirmations.
This disparity in finality can cause delays during cross-chain swaps, particularly for blockchains like Ethereum, often resulting in substantial waiting periods. For Zenswap, the duration of the swap largely depends on the finality time of the origin chain for classic (i.e., non-Turbo) transactions.
Analog GMP and Circle CCTP prioritize security by delaying the minting process on the destination chain until the burning process on the source chain is definitively confirmed, thus mitigating the risk of chain reorgs.
Fees
TBD
Turbo Service
This is Zenswap’s unique speed-enhancing feature, which allows users to execute high-speed cross-chain swaps. It leverages liquidity providers (LPs) that provide short-term loans, enabling the protocol to fulfill transaction requests optimistically as soon as users complete their transactions on the origin chain.
When you use Turbo Service:
- Your source chain token is swapped to USDC.
- A liquidity provider instantly provides USDC on the destination chain.
- The destination chain immediately swaps USDC to your target token.
- You receive your tokens almost instantly.
- The normal CCTP mint process completes in the background and replenishes the LP’s funds.
How Swapping Works
A general description of the swap process can be described as follows:
Step 1: Initiation of the swap
You can accomplish this step via three methods:
- Zenswap App.
- Zenswap SDK. See Zenswap SDK for more details.
- Zenswap API. See Zenswap API for more details.
Step 2: Attestation of the deposit event
Analog GMP and Circle CCTP monitor the deposit event on the source chain’s relevant gateways. Upon witnessing a deposit for a swap, the transaction is registered on the Timechain and Circle’s Attestation Service.
Note that a delay exists between the initial deposit and its subsequent confirmation on these services. For further information, refer to the section on “Transaction Finality”.
Step 3: Processing the swap
Once the swap is witnessed and validated, it is ready to be executed by the Zenswap protocol. For more details, check out “Architectural Components” and “Transaction Lifecycle”.
Technology
The Zenswap tech stack can be broken down into two key pieces: Analog GMP and Circle CCTP.
Analog GMP
Zenswap’s cross-chain framework relies heavily on Analog GMP, a secure and reliable infrastructure that enables seamless messaging between various supported blockchains.
Workflow:
- Submit message (source chain).
- Relays the message via Timechain shards.
- Executes the message (destination chain).
Note
Analog GMP enhances Circle CCTP by automating USDC transfers, eliminating the need for end-user redemptions and gas payments on destination chains. It also provides tools for troubleshooting failed transactions, improving both UX and security. For more details, check out the Analog GMP docs.
Circle CCTP
Circle CCTP enables native cross-chain transfers through a burn-and-mint process, where USDC is burned on the originating chain and then minted on the target chain, providing a secure and efficient way to transfer value.
Workflow: Burn → Attest → Mint.
- A user burns USDC on the source chain.
- Circle Attestation Service observes and attests to the burn event.
- Any user or third party relays the message and attestation to the target blockchain.
- A user receives minted USDC on the target chain.
Architectural Components
The Zenswap protocol comprises various components spread across both on-chain and off-chain systems, as illustrated in the figure below:
See below for a detailed overview of their operation:
- Actor (User): Initiates the cross-chain swap request.
- Router Contracts: Main contract handling the routing of swaps on source and destination blockchains. Interfaces with Circle’s CCTP contract for burning and minting USDC.
- Analog Gateway Smart Contracts (GSCs): Facilitates cross-chain operations by receiving and processing swap requests from the Router Contract.
- Chronicles Shards: These are off-chain entities that listen for gateway events, validate TSS, and relay events to the Timechain.
- Task Queue–Timechain: Part of the Timechain, responsible for event handling and task management.
- Circle (CCTP Contract): Manages the burning and minting of USDC tokens during cross-chain swaps.
- Global Router–Off-chain: Calculates potential swap routes off-chain for scalability.
- Timechain: Maintains a record of transactions and events within the ledger.
Transaction Lifecycle
- User initiation:
- Specify the source token/chain and target token/chain.
- The app estimates gas fees for all transactions in the route.
- Source Chain Operations:
- Initial token swap: The Router Contract converts your source token to USDC on the source chain.
- USDC Burn: The Router Contract requests the Circle (CCTP) contract to burn the USDC on the source chain.
- Cross-Chain Transmission: The Router Contract activates the Analog Gateway Contract to handle the cross-chain transaction. Timechain Shards capture this event and relay it to the Timechain Task Queue.
- Destination Chain Operations:
- Event Capture: Timechain Shards on the destination chain capture the event from the Timechain and forward it to the Analog Gateway Contract.
- USDC Minting: The Router Contract requests Circle (CCTP) to mint an equivalent amount of USDC on the destination chain.
- Final Token Swap: The Router Contract exchanges the minted USDC for your target token using the selected DEX.
- Completion: The target token is delivered to your destination wallet address.
Developers
Transaction Status Tracking
As your swap progresses, you'll see these status updates (visible via API/SDK or Explorer):
- Initial: Transaction submitted
- SourceSwap: Token A successfully swapped to USDC
- USDCBurn: USDC burned on the source chain
- MintPending: Awaiting USDC mint on destination chain
- USDCReceived: USDC received on the destination chain
- DestinationSwap: USDC swapped to Token B
- Completed: Transaction fully completed
If errors occur, you'll see:
- SourceError: Error on source chain (with reason)
- DestinationError: Error on destination chain (with reason)
Failsafe Mechanisms
Zenswap implements robust error handling to protect your assets:
- Source Chain Errors:
- If Token A to USDC swap fails, the transaction reverts completely.
- If CCTP burn fails, the transaction reverts.
- Destination Chain Errors:
- If CCTP mint fails, the system attempts resolution based on the error type (may involve manual intervention or automated retries).
- If USDC to Token B swap fails, you can withdraw your USDC directly from the contract on the destination chain.
All transaction states are logged for transparency and troubleshooting.
Tokenomics
Stakeholders
There are three key roles in the Zenswap protocol:
- Liquidity providers (LPs), who add USDC to the liquidity pools for the supported assets and may also provide short-term loans that power the Turbo Service. For more details, see Turbo Service. In return, LPs earn fees and rewards.
- Swappers, who use the liquidity in the pools to swap assets on an ad-hoc basis. They pay fees in the process.
- Market makers (MMs), who contribute to liquidity pools by monitoring and rebalancing them. They incur fees but anticipate profits in return for their services.
Token Overview
Property | Details |
---|---|
Ticker | ZSWAP |
Total supply (at genesis) | 1,000,000,000 |
Decimals | 18 |
Base unit | ZEP |
Conversion | 1 ZEP = 10(-18)ZSWAP |
Token Allocation
At its launch, Zenswap will have a total supply of 1,000,000,000 ZSWAP, allocated across 8 categories, as outlined in the table below:
Category | Description | % |
---|---|---|
Private Sale | A pool allocated for Zenswap’s early and later stage private round investors. | 20 |
Protocol Launch | A pool allocated towards bootstrapping USDC liquidity during launch on external chains using token auction. | 14 |
Community | A pool for community incentives, including airdrops and marketing, to support Zenswap's long-term success. | 30 |
Team | A pool allocated to core team members of Zenswap, including advisors and developers. | 20 |
Ecosystem Fund | A pool allocated towards DEXs and relayers integration. Also, it will incentivize dApps to integrate with Zenswap. | 5 |
Treasury | A pool allocated to cater for the future protocol development and bounties. It also will act as an emergency fund for users. | 5 |
Existing Investors | A pool allocated for existing investors. | 3 |
LP Incentives | A pool allocated to cater to initial emissions for liquidity provider incentives. | 3 |
Unlock Schedule
The 1 billion ZSWAP minted at Genesis will be distributed over time as per the unlock schedule shown below:
FAQ
How long does the cross-chain swap take?
The duration of a cross-chain swap largely depends on the finality time of the origin chain. Analog GMP and Circle CCTP prioritize security by delaying the minting process on the destination chain until the burning process on the source chain is definitively confirmed, thus mitigating the risk of chain reorgs. Turbo Service significantly reduces this time by providing instant liquidity on the destination chain.
Is it possible to cancel a transaction once it is initiated?
No. You cannot reverse a transaction once it is initiated and confirmed on a blockchain. We recommend carefully reviewing the transaction details before submitting it to avoid errors.
What wallets does Zenswap support?
Zenswap supports major Substrate and EVM wallets like MetaMask, SubWallet, Fearless Wallet, Talisman and Enkrypt. See Wallet Support for details.
Can I swap my funds between different wallets?
Yes, Zenswap lets you easily swap assets across various networks and wallets. After connecting your wallet, swaps within the same wallet across different networks (e.g., Ethereum to Polygon) only require network selection. However, for swaps between different wallets on different networks (e.g., Metamask on Ethereum and WalletConnect on Astar), you’ll need to manually enter the destination wallet address in the recipient field.
How does Zenswap ensure there is no slippage for transactions involving huge amounts?
Zenswap leverages Circle CCTP to ensure boundless liquidity for the USDC transfer portion. This eliminates slippage concerns for the cross-chain USDC movement. Slippage may still occur during the initial swap (Token A -> USDC on source) and final swap (USDC -> Token B on destination) depending on the liquidity available in the underlying DEX pools used for those swaps. Zenswap aims to minimize this by integrating with deep liquidity sources.
Where can I monitor the status of my cross-chain swap?
To check the status of your cross-chain swap, visit the Zenswap Explorer for real-time updates. You can also check your transaction on the Timechain Explorer by searching for your transaction hash.
What is Timechain Explorer?
The Timechain Explorer allows you to monitor the progress of your Analog GMP transactions, including Zenswap transfers. To check the status of a specific transaction, input its hash or ID into the Timechain Explorer’s search bar and press Enter.
Do I need to keep my browser open during the entire transfer process?
No. Your Zenswap transfer will progress even if you close your browser. You can track the swap’s status at any time using the Timechain Explorer or Zenswap Explorer.
What is a Turbo Service?
Turbo Service is Zenswap’s high-speed feature that enables quick cross-chain swaps. It leverages Liquidity Providers (LPs) to offer short-term loans, ensuring swift transaction completion on the destination chain almost instantly after your source transaction confirms. See Turbo Service for more details.
How do I know if my swap is completed?
You can verify your transfer’s completion in two ways: by checking the Zenswap Explorer or by verifying your account balance on the destination blockchain. To track the progress of your swap, you can either use the Zenswap Explorer or search for the transaction’s hash or ID in the Timechain Explorer.
How can I add my asset to Zenswap?
For a cross-chain swap to be facilitated, chains and assets must first be supported by Analog GMP and Circle CCTP (for USDC routing). The initial asset support relies on the tokens available on integrated DEXs like Uniswap on the supported chains. See “Supported Blockchains & Assets” for the current list. Adding new assets primarily depends on their availability on supported DEXs within the supported chains.