It hasn’t been 24 hours since the news about a $500,000 hack on Balancer came that a new attack has claimed $2,300 worth of the hot Compound tokens (COMP).
Hao, a hacker and engineer at DeBank, a DeFi wallet took to Twitter to share how this time as well, someone used Andreessen-funded dYdX to flash loan and drained, yes again, unclaimed COMP stored in several pools of Balancer, an automatic market maker.
Wow, it happened again https://t.co/MP8xF7M3zp. This time 1.46 ETH at gas of 0.4 ETH.
— Hao (@frenzy_hao) June 29, 2020
The hacker explained that the contract flash loaned some tokens from dYdX to mint cToken from these funds. Then they Uniswap v2 to flash loaned some COMP.
The contract joined COMP/cBAT/cUSDT pool to trigger Compound to send unclaimed COMP to this balancer pool. After syncing COMP balance, the contract withdrew from the balancer at an advantage and continued to do the same for other pools.
After getting all the extra COMP, it repaid Uniswap and dydx and made an exit and swapped COMP for ETH in a normal Uniswap V2 trade.
However, @FollowTheChain said the “unclaimed COMP” is just a tiny fraction of COMP that has accumulated since the last movement of each cToken that happened a few minutes before.
According to Balancer Labs, this attack wasn’t like the one from yesterday either.
Amidst this came the good news, that Balancer Labs will be reimbursing all the liquidity providers who lost funds in yesterday’s attack.
It will also pay out the “highest bug bounty available” to Hex capital, who alerted about this vulnerability to balancer Labs in May.
“This is a major issue in crypto today – creating bug bounty programs and then ignoring the results + refusing to pay out. We need to do better,” said Hex Capital.
Yesterday’s attack involved two pools of the Balancer that contained deflationary tokens STA and STONK, tokens with transfer fees, worth more than $500,000 getting drained by a hacker.
The attack happened in two separate transactions which were 30 minutes apart. And only the pools with a token with transfer fees were affected by the exploit.
DeFi aggregator 1inch in its official report said the attacker was a “very sophisticated smart contract engineer with extensive knowledge and understanding of the leading DeFi protocols.”
Not only was he organized and prepared in advance but also used Tornado Cash, a privacy-focused Ethereum mixer, to get initial funds that hid his source of Ether.
It reported that the attack on one of the Balancer Pools was caused by a complex transaction that the hacker sent to the Ethereum mainnet. Then, with another transaction, the hacker drained another Balancer Pool.
The address with the stolen funds currently has about 601 ETH worth about $133,823.
In its official report on the incident, Balancer Labs reported that it wasn’t aware that “his specific type of attack was possible” which now came to be untrue.
However, they have been warning about the unintended effects of ERC20s with transfer fees in the protocol. As such, STA wasn’t included in the recently put together mining whitelist of BAL.
Now, transfer fee tokens will be added to the blacklist and will continue to audit, the third planned audit is starting soon, and review the protocol.
However, the market seems unaffected for now, as the total value locked in Balancer is $115 million, down from the all-time high of $117 million just a day before, as per DeFi Pulse.