Float Protocol Exploit Overview
Float Protocol has fallen victim to a flash loan exploit, leading to a loss of around $28,000, equivalent to 10.71 ETH. The attacker utilized this sophisticated tactic to manipulate the pricing mechanisms of Uniswap V3, specifically targeting how the Hypervisor smart contracts assessed the value of liquidity provider (LP) shares.
Details of the Exploit
On August 31, blockchain security firm SlowMist reported that the exploit involved tampering with the ‘slot0’ price of the Uniswap V3 liquidity pool. This manipulation ultimately resulted in inaccurate calculations of LP share values within the Hypervisor contracts. The analysis pointed out that the exploited functions failed to implement necessary time-weighted average price (TWAP) checks, oracle verification, and slippage protection, leaving them vulnerable to attack.
Using large-scale trades within the underlying liquidity pool, the assailant cleverly skewed the data returned by critical functions, namely currentTick and getTotalAmounts. With the Hypervisor contracts operating under the assumption that share values were inflated, the attacker was able to deposit and withdraw funds repeatedly, extracting value from these flawed calculations.
Identification of the Attacker
SlowMist identified the attacker as operating from the address 0xaea29218262dc6b0904ca077f6527c49dfd426d9 and highlighted the attack contract at 0xb46655eb5b77de277063a75586d1883e951b6c54. They also pinpointed two at-risk contracts (0x85cbed523459b7f6f81c11e710df969703a8a70c and 0xc86b1e7fa86834cac1468937cdd53ba3ccbc1153) and specified the underlying liquidity pool 0xe8c2036068fc3b0161ee1def0e8d01df4eac0ac that made this attack feasible.
Root Cause and Mechanism
The root of the issue stems from the way the affected contracts sourced pricing information from the Uniswap V3 pool. By enabling substantial trades, the attacker was able to manipulate the slot0 price, which ultimately distorted the calculated values for currentTick and getTotalAmounts. Consequently, the Hypervisor contracts relied on these inaccurate figures to determine LP share values, allowing the perpetrator to profit from the ensuing discrepancies.
Flash Loans as a Catalyst
Flash loans served as a catalyst for this scheme. For those unfamiliar, a flash loan permits a user to borrow assets without collateral, provided the loan is repaid within the confines of a single blockchain transaction. Should the repayment fail, the transaction reverts entirely. While this financial tool can be advantageous for legitimate arbitrage and liquidity operations, it also presents opportunities for exploitation in cases like this.
Aftermath and Implications
In the aftermath, SlowMist has indicated that the attacker’s reliance on a manipulable spot price in conjunction with deficient TWAP and oracle protections was a major factor in the incident. Moreover, the assailant didn’t cease after the initial price alteration but continued to leverage the inflated LP share calculations to drain additional assets from the affected contracts.
The scale of the loss, cited at approximately 10.71 ETH, illustrates the risks associated with decentralized finance (DeFi) platforms and the necessity for robust security measures. This attack mirrors tactics seen in previous DeFi breaches, including a July incident where Allbridge Core suffered a loss of around $1.65 million, attributed to similar flash loan mechanics when manipulated pricing led to drained liquidity.
Conclusion
The case with Float Protocol underscores the ongoing vulnerabilities within DeFi ecosystems, especially those that fail to implement adequate safeguards against manipulation of pricing data. With flash loan exploits continuing to emerge, it is imperative for protocols like Float to reassess their security frameworks to prevent future breaches and protect user assets.