Rollback Hook
Rollback Hook lets prediction market LP's undo the past hour of trades to limit sudden price swings
Problem Statement
Rollback Hook is anUhook 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.TThe 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.
Solution
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.
Hackathon
ETHGlobal Buenos Aires
2025
Contributors
- KillariDev
20 contributions