Wild Credit Hack
What happened
On May 27, 2021, the BNT-ETH lending pair of Wild Credit, a permissionless lending protocol with isolated lending pairs on Ethereum, was drained of 125,585.93 BNT. Wild Credit said the BNT-ETH pool was the only one exploited and put the loss at about $637k. The funds were returned the same day, and the team said all funds were recovered with zero losses.
The flaw was in the pair's LP token contract, LPTokenMaster. Its initialize() function could be called again after deployment, and each call made the caller the owner. The owner of an LP token can mint it, and the lending pair pays out the underlying BNT to anyone who redeems LP tokens.
The draining transaction ([0xdbef3b39...](Tx 1 0xdbef…ce07)) went through a contract Etherscan labels as an MEV bot. BlockThreat reported that a bot front-ran the attacker and returned the funds. About six and a half hours later, address [0xb1af124c860f819bf8de7d4c459e5b31fecdb95e](Address 0xb1af…b95e) sent the full 125,585.93 BNT to the Wild Credit deployer ([0xb4fffa0e...](Tx 2 0xb4ff…4542)).
Exploited contract: [0x7b3b69eab43c1aa677df04b4b65f0d169fcdc6ca](Address 0x7b3b…c6ca) (LPTokenMaster).
How it happened
- Wild Credit deployed each pair's LP token as a minimal-proxy clone of
LPTokenMaster. The implementation'sinitialize()setsowner = msg.senderand has no check that it was already initialized. - The exploit transaction called
initialize()on the BNT-ETH pair's LP token and became its owner. - As owner, it minted 125,585.93 WILD-LP to itself.
- It redeemed those LP tokens with the lending pair, which burned them and released 125,585.93 BNT from the pair.
- Later that day, 0xb1af... returned the full 125,585.93 BNT to the Wild Credit deployer.
Protocol details
Security review history
- Code4rena View report
Funds Recovery
Recovered
$612K
Net Loss
$0
Evidence
- report @WildCredit incident report twitter.com
- report @mudit__gupta incident report twitter.com
- report Code4rena - Wild Credit audit report (2021-07) code4rena.com
- transaction Etherscan - exploit transaction 0xdbef3b39... etherscan.io
- transaction Etherscan - return transaction 0xb4fffa0e... etherscan.io
- address Etherscan - LPTokenMaster implementation 0x277AA659... etherscan.io
- address Etherscan - exploited LPTokenMaster clone 0x7b3b69ea... etherscan.io
- address etherscan.io address 0x7b3b…c6ca etherscan.io
- address etherscan.io address 0xb1af…b95e etherscan.io
- analysis Documented Timeline of DeFi Exploits (Wild Credit entry) chainsec.io
- analysis BlockThreat - Week 21, 2021 blockthreat.com
Understand the attack patterns
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.