0x, a liquidity aggregator, recently reported a surge in malicious Uniswap v4 hooks, which deceive users by quoting one price but settling at another. This alarming trend has resulted in users receiving up to 50% less than what was initially displayed in the quote during some trades.
The concept of a liquidity aggregator involves searching multiple pools, estimating their output, and selecting the route that offers the most tokens. However, malicious pools can manipulate the comparison process to appear more attractive and win the order.
In their analysis of Uniswap v4 hooks, 0x examined 84,163 hooks across six chains using various methods such as static analysis, dynamic analysis, and settled-trade observations. They classified 19.4% of the hooks as safe, 54.2% as malicious, and 26.4% as likely malicious.
According to the report, malicious routes have been observed delivering significantly less than quoted, with one specific hook trading the ETH/NVDAc pair showing a median fee of 18% and collecting $143,037 in total fees as of Sept. 11.
Uniswap v4 hooks are external contracts that can execute before or after a swap, allowing for features like dynamic fees and custom accounting. However, users are warned that these hooks are developed by third parties and may contain malicious code.
The issue arises when a malicious liquidity hook distorts the best displayed swap quote, leading users to execute trades based on misleading information. This can result in significant losses for unsuspecting traders.
To combat this problem, 0x has implemented measures to cut off liquidity sources until execution issues are resolved, even if it means their displayed quotes appear less competitive. Additionally, other platforms like KyberSwap are implementing strategies like Smart Settlement to compare pools at execution and select the one offering the highest output.
As the crypto space evolves, it is crucial for wallets and routers to carefully vet liquidity sources and ensure that users are provided with accurate and transparent information. The ongoing battle against malicious liquidity will require continuous monitoring and adaptation to protect users from falling victim to deceptive practices in the market.
