Rollback Hook

Rollback Hook lets prediction market LP's undo the past hour of trades to limit sudden price swings

Rollback Hook

Created At

ETHGlobal Buenos Aires

Project Description

Rollback Hook is an U hook built for prediction markets, giving liquidity providers a way to manage risk during rapid price movements. It introduces a mechanism where queued trades can be reversed for up to one hour before becoming permanent. This provides protection when markets experience sudden volatility, such as moments when an outcome becomes clear even though the market is still officially active. T

The pool deployer can choose when to trigger a rollback. Once this happens, the pool is no longer usable, and liquidity providers can withdraw their positions. The deployer holds only this single privilege: the ability to revert up to one hour of recent trades, without any additional control over the market.

How it's Made

Rollback Hook is built using Solidity, Typescript and Viem. It then utilizes eth_ethSimulateV1 to run tests on top of ethereum mainnet directly. ethSimulate testing frame work had already been built and is not part of the project itself, but used as a tool to conduct testing. The contract is then deployed on sepolia. The tests utilize DAI and weth tokens currently and no real prediction market tokens are used, but could be easily added to the system.

background image mobile

Join the mailing list

Get the latest news and updates

Rollback Hook | ETHGlobal