6.2 Flexible Gas Mechanism

NERO developed a module called Paymaster, which is responsible for managing the payment of transaction fees associated with user operations on the blockchain. As part of the account abstraction model, the Pay Master serves to abstract the handling of transaction fees away from the users and into a centralized contract entity, streamlining the fee payment process and enhancing user experience.

The primary function of the Pay Master is to facilitate the payment of transaction fees incurred by users when interacting with the blockchain. In traditional blockchain systems, users are required to manually include transaction fees with each transaction they submit to the network. However, in account abstraction, this responsibility is shifted to the Pay Master contract, relieving users of the burden of managing transaction fees directly. When a user initiates a transaction or performs any other operation that incurs a fee, the corresponding operation is processed through the Pay Master contract. The Pay Master calculates the appropriate fee based on factors such as the complexity of the operation and current network conditions. It then deducts the fee from the user’s account balance or prompts the user to authorize the payment of the fee through a separate mechanism.

Furthermore, the Pay Master may incorporate additional features and functionalities to enhance its capabilities. For example, it may implement dynamic fee adjustment algorithms to optimize fee pricing based on network congestion levels or user preferences. It may also support various payment methods and fee structures to accommodate diverse user needs and preferences.

Figure 8

Figure 8: Flexible gas fee mechanism