The Universal Router is a cutting-edge ERC20 and NFT swap router designed to enhance trading flexibility across diverse token types. It enables seamless Uniswap trades, NFT purchases across eight marketplaces, and other advanced functionalities such as partial trade fills, ETH wrapping/unwrapping, and time-bound, signature-controlled approvals via Permit2. Utilizing a command-based structure, the Universal Router encodes transactions as strings of commands, offering users unprecedented flexibility in executing complex trades within a single transaction. The implementation includes the UniversalRouter contract with dependencies, integrating Uniswap ERC20 swaps (V2 and V3) with cross-market NFT purchases. The contract supports detailed command execution facilitated through a byte encoding system, allowing for efficient gas usage and enhanced control over transaction parameters. Detailed command definitions provide a robust framework for custom transaction flows, suitable for developers seeking to leverage advanced Web3 capabilities in a consolidated trading environment.