Search projects, hackathons, sponsors and tech

    ← All projects

    Holster

    A TWAP price band for AMM LPs: pull the losing side on sudden moves. Uniswap v4 hook + 1inch Aqua.

    Demo

    About

    Holster is a TWAP price band for AMM LPs, built as a Uniswap v4 hook and a 1inch Aqua strategy. The LP holds a bid below and an ask above the price. When the price jumps away from its on-chain TWAP, the losing side is pulled, so the LP doesn't buy a pump or sell a dump; once the price settles, both sides return next to the price. Checks run before every swap, fully on-chain. Backtested on real data.

    How it's made

    Holster is written in Solidity with Foundry, plus a small Python backtester. On Uniswap v4, a hook holds the LP's funds and manages two one-sided positions. It records 1-minute prices on-chain to build its own TWAP, and right before each swap it decides which sides may quote and re-places liquidity inside the swap itself. Anyone can also trigger the same step, so a keeper is optional. On 1inch Aqua, the same rules run as a SwapVM strategy on the official router. Aqua's virtual balances were a natural fit: the maker's funds never leave its wallet, a stopped side is simply refused at quote time, and re-placing is just updating a price, so it needs no keeper and no gas for re-placement. Since 1inch has no official testnet, we deploy Aqua and the router from source. The trickiest parts were keeping quotes and swaps consistent on Aqua, fitting the strategy parameters into SwapVM's small instruction format, and getting the hook to move its own liquidity safely in the middle of a swap. The backtest replays real swap data from Allium with concentrated-liquidity math, fees and gas.