bg

Unraveling the $24K Fire Token Exploit: A Detailed Analysis

Published on: October 14, 20247 Mins Read

Author:QuillAudits Team

Overview

On October 1st 2024, the FIRE token exploited which involved an attacker manipulating the token's deflationary mechanism to drain its Uniswap liquidity pool. By taking out a flash loan of 20 ETH and using a malicious smart contract, the attacker repeatedly swapped FIRE tokens, burning them with each transaction to artificially increase their price.

This process was repeated multiple times, allowing the attacker to withdraw $22,000 worth of ETH from the pool.



About Project

FireToken introduces the first-ever ultra-hyper-deflationary token on the Ethereum Blockchain with zero buy and sell taxes. Every time a sell occurs, 100% of the tokens sold are automatically transferred from the liquidity pool to the dead wallet, permanently removing them from circulation.

 

Exploit Details

FireToken Contract Address: 0x18775475f50557b96C63E8bbf7D75bFeB412082D

Attacker Address: 0x81F48A87Ec44208c691f870b9d400D9c13111e2E

Attack Transaction: https://etherscan.io/tx/0xd20b3b31a682322eb0698ecd67a6d8a040ccea653ba429ec73e3584fa176ff2b

Secure Your Smart Contracts with QuillAudits

Ready to secure your smart contracts? Take the first step towards a safer blockchain journey. Request an Audit with QuillAudits today & ensure your contracts are robust and secure!

Check Our Pricingarrow

Attack Process

  1. The attacker initiated the exploit by taking out a flash loan of 20 ETH from Spark Protocol.

    1
     
  2. The attacker purchased FireTokens using ETH from the flash loan and transferred the tokens to the Uniswap liquidity pool. The FireToken contract’s _transfer function triggered during this process, which: a. Burned a portion of the FireTokens by sending them to the burn address (DEAD_ADDRESS). b. Called the sync() function to update the liquidity pool’s reserves, recalculating the pool’s balance based on the reduced FireToken supply.

    2
     
  3. The burning mechanism reduced the number of FireTokens in the liquidity pool.
     
  4. By burning tokens in this way, the attacker manipulated the price to make the ETH in the pool appear more valuable compared to the FireTokens.
     
  5. After reducing the pool’s FireToken reserves via the burn, the attacker swapped FireTokens for ETH, taking advantage of the artificially inflated price of ETH in the pool and this process was performed multiple times.
     
    3
  6. The attacker repeated this process until he accumulated approximately $24,000 in ETH.
     
  7. After completing the exploit, the attacker repaid the flash loan, keeping the remaining ETH as profit.

 

The Root Cause

The root cause of the FireToken exploit was the flawed burning mechanism in its smart contract, which allowed direct manipulation of the Uniswap liquidity pool's token balance. When FireTokens were transferred to the pool, the _transfer() function burned tokens and immediately called sync(), updating the pool's reserves. This reduction in FireToken reserves artificially increased the token's price according to Uniswap's constant product formula. The attacker exploited this vulnerability by repeatedly burning tokens and swapping them for ETH at manipulated prices, draining the pool of liquidity.

 

Flow of Funds

Here is the Flow of Funds of the Fire token exploit.

flow of funds

 

How could they have prevented the Exploit?

  1. Conduct comprehensive audits by a security firm like QuillAudits to identify vulnerabilities in the smart contract before deployment.
     
  2. Implement a more secure burning mechanism that does not allow direct manipulation of liquidity pool balances.
     
  3. Incorporate anti-flash loan mechanisms to mitigate risks associated with rapid liquidity removal, such as setting withdrawal limits or implementing time-lock mechanisms for significant transactions.

Beyond words we dedicate ourselves to pioneering the web3 industry towards a secure future

DSA MemberTS GovBWA LogoCoinweb Logo
Check Our Pricingarrow

Why QuillAudits?

Choosing a reputable audit firm like QuillAudits ensures that your protocol undergoes rigorous scrutiny from experienced security professionals. QuillAudits specializes in uncovering critical vulnerabilities and providing actionable remediation strategies. Our expertise helps safeguard your project from attacks, ensuring that security issues are addressed proactively.

QuillAudits Team

QuillAudits Team

The QuillAudits team, comprises of expert security researchers & auditors in Web3 security, has completed 1,000+ audits across Ethereum, Polygon, Solana, Arbitrum, BSC, and more, securing $30B+ with 0 exploits, advancing the blockchain ecosystem

TwitterLinkedInTelegram

Subscribe to our Newsletter

Your weekly dose of Web3 innovation and security, featuring blockchain updates, developer insights, curated knowledge, security resources, and hack alerts. Stay ahead in Web3!

Telegram