Flex Finance ·Ethereum
Lender withdrawal shortfall enables free-collateral self-deal
Verified with working PoC
Summary
When a Lender (Yearn V3 vault) withdrawal exceeds idle liquidity, TroveManager.redeem() kicks a Dutch auction with receiver set to the withdrawing depositor themselves. TokenizedStrategy permanently marks the shortfall as a realized loss for all remaining depositors.
Root cause
Auction.take()'s transferFrom is self-referential when the depositor takes their own kicked auction (msg.sender == auction.receiver), netting to zero cost while they still receive real collateral - with zero surplus reaching the vault to offset the loss charged to remaining depositors.
Verification
PoC redeemed a real existing large Lender depositor's shares (no synthetic deposit), triggered the shortfall/auction-kick path against real on-chain state, then took the resulting auction as that depositor: net USDC cost was 0, ~39,131 tokens extracted for free.
Verified against real, live deployed contract state.
Receipt on GitHub