
YakSwap is an on-chain decentralized exchange (DEX) aggregator for EVM-compatible chains that finds optimal token swap paths considering gas costs.
YakSwap is an on-chain decentralized exchange (DEX) aggregator designed for Ethereum Virtual Machine (EVM) compatible blockchains such as Avalanche, Arbitrum, and Optimism. It provides a set of smart contracts that enable users and developers to find the optimal swap path between two tokens, maximizing the net output amount by factoring in both the token exchange rates and the gas costs associated with executing the swaps. This approach helps users achieve better trade efficiency by considering the often-overlooked impact of gas fees on overall swap profitability.
The core component, YakRouter, serves as the user-facing interface for price queries and trade execution. It exposes functions like findBestPathWithGas, which returns the best token swap route with gas cost estimates, and swapNoSplit, which executes trades along a specified path. YakSwap uses adapters as modular interfaces to interact with various external liquidity sources and protocols, allowing it to aggregate liquidity across multiple DEXs. These adapters implement query and swap methods to facilitate price discovery and trade execution.
YakSwap is primarily targeted at DeFi developers and infrastructure teams looking to integrate efficient on-chain swap routing into their applications or services. It requires integration with EVM-compatible chains and can be used off-chain to query optimal paths before submitting transactions. The project is open source under GPL-3 and supports local development with tools like Hardhat for testing, deployment, and verification. While it is not audited, the community can engage via the YakDevs Telegram group for support and updates.
Developers can get started by cloning the repository, installing dependencies, setting environment variables, and running tests or deployment scripts. The modular adapter architecture allows easy extension to new liquidity sources. YakSwap’s on-chain pathfinding and gas-aware routing differentiate it from many off-chain aggregators by enabling fully on-chain price discovery and execution, which can improve transparency and composability in DeFi applications.
Token swaps on decentralized exchanges often suffer from suboptimal routing that ignores gas costs, leading to less efficient trades. Developers and users lack a fully on-chain solution that finds the best trade path considering both price and gas fees across multiple liquidity sources.
Returns the best token swap path with estimated gas costs for a given input amount and tokens.
Executes token swaps along a specified path without splitting the trade, supporting fee deductions.
Standardized adapter interface to query prices and execute swaps on external DEXs.
DeFi developers embed YakSwap’s router contracts to enable users to swap tokens with optimal routing and gas cost awareness.
Frontend teams use YakSwap’s off-chain query methods to display best swap routes and prices factoring in gas fees.
Infrastructure developers add new adapters to integrate additional DEXs or liquidity protocols into YakSwap’s aggregation.
Discover trusted tools and services in the QuickNode Marketplace. Everything you need to launch faster and scale smarter.
Explore web3 competitors and apps like YakSwap.

A Document Object Model for Web APIs designed to simplify API consumption and integration.

0x provides battle-tested APIs to embed fast, gasless, and deeply liquid crypto trading into decentralized applications.
Blast API is a decentralized Web3 infrastructure platform providing geographically distributed blockchain node APIs to improve reliability and latency.

The Graph is a decentralized indexing protocol that organizes blockchain data and makes it easily accessible via GraphQL.

Virtually operated Web3 networks that replicate real blockchain networks for development, testing, and staging without using real assets.

Connext is a secure, fast modular interoperability protocol enabling cross-chain fund bridging and asynchronous Solidity development.
Rarible API is a fast, unified NFT API infrastructure providing real-time data and executable market features across Ethereum, Base, Polygon, and more than 10 other chains.


A fully managed, customizable rollup deployment platform providing scalable, secure, and high-performance blockchain infrastructure.

Network APIs provides web3 developer tools focused on blockchain network interactions and API services.
| Open Source | |
|---|---|
| Price (Monthly) | Free | 
| Price (Annual) | Free | 
| Messaging | N/A | 
| Support | Community support via Telegram | 
| Analytics | 
YakSwap provides comprehensive open-source resources including smart contract code, example usage scripts, deployment and testing instructions, and community support channels.
| Composability | |||
| Cross-Chain | |||
| Customizability | |||
| Developer Support | |||
| Ease of Integration | |||
| Performance |