Odaily Planet Daily News Uniswap published an article explaining its Time Weighted Average Market Maker (TWAMM) Hook mechanism. The new feature allows developers to build custom AMM functions on top of Uniswap. It divides large orders into smaller orders and executes them in batches over a period of time, thereby reducing the impact of price fluctuations.
In Uniswap V4, each liquidity pool can insert various Hooks, which run at different stages of the liquidity pool operation. The order is stored in TWAMM Hook, and the user sets the execution period of the order. These two parameters instruct the TWAMM Hook to swap on the price of each block until the order expires.
TWAMM orders are always the first pool operation in a block, meaning they are executed before any swap or LP (liquidity provider) position adjustments. This protects the user from the impact of front-running MEV.
The application scenarios of TWAMM Hook include: long-term investors can implement a "fixed investment" strategy by splitting large orders, and DAO can gradually execute large orders to avoid market price fluctuations.