💙 Gate Square #Gate Blue Challenge# 💙
Show your limitless creativity with Gate Blue!
📅 Event Period
August 11 – 20, 2025
🎯 How to Participate
1. Post your original creation (image / video / hand-drawn art / digital work, etc.) on Gate Square, incorporating Gate’s brand blue or the Gate logo.
2. Include the hashtag #Gate Blue Challenge# in your post title or content.
3. Add a short blessing or message for Gate in your content (e.g., “Wishing Gate Exchange continued success — may the blue shine forever!”).
4. Submissions must be original and comply with community guidelines. Plagiarism or re
Cellframe Network suffered a flash loan attack, with a liquidity migration vulnerability leading to a loss of $76,000.
Cellframe Network Flash Loan Attack Analysis
On June 1, 2023, at 10:07:55 (UTC+8), Cellframe Network suffered a hack on the Binance Smart Chain, where the attacker exploited a token quantity calculation vulnerability during the liquidity migration process to profit $76,112.
Attack Details
The attacker first obtains 1000 BNB and 500,000 New Cell tokens through Flash Loans. Subsequently, they exchange all the New Cell tokens for BNB, causing the amount of BNB in the trading pool to approach zero. Immediately after, the attacker exchanges 900 BNB for Old Cell tokens.
It is worth noting that the attacker had already added liquidity for Old Cell and BNB before carrying out the attack, obtaining Old lp.
The key to the attack lies in calling the liquidity migration function. At this point, there is almost no BNB in the new pool, while the old pool has almost no Old Cell tokens. The migration process involves removing the old liquidity and adding new liquidity according to the ratio of the new pool. Due to the scarcity of Old Cell tokens in the old pool, the amount of BNB obtained when removing liquidity increases, while the number of Old Cell tokens decreases.
This allows users to obtain liquidity by only adding a small amount of BNB and New Cell tokens, while the excess BNB and Old Cell tokens are returned to the users. The attacker then removes the liquidity from the new pool and exchanges the returned Old Cell tokens for BNB, thus completing the profit.
Source of the Attack
The calculation issues during the liquidity migration process are the root cause of this attack. The attacker exploited the loophole in the migration mechanism by manipulating the token ratios in the pool.
Prevention Suggestions
When migrating liquidity, one should fully consider the changes in the quantities of the two tokens in the old and new pools, as well as the current token prices.
Avoid relying solely on the quantity of the two tokens in the trading pair for calculations, as this can be easily manipulated.
Before deploying the code, it is essential to conduct a comprehensive and rigorous security audit.
This incident once again emphasizes the need for DeFi projects to exercise extra caution when designing and implementing liquidity management mechanisms to guard against potential attack risks.