Contract Details
Tech Stack
TypeScript Python ethers.js graphql-request
Chains
Ethereum Arbitrum Base Optimism Polygon
Description
Off-chain pathfinding engine for optimal trade routes across DEXes. Uses Dijkstra/DFS graph algorithms to find the best split routes across multiple pools. Supports Uniswap V2/V3, SushiSwap, Curve, Balancer. TypeScript implementation with Python bindings.
Features
- ✓ Dijkstra + DFS hybrid pathfinding algorithm
- ✓ Split-route optimization (up to 3-way splits)
- ✓ Multicall-based pool data fetching
- ✓ Uniswap V2/V3, SushiSwap, Curve, Balancer support
- ✓ Gas-aware quote comparison
- ✓ Python bindings for backend integration
- ✓ Configurable default RPC and DEX settings
- ✓ BigInt precision throughout
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Routing Engine /// @notice Off-chain pathfinding engine for optimal trade routes across DEXes. contract RoutingEngine { address public immutable owner; uint256 public constant VERSION = 1; event Initialized(address indexed deployer); constructor() { owner = msg.sender; emit Initialized(msg.sender); } // ... full implementation in purchased package }