
Briefing
On June 26, 2025, the Resupply stablecoin lending protocol suffered a sophisticated exploit, resulting in the loss of approximately $9.5 million. The attack leveraged a critical vulnerability within a newly deployed ERC4626 vault, specifically manipulating its exchange rate calculation. This allowed the attacker to secure massive under-collateralized loans, fundamentally compromising the protocol’s asset integrity. The incident highlights the severe risks associated with insufficient liquidity initialization and flawed arithmetic in smart contract valuation logic.

Context
Prior to this incident, the DeFi ecosystem has frequently contended with vulnerabilities stemming from price oracle manipulation and issues in newly deployed, low-liquidity smart contracts. The inherent complexity of decentralized lending protocols, coupled with the immutability of deployed code, creates an attack surface where subtle logical flaws can lead to significant financial losses. This class of “first donation” or “malicious donation” attacks on ERC4626 vaults, while known, often exploits a brief window of vulnerability post-deployment before sufficient liquidity stabilizes exchange rates.

Analysis
The attack exploited a critical flaw in Resupply’s cvcrvUSD vault, an ERC4626 standard contract, shortly after its deployment. The attacker initiated a “malicious donation” of crvUSD to the low-liquidity vault, then minted a minimal amount of shares (e.g. 1 wei).
This donation artificially inflated the perceived value of a single share, causing the protocol’s _updateExchangeRate() function to calculate an exchange rate that rounded down to zero due to integer division. With an effective exchange rate of zero, the attacker could then deposit a negligible amount of collateral to borrow nearly $10 million in reUSD , effectively draining the protocol’s assets.

Parameters
- Protocol Targeted ∞ Resupply Stablecoin Lending Protocol
- Vulnerability Type ∞ ERC4626 Vault Exchange Rate Manipulation (Malicious Donation Attack)
- Financial Impact ∞ Approximately $9.5 Million
- Date of Exploit ∞ June 26, 2025
- Affected Asset ∞ reUSD (Resupply’s native stablecoin), cvcrvUSD collateral
- Attack Vector ∞ Integer Division Error in Exchange Rate Calculation

Outlook
Immediate mitigation for protocols involves implementing robust liquidity initialization strategies for new vaults and rigorous pre-deployment testing for edge cases involving low liquidity and arithmetic precision. This incident will likely reinforce the need for comprehensive audits specifically targeting ERC4626 implementations and exchange rate logic, especially concerning integer division and potential “first depositor” vulnerabilities. Similar lending protocols must review their vault deployment procedures and oracle integration to prevent contagion risk from this well-documented attack vector.

Verdict
The Resupply exploit serves as a stark reminder that even well-understood vulnerabilities, particularly in newly deployed smart contract components, continue to pose significant systemic risk to DeFi protocols and user capital.