cSwap Aggregator is a cutting-edge decentralized exchange (DEX) aggregator built as an outpost on the Neutron chain. Its primary purpose is to source liquidity from various DEXs within the Cosmos ecosystem, providing users with the best possible prices for their trades. By analyzing prices across multiple DEXs and considering factors such as gas fees and slippage, cSwap Aggregator selects the most efficient trade route for users, saving them the effort of manually checking different DEXes for the best prices.
The platform consists of two key modules: the Protocol Aggregation module and the Limit Order & RFQ Aggregator module.
Protocol Aggregation Module:The Protocol Aggregation module of cSwap Aggregator incorporates an advanced algorithm designed to quickly and efficiently find the most optimal paths for token swaps. This algorithm intelligently splits trades between different protocols and even different market depths within a single protocol. As a result, users benefit from shorter transaction times and an overall high-quality trading experience. By executing trades on cSwap Aggregator, users can exchange assets at the best rates without the need for extensive manual effort.The Protocol Aggregation module also provides a high-level API, which grants users access to balances, assets, and the ability to perform transactions across various blockchains. This API consists of two main components:
Routing API: This component enables users to find the optimal route between different blockchains through multiple DEXs and bridges. By minimizing the number of signed transactions, fees, and output amounts, the Routing API optimizes the user experience, ensuring efficient and cost-effective trades.
Transactions API: This component performs essential preconditions and balance checks, verifies fee availability, and creates transactions for different blockchains, DEXs, and bridges. It also facilitates smooth transaction tracking, allowing users to monitor their transactions seamlessly.
Limit Order & RFQ Aggregator Module:The Limit Order & RFQ Aggregator module of cSwap Aggregator enhances trading flexibility and gas efficiency through two distinct order types: Regular Limit Order and RFQ Order.Regular Limit Order: Users can place limit orders that can later be executed on-chain. The smart contracts supporting these orders enable partial fills, order cancellation (both single and bunch), fullness checks, validation, and more. With these features, traders have greater control over their trades and can effectively manage their positions.
RFQ Order: The cSwap Aggregator also supports RFQ (Request for Quote) orders, which offer optimized execution for market makers. RFQ orders require minimal gas for execution, making them ideal for market makers seeking efficient trade execution within the Cosmos ecosystem. RFQ orders can be configured with expiration times, cancellation by order ID, and partial fills, providing market participants with enhanced trading options.
To integrate cSwap Aggregator’s limit orders into the Cosmos DeFi ecosystem, a ROUTING algorithm can utilize the limit orders placed through the dApp and REST API as a liquidity source. This allows any Cosmos user to fill these orders on-chain, enhancing liquidity and fostering a robust trading environment. The limit orders provided by cSwap Aggregator are highly flexible and can be customized with order execution predicates, asset price evaluation helper functions, and callback mechanisms to notify makers upon order execution. Additionally, gas-optimized orders with restricted capabilities suitable for market makers can be supported, offering tailored options for different trading strategies within the Cosmos ecosystem.