From 1 Wei to 10M reUSD: Anatomy of a ResupplyPair Exploit
An attacker exploited a flaw in a lending protocol's solvency check by manipulating an oracle price to return an extremely high value, which caused the exchange rate to become zero and bypassed all LTV checks. This allowed the attacker to borrow the entire 10 million reUSD borrow limit with only a one-wei collateral deposit.
medium.com
Published on medium.com
An attacker leveraged a one-wei collateral deposit to trigger a sequence of flash loans and Curve swaps. They bypassed all LTV checks and drained the full 10 000 000 reUSD borrow limit in a single transaction.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
The attacker drained the full 10,000,000 reUSD borrow limit, causing a loss of that amount to the protocol.
What the attacker needed
Flash loan availability; oracle price manipulation; newly created pool with low liquidity
How it was found
- Create a contract that receives a flash loan from Morpho.
- Use the flash loan to swap USDC for crvUSD via Curve.
- Deposit a tiny amount of collateral (1 wei) into the Resupply Pair.
- Call borrow for the entire borrow limit of 10,000,000 reUSD.
- Swap the borrowed reUSD for other tokens and repay the flash loan.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A lending protocol lets people borrow tokens by putting up collateral. It checks that the collateral is worth enough compared to the loan. The attacker found a way to make the price feed report an absurdly high value, so the check thought the collateral was huge and allowed a massive loan. The attacker then took the borrowed tokens and left.