July 01, 2025
On June 26, 2025, ResupplyFiโa decentralized stablecoin and lending protocolโbecame the latest victim in a string of DeFi price manipulation attacks, losing an estimated $9.6 million from its wstUSR lending market.
But this wasnโt a typical exploit. This was a surgical, precision-driven manipulation that started with just 1 wei and ended in millions.
Hereโs how it happened, why it worked, and what this means for the future of DeFi.
๐งจ The Attack at a Glance
โข Target: ResupplyFiโs wstUSR market
โข Method: Oracle manipulation via ERC-4626 vault logic bug
โข Funds lost: ~$9.6 million in reUSD
โข Exploited function: _updateExchangeRate() in ResupplyPair contract
โข Timeline: Single transaction drain within minutes
๐ ๏ธ How the Exploit Worked
At the heart of the attack was a poorly designed exchange rate oracle within ResupplyFiโs vault contract. Specifically, the exchangeRate was derived using a value called pricePerShare, common in ERC 4626 vaults.
But hereโs the catch:
โค The attacker deposited 1 wei into an almost empty vault.
This gave them control over how the vault's pricePerShare would respond to subsequent โdonations.โ
โค Then, they made a large โdonationโ to the vault.
This artificially inflated the share price, skewing the oracle rate. Because of a logic flaw, the protocol calculated the exchangeRate as 0, tricking the system into thinking the collateral was worthless.
โค Result:
The attacker borrowed $10 million worth of reUSD against 0 value collateral.
โ ๏ธ What Went Wrong?
โข Broken Oracle Assumptions: The system trusted pricePerShare as a real-world oracle without validation.
โข No Lower Bound Check: Allowing exchangeRate to drop to zero effectively bypassed the collateralization check.
โข Missing Guardrails: There were no sanity limits on extreme values coming from vault math.
๐ธ The Drain & Laundering
The attacker didnโt stick around.
They quickly converted stolen reUSD into ETH
Funds are now sitting at
๐ง Lessons for the DeFi World
This hack joins a growing list of oracle manipulation exploits where DeFi protocols underestimate how easily โtrustedโ math can be gamed in low-liquidity or edge-case scenarios.
โ Key takeaways for builders:
โข Never trust raw vault math without bounds.
โข Validate pricePerShare with a circuit breaker or floor value.
โข Use multiple oracles for redundancy.
โข Simulate edge cases with small deposits in testing environments.
๐ฃ๏ธ Final Thoughts
The ResupplyFi exploit is another reminder that a single wei, when paired with flawed logic, can dismantle an entire system.
As DeFi continues to innovate, we must slow down and ensure that core primitives like oracles, vaults, and pricing logic are built with security-first principles.
If not, there will always be someone waiting to turn one wei into one more heist.
14 ์กฐํ