Contract Details
Tech Stack
Solidity ^0.8.24 OpenZeppelin v5 Foundry
Chains
Ethereum Arbitrum Base Optimism
Description
Multi-DEX swap router with fee-recipient monetization. Routes trades across Uniswap V2/V3, SushiSwap, and other DEXes via a pluggable adapter pattern. Configurable protocol fee (0.05%-1%) with 24-hour timelock on changes. Supports multi-hop routing, deadline enforcement, and Permit2 approvals.
Features
- ✓ Multi-DEX routing via pluggable adapter pattern
- ✓ Configurable fee-recipient monetization (max 1%)
- ✓ 24-hour timelock on fee rate changes
- ✓ Multi-hop swap execution
- ✓ Permit2 integration for gasless approvals
- ✓ Uniswap V2 + V3 adapters included
- ✓ Emergency pause + sweep functions
- ✓ Full Foundry test suite (40+ tests, fuzz tests)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Swap Router Contract /// @notice Multi-DEX swap router with fee-recipient monetization (0x pattern). contract SwapRouterContract { 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 }