DEX Aggregator

  1. Introduction

    • 1.1 What is a DEX Aggregator

    • 1.2 Pros

  2. Fee Structure

  3. Swaps

    • 3.1 Single Token Swap

    • 3.2 Multi-Token Swap

    • 3.3 Multi-Token Swap Without Revert

  4. Integrating Dzap

1. Introduction

Dzap’s decentralized exchange aggregator (DEX aggregator) goes beyond the traditional concept of aggregating liquidity from single DEXs. Instead, it serves as an aggregator of aggregators, seamlessly integrating multiple DEXs and other DEX aggregators to provide users with the optimal route and pricing for their token swaps. This technical documentation outlines the key concepts, fee structure, and functionalities of the Dzap Dex aggregator.

1.1 What is a DEX Aggregator?

A DEX aggregator is designed to optimize the process of swapping tokens in the DeFi ecosystem. Rather than relying on a single DEX, DEX aggregators source liquidity and pricing data from multiple decentralized exchanges to find the best possible trade execution for users. This approach offers several advantages, such as reduced slippage and improved pricing for users.

1.2 Pros

This multi-tier aggregation process enhances the quality of service provided to users in the following ways:

  • Liquidity Access: By integrating a variety of DEX aggregators, Dzap gains access to an extensive network of liquidity pools, providing users with a wider selection of tokens and trading pairs.

  • Optimized Routing: Dzap's intelligent routing algorithm is capable of dynamically choosing the most efficient route for each trade by considering multiple DEXs and their associated aggregators. This ensures that users receive the best possible pricing for their trades.

  • Reduced Slippage: The ability to select the most favorable path for token swaps minimizes slippage, allowing users to retain more value from their trades.

  • Robustness: Dzap's multi-tiered aggregation approach enhances the robustness of the platform. Even if one aggregator experiences issues or limited liquidity, Dzap can pivot to alternatives, ensuring continuous service for users.

2. Fee Structure

Dzap's fee structure is designed to incentivize its usage and support integration with third-party services. The fee is shared between Dzap and integrators, allowing third parties to integrate Dzap and charge fees according to their preferences. There are two main types of fees:

2.1 Native Fee

  • The native fee is a fixed fee amount that is charged once in the function.

  • This fee is collected by Dzap.

2.2 Token Fee

  • The token fee is charged for each swap or bridge transaction.

  • For multiToMulti swaps, the fee is charged based on the swap amount of each individual swap within the transaction.

  • The token fee is shared between Dzap and the integrator, providing an incentive for third parties to integrate Dzap into their services.

3. Swaps

Dzap offers various swap functionalities to cater to different user needs. These functionalities are designed to optimize the token swap process across multiple decentralized exchanges.

3.1 Single Token Swap

  • The "Single Token Swap" allows users to swap a single token using the best aggregator or DEX available.

  • This is a straightforward and efficient way to swap tokens quickly.

3.2 Multi-Token Swap

  • The "Multi-Token Swap" feature enables users to swap multiple tokens within a single transaction.

  • Each swap can utilize a different DEX, and the aggregator determines the best path for each token.

  • If any of the swaps within the transaction fails, the entire transaction is reverted, ensuring the user's funds are not at risk.

3.3 Multi-Token Swap Without Revert

  • In the "Multi-Token Swap Without Revert" mode, if more than one swap within the transaction is successful, the transaction does not get reverted.

  • This provides a more flexible approach, enabling users to take advantage of successful swaps while ignoring failed ones.

4. Integrating Dzap

Dzap’s aggregator can be integrated by third-party services. Integrators can leverage Dzap to provide their users with access to a wide range of decentralized exchanges and earn fees from the token swaps. The integration process involves:

  • Implementing the Dzap API to interact with Dzap's services.

  • Managing and defining the fee structure for users of the integrated service.

  • Ensuring the smooth integration of Dzap into the existing platform.

Last updated