原文标题:《 BurgerSwap 和 JulSwap 闪电贷攻击启示录—你真的懂 Uniswap 吗?》
原文来源: PeckShield
The implementation of the BSC chain in 2021 will push decentralized finance (DEFI) to another upsurge. The total lockup value of DEFI agreement once hit $130 billion, and the whole currency circle was crazy for it. Various DEFI agreements mushroomed like mushrooms, but with the sharp drop in the price of Bitcoin and frequent security incidents, The lock volume of the DEFI protocol is beginning to show a downward trend.
In the early days, BSC's fixed, lower transaction fees than Ethereum and its developer friendly operating system attracted a number of DeFi protocols to migrate to the new chain, as well as AMM, which positioned itself as a challenger to Uniswap.As things stand, of course, they are simply forks.
May 28, the BSC chain's first independent governance AMM Burgerswap and DEX protocol Julswap have been a series of lightning loan attacks. It's worth noting that both BurgerSwap and JulSwap's code forks Uniswap, but they don't seem to fully understand the logic behind Uniswap.
If you don't fully understand the math behind Uniswap, why imitate it? In order to get capital's favor quickly? Or are you afraid of missing out on the traffic? We couldn't stop the copycat from happening, but we quickly saw the results: BurgerSwap lost $7 million and $JULB briefly dropped more than 95%.

PeckShield "PaiShield" security personnel quickly identified the reason why BurgerSwp was hit by the lightning credit attack. The attacker used the reentrant attack to call the _update () function to exchange 45,453 Burger before the smart contract started the second deposit normally.
Peckshield: A brief description of the attack process:

In the first step, an attacker takes out a 6,047.13 WBNB flash loan from a PancakeSwap WBNB-Busdt pool;
In the second step, BurgerSwap calling function DemaxPlatform. SwapExactTokensForTokens () & have spent 6,029 WBNB for 92,677 Burger;
Step 3: Create a Burger Fake LP on BurgerSwap and issue 100 more counterfeit coins and 45,316.6 Burger.
The fourth step is to exchange 100 counterfeit coins for 45,316.6 WBNB;
Fifth, in this step, the attacker attacks the contract through a reentrant attack and makes another exchange, exchanging 45,453 Burger for 4,478.6 WBNB;
From these two steps, the attackers collected a total of 8,800 WBNBs. The attacker then exchanged the 493 WBNB for 108,700 Burger in BurgerSwap and returned the Lightning Loan to complete the attack.
"The good copy, the great copy."
For the current BurgerSwap and JulSwap, or even other forks of Uniswap, it's still too early to talk about leaping beyond Uniswap.
The DEFI field is an important part of the development of the blockchain field, but currently in the DEFI protocol over-issued era, with the passage of time, the waves wash the sand, those who pay attention to safety, take care of their feathers of DEFI protocol can survive.
Peckshield "PaiShield" suggests that Fork Uniswap's DEFI protocol must self-inspect the code to eliminate similar vulnerabilities, or seek the help of a professional code audit attack, after all, Attacker is Watching You!
The original link
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia