Blog
>
How Olympix Could Have Prevented $11.6M LI.FI Exploit

How Olympix Could Have Prevented $11.6M LI.FI Exploit

November 12, 2024

Incident

On July 16th, the Li.Fi exploit on the Ethereum mainnet resulted in an $11.6M loss. The root cause was a flaw in the depositToGasZipERC20() function within the GasZipFacet.sol contract, which allowed user-controlled data to be passed directly to a low-level call, enabling unauthorized function execution. The Li.Fi team acknowledged the exploit, halted all transactions, and issued warnings to their users.

Exploited Contract

0xf28a352377663ca134bd27b582b1a9a4dad7e534

Exploit Transaction

0xd82fe84e63b1aa52e1ce540582ee0895ba4a71ec5e7a632a3faa1aff3e763873

Olympix Findings

The Olympix vulnerability detection system successfully identified a critical security flaw that directly led to the Li.Fi exploit. Specifically, it flagged an "Unverified Parameter" issue in the LibSwap.sol contract, which corresponds to the vulnerability in the depositToGasZipERC20() function that served as the entry point for the attack. This detection demonstrates Olympix's ability to identify subtle yet critical flaws in smart contract implementations that can lead to unauthorized function execution.

The highlighted code snippet shows a low-level call (_swap.callTo.call()) where the parameters are not adequately verified before execution. This exactly mirrors the exploit's root cause, where user-controlled data was passed directly to a low-level call. Olympix's successful detection of this vulnerability underscores the importance of thorough input validation and the risks associated with unverified external calls in smart contracts. This finding reinforces the value of automated security tools like Olympix in complementing manual audits and helping prevent high-impact security breaches in decentralized finance systems.

What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.

  1. Follow-up: Conduct a follow-up review to ensure that the remediation steps were effective and that the smart contract is now secure.
  2. Follow-up: Conduct a follow-up review to ensure that the remediation steps were effective and that the smart contract is now secure.

In Brief

  • Remitano suffered a $2.7M loss due to a private key compromise.
  • GAMBL’s recommendation system was exploited.
  • DAppSocial lost $530K due to a logic vulnerability.
  • Rocketswap’s private keys were inadvertently deployed on the server.

Hacks

Hacks Analysis

Huobi  |  Amount Lost: $8M

On September 24th, the Huobi Global exploit on the Ethereum Mainnet resulted in a $8 million loss due to the compromise of private keys. The attacker executed the attack in a single transaction by sending 4,999 ETH to a malicious contract. The attacker then created a second malicious contract and transferred 1,001 ETH to this new contract. Huobi has since confirmed that they have identified the attacker and has extended an offer of a 5% white hat bounty reward if the funds are returned to the exchange.

Exploit Contract: 0x2abc22eb9a09ebbe7b41737ccde147f586efeb6a

More from Olympix
No items found.

Ready to increase security assurance in-house?

Reduce reliance on reactive audits and monitoring and protect your assets with Olympix.

Get Started