Architecture
Incentive mechanism

Incentive mechanism#

In X Layer, actors are rewarded for executing their jobs correctly and helping the protocol achieve finality.

Note
Unless stated otherwise, the incentive mechanism discussed here applies when the sequencer and aggregator roles are decentralized, meaning there are no trusted sequencers or aggregators involved.

Layer 2 transaction fees and sequencing fees#

The native token used in X Layer is Bridged OKB, which originates from the Ethereum ERC-20 OKB. This is the token used to pay X Layer transaction fees. It can be bridged at a 1:1 exchange rate from Ethereum to X Layer and vice versa. The sequencer plays a crucial role in the network and receives transaction fees paid by users on X Layer when they submit transactions. These fees are paid in Bridged OKB. The exact fee amount depends on the Gas price set by users, indicating how much they are willing to pay for transaction execution.

To motivate the aggregator for each batch it sequences, the sequencer is required to lock a specific number of OKB tokens in the layer 1 ZkEVM.sol contract. The number of tokens locked per batch is determined by the variable batchFee. The final aggregator reward is distributed from [ZkEVM.sol](https://github.com/okx/xlayer-contracts/blob/release/v0.3.1/contracts/v2/consensus/validium/PolygonValidiumEtrog.sol "ZkEVM.sol") in the form of layer 1 OKB tokens.

The diagram below illustrates the different fees and rewards earned by participants within the protocol.

Fees and Rewards

Note
X Layer uses the same incentive mechanism — or detailed rewarding formula for sequencers and aggregators, as Polygon ZKEVM does. You can visit Polygon ZKEVM incentive mechanism to learn more.