What is Taiko? Taiko is a secure, decentralized, and permissionless rollup on Ethereum. Taiko achieves this by:
writing all block data required to reconstruct the post-block state to Ethereum. Recording block data to Ethereum as an L1 makes the data decentralized and public. This data is needed for everyone to know the latest chain state to add new blocks to Taiko. Taiko's proof generation requires an even stricter requirement: all executable data must be saved publicly in sequence. Consequently, provers can generate proofs for a block using only publicly known data. creating and proposing blocks should be a fast and efficient process. Anyone should be able to add blocks to the chain on a level playing field, having access to the same chain data at all times. Proposers, of course, should be able to compete on e.g., transaction fees and Maximal Extractable Value (MEV). We achieve this by splitting the block submission process into two parts:
Block proposal When a block gets proposed, the block data is published on Ethereum, and the block is appended to the proposed blocks list stored in the TaikoL1 contract. Once registered, the protocol ensures that all block properties are immutable. This makes the block execution deterministic: the post-block state can now be calculated by anyone. As such, the block is immediately verified. This also ensures that no one knows more about the latest state than anyone else, which would create an unfair advantage.
Block verification Because the block should already be verified once proposed, it should not be possible for the prover to have any impact on how the block is executed and what the post-block state is. All relevant inputs for the proof generation are verified on L1 directly or indirectly to achieve deterministic block transitions. As all proposed blocks are deterministic, they can be proven in parallel, because all intermediate states between blocks are known and unique. Once a proof is submitted for the block and its parent block, we call the block on-chain verified.
The L2 block space Although block space is much cheaper than on L1, it is still necessary to adjust its price in a way to avoid L2 space being abused. EIP-1559 on Taiko dynamically adjusts the block space price.
Rate limiting using EIP-1559 Although rollups can have significantly higher network capacity than L1s, this capacity is not without limit. As such the protocol needs to be able to limit how much work the L2 network needs to do to keep up with the tip of the chain. Ethereum already has a mechanism in place to do just that with that we can use as well.
proposed At block proposal we keep track of how much work (measured in gas) is required to process the block, while subtracting the amount of work the Taiko network can handle. This effectively creates a market for network capacity (in gas) per ETH. This will impact how expensive Taiko block space is (paid by the block proposer), the higher the demand the higher the network fee (a fee paid to the Taiko DAO). This way, rate limiting is achieved in a way that does not simply impose a hard and inefficient cap on the network, instead this mechanism allows users to utilize the network in a fair way while allowing the Taiko network to capture the created value. And because the same mechanism is used on Ethereum it allows Taiko to be Ethereum equivalent (with some small implementation detail changes) even for this part of its network, which is not obviously the case for L2s.
EIP-1559 powered prover fees Proving blocks requires significant compute power to calculate the proof to submit and verify the proof on Ethereum. Provers need to be compensated for this work as the network needs to attract provers that are willing to do this work. How much to pay for a proof is not obvious however:
The Ethereum gas cost to publish/verify a proof on Ethereum is unpredictable. The proof generation cost does not necessarily match perfectly with the gas cost. The proof generation cost keeps changing as proving software is optimized and the hardware used gets faster and cheaper. The proof generation cost depends on how fast a proof needs to be generated. Because the proving cost impacts the transaction fees paid by the users, the goal is to pay only as much as required for the network to function well. This means not underpaying provers because blocks may remain unproven, but certainly also not overpaying provers so that it doesn’t make sense to incur very high costs to try and generate proofs as quickly as absolutely possible. A good balance is key to a well working solution that takes into account the needs of the different network participants. It’s clear that a fixed proving fee does not work. The protocol should also not be dependent on a single prover for a block because this will put too much power in the hands of a single entity that can impact the stable progress of the chain.
The network, somehow, has to find the correct price between two resources where the demand/supply is ever changing. We can model this problem as a market between the proving fee (per gas) per proof delay (per time unit), striking a dynamic balance between proving cost and proof delay. An additional complication is that the protocol expects the block proposer to pay the proving fee at block proposal time. As such, the baseFee of this model is used to charge the proposer of a block using the total gas used in the block. This is only an estimate of the actual cost because the actual cost is only known when the proof is submitted. If the estimated cost was too high the difference is returned to the block proposer and the baseFee is decreased. If the estimated cost was too low extra Taiko tokens are minted to make up the difference and the baseFee is increased. To lower the chance that the estimated cost is too low and extra Taiko tokens need to be minted, a slightly higher baseFee can be charged to the proposer than the one predicted by the model.
EIP-4844 scaling via blob data EIP-4844 is an Ethereum upgrade that bolts blob data to consensus layer blocks.