โ๏ธ Balancer Hack TL;DR:
๐งฎ Most tokens on Ethereum use 18 decimals, but some donโt.
โ๏ธ Balancer upscales token amounts (to 18-dec) and downscales them back.
๐ง Upscaling always rounded DOWN, but downscaling could round UP or DOWN.
๐ฌ The more scaling steps involved, the greater the chance tiny amounts are lost in edge cases.
๐๏ธ An attacker tuned swaps to hit those rounding edges.
โพ Each hit gave a tiny profit, so he repeated it hundreds of times in a loop.
https://x.com/BlockSecTeam/status/1986057732810518640