Lendf.me Hack

Reported loss $25.2M
Ethereum
ERC-777 callback reentrancy inflates collateral accounting

What happened

Lendf.Me, dForce's Ethereum lending protocol, was drained through an ERC-777 reentrancy flaw involving imBTC. The attacker inflated recorded imBTC collateral through the token's callback behavior, then borrowed assets from more than ten liquidity pools. dForce later confirmed that all stolen assets were recovered and users were made whole.

Technical root cause

Lendf.Me allowed a callback-capable ERC-777 token to invoke external control flow during deposit processing without comprehensive reentrancy protection. Its balance-accounting flow did not safely commit state before the token transfer interaction, enabling stale collateral values to overwrite the withdrawal result.

How it happened

The attacker interacted with Lendf.Me using imBTC, an ERC-777-compatible token. During token-transfer processing in supply(), the ERC-777 callback enabled a reentrant withdraw() before Lendf.Me finalized the user's balance update. The reentrant path withdrew collateral while the outer supply() call later wrote a stale, higher balance back to storage.

Repeating the cycle inflated the attacker's recorded collateral, allowing borrowing of the protocol's available WETH, stablecoins, BTC-related assets, and other tokens. The related April 18 Uniswap imBTC incident used the same callback family but was a separate exploit and must not be conflated with this lending-market drain.

Protocol details

Classification Reentrancy / Collateral Accounting
Protocol Type Lending
Affected asset / contract USDx
Implementation language Solidity
Protocol links Website @lendfme

Security review history

Funds Recovery

100%

Recovered

$25.2M

Net Loss

$0

Understand the attack patterns

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.