Lendf.me Hack

TOTAL LOST $25.2M
High #197 All-Time Reentrancy / Other ethereum

Summarize with AI

Affected Chain ethereum Incident surface
Recovered $25.2M 100.0% returned
All-Time Rank #197 By amount stolen
Protocol Type Exploit/Other Target category

Incident Overview

Lendf.Me exploited due to a bug in the deposit function, allowing the attacker to manipulate their collateral amount and withdraw all available assets from multiple liquidity pools.

The attacker exploited a bug in the deposit function, supply(), in Lendf.Me. The function was hooked by embedding an extra withdraw() function, which allowed the attacker to increase their internal record of imBTC collateral amount without actually depositing the amount. The attacker first deposited a specific quantity of imBTC into Lendf.Me.

However, in the second supply(), the attacker not only supplied 0.00000001 imBTC but also withdrew 290 imBTC within the hook by hijacking the transferFrom() function within doTransferIn(). As a result, 290 imBTC were deducted from the attacker's balance under the integrated withdraw(). When the execution returned to supply(), however, the balance was reset to 290 imBTC.

This allowed the attacker to modify the internal record of the imBTC collateral amount in Lendf.Me. With a big enough collateral value, the attacker was thus able to borrow all available assets from multiple liquidity pools.

The attacker's address:

https://etherscan.io/address/0xa9bf70a4…a77822

The transaction behind the attack:

https://etherscan.io/tx/0xae7d664b…74363b

The withdrawal of the funds by the attacker:

https://etherscan.io/tx/0x9a5899d2…58c12d

Incident Report

Protocol / Project Lendf.me
Date of Incident
Affected Chain(s) ethereum
Attack Technique Reentrancy / Other
Classification Smart Contract Language / Borrowing and Lending
Primary Source View Post-Mortem

Protocol Information

Protocol Type Exploit/Other
Affected Token USDx
Smart Contract Language Solidity
Official Website lendf.me/
Protocol Twitter/X @lendfme
Team Anonymous
Source Code Unverified

What the Attacker Needed to Succeed

Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.

Technical Knowledge Deep understanding of reentrancy / other and Solidity and EVM internals
Capital Required Seed capital to cover gas and initial position setup
On-Chain Access Ability to interact with ethereum smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in Lendf.me's contract logic - root cause: smart contract language / borrowing and lending
Execution Speed Precise transaction ordering and timing to exploit the vulnerability within a single atomic block
Obfuscation Plan A strategy to launder and move stolen funds - typically through mixers, cross-chain bridges, or decentralized DEX swaps to resist tracing

What Auditors Should Check

Could this have been caught in audit? Yes β€” skilled auditors routinely flag Reentrancy / Other vulnerabilities in code review

If you're auditing a protocol with similar architecture to Lendf.me, these are the critical security checks that could have prevented this incident (April 2020).

  • Verify all logic paths related to Reentrancy / Other are guarded by proper access controls and input validation - see the Reentrancy attack class for patterns
  • Check that all state-changing functions follow the Checks-Effects-Interactions (CEI) pattern to prevent reentrancy and logic ordering bugs
  • Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs

Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.

Free Trial

Funds Recovery

100.0%

Recovered

$25.2M

Net Loss

0

Related Attack Classes

The technique used in this hack maps to these vulnerability classes in our security curriculum:

See all Reentrancy examples β†’

Proof-of-Concept Exploits

1 PoC available
poc-exploits - lendf.me

Sources & References

Learn to Prevent the Next Lendf.me

The Lendf.me hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.

Recreate exploit patterns safely Free Trial