Security Agency: The Balancer attacker has carried out immutable attacks on BPT price calculations or is the main cause of the stolen assets

#ARB #bal

BlockSec Phalcon, the on-chain monitoring platform of the BlockSec security agency, posted on platform X that "Balancer and many of its forked projects were attacked a few hours ago, resulting in losses of over 120 million US dollars across multiple chains. This is an extremely complex attack."

Preliminary analysis indicates that the root cause is that the attacker manipulated the invariant in the BPT price calculation, thus distorting the BPT price calculation, allowing the attacker to profit from a specific group of stablecoins through a single batch transaction.

Taking the example of the attack transaction on Arbitrum, the batch exchange operation can be divided into three stages:

1. The attacker converts BPT into the underlying asset to accurately adjust the balance of one token (cbETH), bringing it closer to the rounding boundary (amount = 9). This facilitates the loss of accuracy in the next step;

2. Then, the attacker uses the pre-built quantity (= 8) to exchange between another underlying token (wstETH) and cbETH. Due to the token quantity being rounded down when scaling, Δx is calculated to be mitigated (8 * 0.918 down to 8), resulting in Δy being undervalued, thus making the invariant (D) in Curve's StableSwap model also smaller. Since the price of BPT = D / total supply, the price of BPT is artificially lowered.

3. The attacker reverses the underlying asset back to BPT, restores balance, while profiting from the decrease in BPT price.