What it is
When you provide liquidity to an AMM pool, you earn a stream of small trading fees over time. Left alone, those fees just sit there uninvested, or accrue in a separate token that has to be claimed and swapped by hand. An auto-compounding vault wraps a liquidity position so a keeper or the contract itself periodically harvests those fees and adds them straight back into the position, so the depositor's capital grows continuously without any manual work.
How it works
- A user deposits assets (or an existing LP position) into a vault contract, receiving a vault share token representing their stake.
- The vault deploys the assets into an underlying AMM position — commonly a concentrated-liquidity range on something like Uniswap v3, or a standard constant-product pool.
- As trades occur against the pool, fees accrue to the position, usually in the form of the two pooled assets or a separate reward token.
- Periodically — triggered by a keeper bot, a time interval, or anyone calling a public "harvest" function for a small reward — the vault claims the accrued fees.
- The vault swaps and/or re-deposits those fees back into the same liquidity position, increasing the underlying assets backing each vault share.
- Because the share token's redemption value rises as fees compound in, users don't need to claim rewards themselves — their share simply becomes worth more over time, and they realize the gain when they withdraw or sell the share.
- Many vaults also rebalance the underlying range (for concentrated liquidity) during this same harvest cycle, so compounding and range management are bundled into one operation.
Why designers use it
- Removes the manual toil and gas cost of claiming and re-adding fees for every LP, which matters especially for small positions where gas would eat the return.
- Captures compounding returns that individual users would likely never bother to claim frequently enough to realize.
- Turns an active-management position (like concentrated liquidity) into a passive, buy-and-hold-style token that can be composed elsewhere in DeFi.
- Batches harvest operations across many depositors, spreading gas cost and making frequent compounding economical.
Failure modes
- Harvest timing is a value leak: if compounding happens too infrequently, depositors lose yield to un-reinvested fees; if a keeper is bribed or manipulated, harvests can be timed to front-run or sandwich the reinvestment swap.
- The vault's swap step to rebalance harvested fees into the right ratio incurs slippage and price impact, which can be exploited by MEV bots watching for predictable harvest transactions.
- Auto-compounding does not remove impermanent loss or out-of-range risk from the underlying LP position — a vault can compound fees while still bleeding value from a bad market move.
- Vault share pricing bugs (e.g., failing to account for pending unharvested fees correctly) have led to depositors being able to time deposits/withdrawals to skim value from other depositors.
- Centralized or permissioned keeper roles create a trust dependency; if the keeper stops running, fees stop compounding and the vault silently underperforms.
What to check before using it
- Confirm harvest frequency and the incentive that pays for it — is it subsidized, gas-cost-covered by a fee, or dependent on an altruistic keeper?
- Check whether harvest and rebalance transactions are protected against sandwiching (e.g., via slippage limits, private mempools, or TWAP-based pricing).
- Verify share-price accounting includes pending fees correctly, so deposits and withdrawals can't be timed to arbitrage other depositors.
- Understand that auto-compounding is additive yield on top of, not a fix for, the underlying position's impermanent-loss and range risk.
- Check the withdrawal path: can a user exit at any time, and does a large withdrawal disrupt the position for remaining depositors?