# Enso Finance: short TWAP overvalues FARM, drains strategy vault

Enso strategy vault priced FARM via a short-window Uniswap V3 TWAP on an imbalanced pool, letting an attacker deposit cheap FARM for ~9x inflated shares and drain UNI/AAVE/MKR.

- Payout: Real-world hack
- Severity: high
- Program: EnsoFinance
- Credited: DeFiHackLabs
- Disclosed: 2026-09-09
- Write-up quality: 7/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2026-09/EnsoFinance_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20260909-ensofinance
- Tags: domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:high tech:evm tech:solidity technique:chained technique:source-review vuln:business-logic vuln:oracle-manipulation vuln:share-inflation

**Target:** Enso StrategyController vault deposit/withdraw with Uniswap V3 TWAP oracle
**Root cause:** Deposit share minting relies on an oracle valuation that prices FARM through a Uniswap V3 pool.observe TWAP with short, per-pool windows on an imbalanced thin pool, overvaluing FARM ~9x versus its real Uniswap V2 price.
**Steps:**
1. Buy 268.42 FARM for 0.683 WETH on the correctly-priced Uniswap V2 WETH/FARM pair `swap(FARM_OUT,0,this,"")`
2. Approve router and call `deposit(strategy, router, 0, 0, abi.encode([Call(router, settleTransferFrom(FARM,this,strategy))]))` (selector 0x71b8dc69)
3. Controller mints shares on oracle-estimated value delta, crediting FARM at ~9x real worth
4. Call `withdrawWETH(strategy, router, shares, 0, abi.encode([transferFrom(UNI,...),transferFrom(AAVE,...),transferFrom(MKR,...)]))` (selector 0x716e2615) to pull real strategy tokens
5. Sell looted UNI/AAVE/MKR back to WETH and unwrap for ~5.6 ETH net
**How found:** Researcher read the deposit share-mint formula (mint = amountAddedValue * totalSupply / valueBefore) and traced valuation through EnsoOracle to per-item estimators calling Uniswap V3 pool.observe with short per-pool windows; spotted the FARM pricing pool was imbalanced and thinly observed, so a near-spot TWAP diverged from the real Uniswap V2 price.
**Exploitation:** Attacker deployed a plain contract with 1 ETH, bought FARM cheaply on Uniswap V2, deposited it into the permissionless Enso strategy vault where the short-window V3 TWAP overvalued it ~9x, minted inflated shares, then redeemed them via GenericRouter to transfer the vault's real UNI/AAVE/MKR out, selling them for ~5.6 ETH.
**Insight:** When a vault mints shares on oracle-estimated value delta, check whether any single asset's price source is a short-window TWAP on a thin/imbalanced pool while a deeper correctly-priced pool exists elsewhere — the divergence is the mint inflation lever.
