Relayers

What do Relayers do?

There are two types of relayers in the system - state relayer and message relayer.

Importantly, both of the relayers' described ensure the liveness of the system and not the security of the system. The protocol security is derived from cryptography and verified through smart contracts. As long as there is at least one relayer willing to perform the job, the system will continue to be secure under the standard technological risks (circuits and smart contract bugs).

State Relayer

In order to perform this job, the State Relayers are incentivized with a fee in ETH sent by the message sender. The fee structure is not yet finalized but will either look like the Ethereum gas auction pre-EIP1559 or inherit the EIP1559 fee model.

Importantly, the role of a state relayer is permissionless and anyone can decide to be a relayer - monitor L1, produce proofs and earn fees. dApps can deploy their own Relayers and utilise the protocol without relying on external entities.

Message Relaying

  • An Optimism State Root and other artefacts needed for the contract to construct an Optimism Output Root.

  • A Merkle Patricia Tree Inclusion Proof that an Output Root that contains the sent message in its State Root is present inside the Ethereum L1 Optimism L2OutputOracle contract.

Running a Relayer

The information below is based on the alpha version of the Wisp protocol in which ZK circuits are based on Proof of Consensus.

For the most up-to-date information on running the relayer check out the repo readme:

https://github.com/LimeChain/wisp

Benchmarks

Hardware Requirements

32 core 3.1 GHz; 256 GB RAM; 1 TB SSD; Currently using AWS r6a.8xlarge running Ubuntu 22.04

Costs

Two types of costs exist for the relayers.

Infrastructure

Based on the hardware requirements above in AWS this costs ~$45/day

Transaction Fees

Secondly is the transaction costs inside the destination rollup.

There are numerous improvements that could be made in both the ZKP and On-chain part, thus we expect this cost to drop with newer versions.

Last updated