2/4 The hack is made possible due to a reentrancy bug introduced by $AMP, which is an ERC777-like token and exploited to re-borrow assets during its transfer before updating the first borrow.
3/4 Specifically, in the example tx, the hacker makes a flashloan of 500 ETH and deposit the funds as collateral. Then the hacker borrows 19M $AMP and makes use of the reentrancy bug to re-borrow 355 ETH inside $AMP token transfer(). Then the hacker self-liquidates the borrow.
4/4 The hacker repeats the above process in 17 different txs and gains in total 5.98K ETHs (with ~$18.8M). The funds are still parked in 0xCE1F….6EDE. We are actively monitoring this address for any movement.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
2/5 The hack is similar to an earlier yDAI hack: the stake() function has a flaw that can be forced to swap from USDT to WEX via the related USDT_WEX pair, even when the pair has been manipulated to be highly imbalanced. peckshield.medium.com/the-ydai-incid…
3/5 In the exploit, the hacker makes the first flashloan of 16M WUSD (and redeems the WUSD to 15M USDT and 106M WEX), then the second flashloan of another 40M USDT, and swaps 23M USDT to 518M WEX, resulting in an imbalanced USDT_WEX pair.
1/4 SorbettoFragola was exploited in etherscan.io/tx/0xcd7dae143…, resulting in the loss of about $20.7M including 2.6K WETH, 5.4M USDC, 5M USDT, 160K DAI,10K UNI, and 96 WBTC.
2/4 The hack was due to the lack of proper fee accounting when LP tokens are transferred. Specifically, the attacker creates three contracts A, B, and C and repeats in the sequences of A.deposit(), A.transfer(B), B.collectFees(), B.transfer(C), C.collectFees() for eight pools.
3/4 In the exploit, this hack is initialized from this attacker address (located at 0xf9e3) and works as follows:
Step 1: Flashloan 30M USDT, 13K WETH, 1.4KBTC, 30M USDC, 3M DAI and 200K UNI from Aave. And attack eight PLP pools. Below we take the USDT-WETH pool as an example.