The decompilation identifies a few selectors and partial high-level behaviors, but it fails to preserve most of the router's functional logic, including swap execution, callback handling, immutable addresses, fee payments, and complete permit calldata.
The immutable factory and WETH9 addresses are represented as constant zero values, so pool address derivation and all WETH9 interactions target incorrect addresses.
The exact-input and exact-output swap functions do not preserve pool lookup, path decoding, swap calls, amount calculations, price limits, minimum/maximum checks, or return values; the shown implementations contain malformed calldata parsing and effectively revert.
The Uniswap V3 swap callback logic is missing, including callback validation, exact-input versus exact-output branching, recursive multihop execution, token payment, and amountInCached updates.
The transient amountInCached storage variable and its reset behavior are absent.
The multicall implementation does not accurately preserve delegatecall calldata construction, result collection, or revert-string bubbling; it instead contains malformed unresolved calls and incomplete failure handling.
Permit functions do not preserve the complete permit calldata parameters such as value, deadline or expiry, v, r, and s; the unresolved external calls are shown with only msg.sender and therefore do not represent the original calls.
The selfPermit and selfPermitAllowed functions are missing their actual EIP-2612 and DAI-style permit selector and argument encoding.
unwrapWETH9 hardcodes the WETH token target to address(0), and the decompiled external calls do not reliably preserve the original withdraw and safe ETH transfer behavior.
sweepToken and the fee-bearing unwrapWETH9WithFee and sweepTokenWithFee functions are absent.
The payment helper logic is absent, including WETH wrapping, payment from router-held balances, transferFrom handling, and safe ERC20 return-value validation.
The callback validation and deterministic PoolAddress computation logic are absent, so calls cannot be restricted to the expected Uniswap V3 pools.
The receive function's requirement that ETH only come from WETH9 is absent.
Several state-changing payable functions are incorrectly represented as view or pure, and multiple functions do not return the values required by the original interfaces.
Deadline checks and ABI decoding for swap parameters are malformed, with unresolved calldata offsets and path parsing that do not match the original structs and dynamic bytes arguments.
Candidate
Score: 20/100
The decompilation preserves fragments of multicall, deadline checks, permit allowance checks, WETH unwrapping, and ETH refund behavior, but it fails to represent most core router functionality and contains materially incorrect calls, constants, control flow, and return handling.
The immutable factory and WETH9 addresses are represented as constant zero values, so all pool computations, WETH9 interactions, and callback validation target address(0) instead of constructor-supplied addresses.
The exactInputSingle, exactInput, exactOutputSingle, and exactOutput swap logic is not accurately represented: pool selection, path decoding, swap parameters, callbacks, amount calculations, slippage checks, and cached exact-output handling are missing or reduced to malformed unresolved routines.
The uniswapV3SwapCallback logic is absent, including positive-delta validation, callback pool verification, exact-input versus exact-output branching, recursive multihop swaps, and token payment.
The decompiled path-processing routines contain unconditional or effectively unconditional out-of-bounds reverts for valid path lengths, so valid encoded swap paths cannot be decoded or processed.
The pay logic is missing, including WETH wrapping, transfers from router-held balances, and safe transferFrom pulls from the payer.
sweepToken and both fee-based payment functions unwrapWETH9WithFee and sweepTokenWithFee are missing.
The permit functions do not preserve the full calldata structure: external permit calls are shown with incomplete arguments and unresolved selectors, so deadline, value, nonce, expiry, v, r, and s handling is not accurately represented.
selfPermitIfNecessary and selfPermitAllowedIfNecessary use unresolved return-data variables and do not clearly preserve the actual allowance comparison and complete permit invocation semantics.
unwrapWETH9 is hardcoded to call address(0) rather than the immutable WETH9 contract, making the represented behavior incorrect.
The decompiled refundETH uses transfer-like notation and an undefined success variable rather than accurately representing TransferHelper.safeTransferETH's low-level call and success check.
Several functions that should return swap amounts or multicall byte-array results have missing, incorrect, or unresolved return handling.
Function mutability and visibility are not preserved: payable/external functions are frequently represented as public or view, and selector mappings are unresolved or assigned to unrelated malformed routines.
The receive restriction requiring ETH to originate only from WETH9 is absent.
Storage behavior for amountInCached is absent, despite the original using it to communicate exact-output amounts across callback frames and reset it after exact-output swaps.
Safe arithmetic and casting checks used by the original router, including uint256-to-int256 conversion and overflow-safe fee calculations, are largely absent.
Diff
Decompiled output is identical between baseline and candidate.