MEV Contract Used in AnyswapV4Router Attack

It is reported that, according to the monitoring of the Beosin EagleEye security risk monitoring, warning and blocking platform of Beosin, a blockchain securit…

MEV Contract Used in AnyswapV4Router Attack

It is reported that, according to the monitoring of the Beosin EagleEye security risk monitoring, warning and blocking platform of Beosin, a blockchain security audit company, on February 15, 2023, an attacker used the MEV contract (0xd050) to preemptively call the anySwapOutUnderlyingWithPermit function of the AnyswapV4Router contract before the normal transaction execution (the user authorized the WETH but has not yet transferred the account) for signature authorization transfer, Although the function uses the permit signature verification of the token, the stolen WETH has no relevant signature verification function, and only triggers the deposit function in the fallback. In subsequent function calls, attackers can directly use the safeTransferFrom function to_ The underlying address is authorized to the WETH of the attacked contract and transferred to the attack contract. The attacker made a profit of about 87 Ethereum, about $130000. Beosin Trace tracked and found that about 70 Ethereum stolen funds had entered the address 0x690b, and about 17 Ethereum remained in the MEVBOT contract.

Security team: Multichain’s Anyswap V4 Router contract suffered a preemptive attack, and the attacker made about $130000

Interpretation of the news:


According to recent reports, an attack was carried out on the AnyswapV4Router contract using the MEV contract on February 15, 2023. Beosin EagleEye, a blockchain security audit company, monitored and alerted users of the attack through its risk monitoring, warning, and blocking platform. The attacker pre-emptively called the anySwapOutUnderlyingWithPermit function of the contract, before the normal transaction execution, and stole WETH from the contract, making a profit of 87 Ethereum, equivalent to $130,000.

The AnyswapV4Router contract uses the permit signature verification of the token for its functions, but the stolen WETH has no relevant signature verification function. Therefore, the attacker used the deposit function in the fallback and directly transferred the WETH to their attack contract. About 70 Ethereum stolen funds entered the address 0x690b, while about 17 Ethereum remained in the MEVBOT contract. This attack demonstrates the issues and vulnerabilities that can arise when using smart contracts with complex functions and interdependencies with other contracts.

This news serves as a reminder of the importance of security risk monitoring and early detection mechanisms in the blockchain ecosystem. While blockchain technology provides innovation and opportunities, it also presents new challenges and risks that must be monitored and addressed. As such, security companies like Beosin EagleEye play a crucial role in ensuring that users are aware of potential threats and can take appropriate measures to protect their assets.

Overall, the AnyswapV4Router attack highlights the need for continued diligence and improvement in smart contract security practices. As the use of smart contracts continues to grow, it is important to remain vigilant to new forms of attacks and vulnerabilities. Regular security audits and monitoring can help prevent and mitigate future breaches, ensuring the stability and security of the blockchain ecosystem.

This article and pictures are from the Internet and do not represent Fpips's position. If you infringe, please contact us to delete:https://www.fpips.com/561/

It is strongly recommended that you study, review, analyze and verify the content independently, use the relevant data and content carefully, and bear all risks arising therefrom.