project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

superchain's smart Layer

An op-stack indexer chain, which empowers smart contracts developers with the ability to subscribe to a blocks events, derived from it's Data Availability Layer, and also register function hooks to be executed when such events occur on the Data Availability Layer.

superchain's smart Layer

Created At

Superhack

Project Description

OPSSL or Optimism Superchain's SmartLayer is a proof-of-concept Implementation of an "EVM Based Event-Triggered Transactions Blockchain", built on top of the op-stack a.k.a Optimism's Bedrock rollup architecture.

A more straightforward definition of this is, The op-stack makes it possible to trigger actions on L2 based on things that happen on L1. For our hack, we added a new mechanism to the op-stack, which introduces the ability for smartcontract developers to register "Hooks" that are automatically triggered when certain events are emitted on the L1 chain. We achieved this by modifying the derivation layer of the op-stack in a manner a bit similar to the example modification found within the op-stack documentation and how the op-stack derives deposits.

This is a mad-science project idea as described in the Optimism's ecosystem contribution page, https://github.com/orgs/ethereum-optimism/projects/31/views/3?pane=issue&itemId=28486770.

Features:

  1. Allows smartcontract developers to specify an L1 block number they are subscribing too, and register with it a hook on the Event Registry smart contract on L2.

  2. Modifies the derivation layer so it triggers L2 contracts based on the registered hooks and slot this triggered transactions in the second block of the sequencing epoch.

  3. Charges a fee for event subscriptions and hook execution.

In summary, OPSSL does two (2) things;

  1. Derives events from L1 or any data availability layer (for our hack we are using Goerli-Ethereum) as requested by a smart-contract developer, and stores this event's value on L2.

  2. Triggers a specified smartcontract's function, when a subscribed event occurs.

How it's Made

We updated the derivation function, to do the following

  1. To keep track of the current L1 block number and announce it on the L2 smart contract called EventRegistry.sol.

  2. To bundle build transactions out of the function hook's events in the second block of every sequencer epoch.

Now the first block contains deposited transactions, and the second evm triggered transactions.

background image mobile

Join the mailing list

Get the latest news and updates