What is an Mad Science Project Idea?
A Mad Science Project Idea is an idea for a project within the Optimism ecosystem that may not have clear value but is generally cool as heck. Mad Science Project Ideas make great hackathon projects and tend to be a great way to explore Optimism, OP Mainnet, and the OP Stack.
The OP Stack makes it possible to trigger actions on L2 based on things that happen on L1. One powerful mechanism that an OP Stack chain could introduce is the ability to register "hooks" that are automatically triggered when certain events are emitted on the L1 chain. Doing so would require modifying the derivation layer of the OP Stack in a manner similar to the example modification found within the OP Stack documentation.
An ideal hook system would allow any address to register a hook via a smart contract on L2 by providing the L1 address, an event filter, and a function to be triggered whenever the event is emitted. You may have to come up with a fee mechanism that accounts for the cost of checking for events each time a new block is introduced. It may also be necessary to supply a maximum number of hooks that can be registered at any point.