BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

Review of Beanstalk Theft: Hackers Use Flash Loans to Vote Maliciously to Evacuate Funds

蜂巢财经News
特邀专栏作者
This article is about 2419 words, reading the full article takes about 4 minutes
Losses exceeded $100 million, and attackers made nearly $80 million in profit.
AI Summary
Expand
Losses exceeded $100 million, and attackers made nearly $80 million in profit.

Author: Jasmine, Hive Tech

At 10:00 pm on April 17th, Beijing time, Beanstalk, a decentralized stablecoin protocol, disclosed that it was "under attack". According to information disclosed by several blockchain security agencies, the protocol suffered a flash loan attack, which resulted in a loss of more than $100 million in encrypted assets, and the attackers made a profit of nearly $80 million.

After the attack, the locked-up value (TVL) of encrypted assets in the Beanstalk protocol returned to zero, and the stablecoin BEAN, which was originally pegged at $1, fell to $0.063.

Beanstalk's follow-up release in its Discord community shows that the attacker completed the flash loan on the lending platform Aave, thus accumulating a large amount of the protocol's governance token STALK; with the help of STALK, the attacker quickly passed a "malicious governance proposal", All funds stored within the protocol are thereby transferred. This attack process has been confirmed by the analysis of other blockchain security agencies.

first level title

Attackers Use Flash Loans to Pass Malicious Proposals

According to DefiLlama data, on April 16, the encrypted assets locked in the Beanstalk protocol were still worth 32 million US dollars. One day later, the TVL measuring this value indicator directly became 0 due to a hacker attack.

image description

BEAN unanchored badly in 13 minutes

Beanstalk disclosed on Twitter that it was attacked at about 10:30 p.m. on April 17, but judging from the unanchoring time of the stablecoin BEAN supported by the protocol, the bad luck began after 8:39 p.m. that night. According to Coingecko data, at 8:39, BEAN, which was originally anchored at $1, began to fall. After 13 minutes, BEAN fell to $0.2, a drop of 80%. In the evening, BEAN once fell to $0.063, with a maximum drop of 93.7%. .

Several security agencies analyzed and confirmed that Beanstalk suffered a flash loan attack. Blockchain security firm PeckShield, which tracked data from the attack, said the attackers stole at least $80 million in cryptocurrency. According to security agency CertiK, the flash loan attack drained Beanstalk of about $100 million in encrypted assets.

Beanstalk's follow-up release in its Discord community shows that the attacker completed the flash loan on the lending platform Aave, thus accumulating a large amount of the protocol's governance token STALK; with the help of STALK, the attacker quickly passed a "malicious governance proposal", Thereby transferring funds within the agreement.

On Twitter, Igor Igamberdiev, director of data research at The Block, a blockchain data analysis organization, gave the attack process. He said that the attacker’s funds came from the Synapse protocol bridge. Proposal, claiming to donate 250,000 BEAN to Ukraine. This proposal is exactly what Beanstalk refers to as a "malicious proposal", which is ready for the subsequent flash loan attack.

According to Igor, the attacker then used flash loans to obtain 350 million DAI, 500 million USDC, 150 million USDT from Aave, 32 million BEAN from Uniswap, and 11.6 million LUSD from SushiSwap (Editor’s note: DAI, USDC, BEAN, LUSD is a USD stablecoin), these stablecoins are used to add liquidity to the Curve pool using BEAN, thereby conducting a governance vote for the BIP-18 proposal; after the proposal is passed, all funds on the Beanstalk protocol are transferred to the attacker’s address.

first level title

Flash loan attacks and exploits most commonly threaten DeFi

After the Beanstalk attack, the blockchain security organization CertiK also stated on Twitter that the root cause of the hacker's ability to complete the attack is that the fund pool used for voting in the Beanstalk system can be created through flash loans. Ability to borrow tokens supported by the protocol and pass malicious proposals by voting.

Beanstalk also admitted in the Discord summary after the incident that the protocol "did not use anti-flash loan measures to determine the percentage of STALK voting for BIP", which is exactly the loophole exploited by hackers.

Flash loan itself is built on the blockchain and belongs to the encrypted asset loan method in the DeFi financial system. It is a type of unsecured loan that can be executed quickly on the chain and is often used by encrypted asset enthusiasts. Arbitrage, collateral swaps or looking for low transaction fees.

But this kind of lending method is collectively referred to as "flash loan attack" because it has been targeted several times. It is caused by DeFi's dependence on price oracles. Chainalysis, a blockchain data service agency, explained that "safe but slow oracles Easily arbitraged; fast but insecure oracles are vulnerable to price manipulation.”

According to public information, among the 60 DeFi attacks in 2020 alone, at least 10 of them were caused by flash loan attacks, including bZx, Balancer, Harvest, Akropolis and other protocols that have suffered from flash loan attacks.

It is not unheard of that flash loans affect DeFi voting governance. In 2020, a protocol called BProtocol obtained a large number of MKR tokens through flash loans, trying to speed up its voting based on MakerDAO through the borrowed votes. result.

Going into 2022, exploits and flash loan attacks are still the most common threats in the DeFi space.

In April of this year, the "Security Research Quarterly Report" released by the blockchain security organization Chengdu Lianan showed that in the blockchain field in the first quarter of 2022, DeFi projects are still the key areas of hacker attacks, with a total of 19 security incidents, about 60% of the attacks occurred in the DeFi field; in terms of attack methods, contract exploits and flash loans were the most common, about 50% of the attacks were contract exploits, and 24% of the attacks were flash loans.

Today, the security incident of Beanstalk shows that the flash loan attacks initiated by hackers are not limited to using oracle machines to manipulate prices. Once the defense line set by the agreement is insufficient, the loopholes in the governance mechanism may also be exploited by hackers to destroy the agreement through flash loans security, stealing the user's assets.

In the early hours of April 18, Beanstalk appealed on Twitter, requesting the DeFi community and on-chain analysis experts to assist in limiting attackers' ability to withdraw funds through centralized trading platforms. As of press time, the agreement has not yet given an answer on how to deal with user losses.

DeFi
Safety
stable currency
Welcome to Join Odaily Official Community