🌟 Photo Sharing Tips: How to Stand Out and Win?
1.Highlight Gate Elements: Include Gate logo, app screens, merchandise or event collab products.
2.Keep it Clear: Use bright, focused photos with simple backgrounds. Show Gate moments in daily life, travel, sports, etc.
3.Add Creative Flair: Creative shots, vlogs, hand-drawn art, or DIY works will stand out! Try a special [You and Gate] pose.
4.Share Your Story: Sincere captions about your memories, growth, or wishes with Gate add an extra touch and impress the judges.
5.Share on Multiple Platforms: Posting on Twitter (X) boosts your exposure an
Cellframe Network was attacked by a flash loan attack, resulting in a profit of $76,000 for the hacker.
Analysis of the Flash Loan Attack Incident on Cellframe Network
On June 1, 2023, at 10:07:55 (UTC+8), Cellframe Network was hacked on a certain smart chain due to a token quantity calculation issue during the liquidity migration process. It is reported that the hacker profited $76,112 from this attack.
Analysis of Attack Process
The attacker first obtained 1000 native tokens of a certain smart chain and 500,000 New Cell tokens through Flash Loans. Subsequently, the attacker exchanged all New Cell tokens for native tokens, causing the amount of native tokens in the trading pool to approach zero. Finally, the attacker exchanged 900 native tokens for Old Cell tokens.
It is worth noting that the attacker first added liquidity of the Old Cell and native tokens before launching the attack, obtaining the Old lp tokens.
Next, the attacker invoked the liquidity migration function. At this point, there are almost no native tokens in the new pool, and almost no Old Cell tokens in the old pool. The migration process includes the following steps:
Due to the lack of Old Cell tokens in the old pool, the amount of native tokens obtained when removing liquidity increases, while the number of Old Cell tokens decreases. This causes users to only need to add a small amount of native tokens and New Cell tokens to obtain liquidity, while the excess native tokens and Old Cell tokens are returned to the users.
Finally, the attacker removes the liquidity from the new pool and exchanges the Old Cell tokens returned from the migration for native tokens. At this point, there are a large number of Old Cell tokens in the old pool but no native tokens, and the attacker exchanges the Old Cell tokens back into native tokens, thereby completing the profit. The attacker then repeats the migration operation to further expand the earnings.
Root Cause of the Attack
The root cause of this attack lies in the calculation issues during the liquidity migration process. When migrating liquidity, the project party directly calculates based on the quantities of the two tokens in the trading pair, which makes this method susceptible to manipulation by attackers.
Security Advice
When migrating liquidity, one should comprehensively consider the changes in the quantities of the two tokens in the old and new pools as well as the current token prices, rather than simply calculating the number of tokens.
A comprehensive security audit should be conducted before the code goes live to identify and fix potential vulnerabilities.
This incident reminds us once again that when designing and implementing complex financial operations, special attention needs to be paid to security and robustness to prevent potential attacks and vulnerabilities from being exploited.