
On Layer2 Incentive Mechanisms: Another Brilliant Use of the Fiat-Shamir Heuristic in FOX
TechFlow Selected TechFlow Selected

On Layer2 Incentive Mechanisms: Another Brilliant Use of the Fiat-Shamir Heuristic in FOX
This article discusses the crucial role of node transaction fees by illustrating the relationship between fees and incentives for nodes to participate in system maintenance, and points out that a well-designed incentive mechanism can effectively safeguard system security.
Authors: Hyun-Gi Meng, Chief Scientist at Fox Tech; Shuiyue Kang, CEO at Fox Tech
Introduction
As a distributed system, Layer1 requires expensive communication overhead to achieve consensus, and extensive computation also consumes significant gas. Therefore, as an extension of Layer1, Layer2 design can effectively improve the efficiency of Layer1. However, from this perspective, Layer2 designs still face a major challenge similar to that of Layer1: how to balance decentralization and efficiency.
zkRollup is a highly promising Layer2 scaling solution that moves computation off-chain while providing zero-knowledge proofs to Layer1 on-chain. In implementing zkRollup, the FOX system adopts the current mainstream architecture with two primary types of nodes: Sequencer and Folder. Simply put, the Sequencer is responsible for ordering and batching user-submitted transactions and updating the state on Layer2, while the Folder generates validity proofs for the Sequencer’s batched transactions and submits them to Layer1.
A meaningful question arises: should Layer2 nodes be decentralized, and if so, how can incentive mechanisms be designed to ensure this? It's clear that the fundamental inefficiency of Layer1 stems from the need for every node to perform extensive computation and communication in order to maintain decentralization. With Layer2 systems, computation is decoupled—however, applying a fully equivalent decentralization model as in Layer1 would again lead to congestion on Layer2 due to the same reasons. Hence, a careful trade-off must be made.
The design of incentive mechanisms involves adjusting how Layer2 nodes receive transaction fees and balancing the distribution of payments to these nodes, thereby encouraging participation in maintaining the Layer2 system. Essentially, just like on Ethereum, the incentive revenue for Layer2 nodes comes from gas fees paid by users submitting transactions. This article explores how nodes in the FOX system participate in collecting transaction fees and explains the rationale behind this approach.
The Role of Gas
First, let us review the role of gas fees in the Ethereum system. Computational resources on Layer1 are limited. When users submit transactions, they specify a gas fee, which generally correlates with the complexity of the transaction execution. Users willing to pay higher gas fees gain priority in transaction processing. Miners are incentivized through the total sum of gas fees collected from the blocks they mine. Additionally, the gas fee mechanism helps prevent malicious contracts (e.g., infinite loops) and limits block size, contributing to overall security.
Therefore, the rational use of gas fees essentially enables efficient scheduling and allocation of on-chain computational resources, reflecting a multi-party game among project teams, miners, and users. Well-designed incentive mechanisms and effective usage and distribution of transaction fees are crucial for smooth system operation.
Transaction Onboarding Process
Users submit transactions to the FOX system’s mempool along with a transaction fee intended to incentivize FOX nodes. The Sequencer node then picks up transactions from the mempool, batches and orders them—each batch forming a Layer2 block. The Sequencer executes the transactions, sends the results to the FOX contract on Layer1, and stores the transaction data in ZK-Ringer to ensure data availability. Subsequently, the Sequencer’s ordering and execution results are passed to Folder nodes. The Folder correctly computes the proof (including proof aggregation) and submits it to the Layer1 contract. In this process, the execution result produced by the Sequencer is immediately reflected in the Layer2 state, while the point at which the transaction achieves Layer1 consensus is considered to be when the Folder’s proof is verified on Layer1.
It is evident that the initial transaction fee attached by the user must cover several costs:
-
Fee paid to the Sequencer
-
Fee paid to the Folder
-
Gas fee for the Sequencer to submit transaction results to Layer1
-
Fee for the Sequencer to store data in ZK-Ringer
-
Gas fee for the Folder to call the contract
To address this, we need to establish specific mechanisms to incentivize all parties involved.
FOX Incentive Mechanism
FOX’s incentive model is relatively novel. First, to balance decentralization and efficiency, we separate node roles into Sequencers, responsible for transaction ordering and execution, and Folders, responsible for generating and aggregating correctness proofs of transaction execution. FOX employs a decentralized model for its Folder nodes—any FOX miner can join the network as a proof generator. To encourage broader participation, Folders that successfully submit correct proofs to the Layer1 contract receive token rewards. Meanwhile, to avoid wastage of computational power, we specify that not only the first prover to submit a valid proof receives a reward. Within a designated time window and quantity threshold following the first successful submission (parameters adjustable based on system conditions), all correct provers can receive partial rewards.

Figure 1: Original version of the incentive model
However, under this mechanism, malicious Folders may launch a sophisticated attack.
Suppose a malicious Folder, denoted as Adv, completes proof generation. It submits the proof to the Verifier contract on Layer1, while simultaneously colluding with other nodes (or nodes controlled by itself) by revealing the precomputed proof. These colluding nodes can then directly submit Adv’s proof without performing any computation and still claim part of the reward. As a result, they gain profit without expending computational effort. From another perspective, Adv gains multiple rewards with minimal work, making it difficult for honest nodes—even those producing correct proofs—to compete.

Figure 2: Attack method by a malicious Folder
The root cause of this issue is that the Verifier cannot distinguish whether each submitted proof was independently generated by the respective Folder, since the proof values are identical. To mitigate this, we incorporate the unique address of each Folder into the proof it submits, ensuring that each proof can only be generated and submitted by its rightful owner.
This integration is achieved cleverly using the Fiat-Shamir heuristic (readers may refer to FOX’s previous article “How to Convert Interactive Proofs into Non-Interactive Ones? Fiat-Shamir Heuristic!” for technical details). During the proof generation process, one step requires the prover (i.e., the Folder) to generate a random challenge via a hash function. By mandating that the Folder’s own address be included in the input of this hash, the resulting challenge becomes uniquely tied to that Folder’s identity, while remaining unpredictable and uncontrollable by the Folder itself.
A rigorous analysis of this method’s security would require deeper cryptographic concepts such as theoretically secure random oracles and indistinguishability—we will not delve into those here. In simple terms, due to the inherent security of hash functions and the Fiat-Shamir heuristic structure, adding a fixed value (such as the Folder’s address) to the hash input does not compromise the unpredictability of the output. Thus, the original security guarantees of the ZKP algorithm remain intact.
With this enhancement, each Folder must independently generate its proof and cannot simply reuse others’ results, achieving our intended goal.

Figure 3: Revised incentive model
Conclusion
Starting from the critical role of node transaction fees, this article has explained the relationship between transaction fees and incentives for node participation in system maintenance. It highlights that well-designed incentive mechanisms are essential for preserving system security. Based on this foundation, we have detailed the Folder incentive mechanism adopted by FOX in its Layer2 system, explaining both its rationale and the technical ingenuity of leveraging the Fiat-Shamir heuristic to achieve secure and fair incentives.
References
"Deep Dive | Iteration and Competition – Ethereum's Layer2 Scaling Journey" Blockchain Research Institute at Guosheng Securities https://www.theblockbeats.info/news/24443
Join TechFlow official community to stay tuned
Telegram:https://t.me/TechFlowDaily
X (Twitter):https://x.com/TechFlowPost
X (Twitter) EN:https://x.com/BlockFlow_News














