# MetaPool: infinite mint via unvalidated ERC4626 mint

MetaPool's mpETH mint accepted unvalidated shares, letting attacker mint ~97 mpETH from 107 ETH deposit and drain ~9 ETH profit via swaps.

- Payout: Real-world hack
- Severity: high
- Program: MetaPool
- Credited: DeFiHackLabs
- Disclosed: 2025-06-17
- Write-up quality: 7/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2025-06/MetaPool_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20250617-metapool
- Tags: domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:high tech:evm tech:solidity technique:source-review vuln:business-logic vuln:flash-loan vuln:share-inflation

**Target:** mpETH ERC4626 vault and mpETH/ETH pool
**Root cause:** The depositETH function returns a share amount that is then passed to mint() without validation, allowing the attacker to mint shares disproportionate to the ETH deposited.
**Steps:**
1. Flash loan 200 WETH from Balancer Vault.
2. Withdraw 107 WETH to ETH.
3. Call `mpEth.depositETH{value: 107 ether}(address(this))` to get ~97 mpETH shares, then call `mpEth.mint(amount, address(this))` to mint those shares.
4. Approve and swap 97 mpETH for ~96.36 ETH via `mpEthPool.swapmpETHforETH(97 ether, 0)`.
5. Swap additional 9.6 mpETH for ~9.64 ETH via same pool.
6. Swap 10 mpETH for ~9.999 WETH via Uniswap V3 exactInputSingle.
7. Convert all ETH to WETH, repay 200 WETH flash loan.
8. Withdraw remaining WETH to ETH and send ~8.98 ETH profit to attacker; transfer remaining mpETH to attacker.
**Exploitation:** Attacker used a Balancer flash loan of 200 WETH, deposited 107 ETH to mint ~97 mpETH, then swapped mpETH for ETH on the mpETH/ETH pool and Uniswap V3, repaid the loan, and kept ~8.98 ETH profit plus remaining mpETH.
**Insight:** When an ERC4626 vault exposes both depositETH (returning shares) and a separate mint(shares) function, check if the share amount from deposit can be replayed into mint to double-mint; unvalidated share inputs are a common infinite mint vector.
