💼B2B fees

Gas Bet Protocol v2: Gas Fees Hedging Architecture

The gas fees hedging architecture within Gas Bet Protocol v2 is composed of several key components and processes, all designed to enable users and paymasters to hedge their operations effectively. This setup can be used to automate strategies that offer predictable and manageable gas fees across various transactions.

1. Actors and Components

  • AA Users: Users who interact with the system via Account Abstraction (AA) wallets.

  • Bundler: The entity responsible for managing and executing user operations.

  • Entry Point: The contract that serves as the primary interface for user operations.

  • Paymaster: A contract that can cover gas fees for transactions, enabling gasless transactions for users.

  • BFEE Hedge Pricing Model: A model that determines the pricing for hedging gas fees using the BFEE token.

2. Operational Flow

  • For Users:

rocess Overview

  1. Initiate Operations (sendOps): Users initiate operations through their AA wallets, which are then sent to the Bundler.

  2. Process Operations (handleOps): The Bundler takes these operations and processes them.

  3. Validate Operations (validateOp): The operations undergo validation to ensure they meet the necessary criteria.

  4. Execute Operations (executeOp): Once validated, the operations are executed.

BFEE Token Transactions

  • Sell BFEE: After execution, the system may sell BFEE tokens as part of its hedging strategy.

  • Buy/Mint BFEE: The system also has the capability to buy or mint BFEE tokens as required to maintain the hedge.

For Paymasters

Gasless Transaction and BFEE Hedging System

Key Processes

  1. Gasless Transactions: Paymasters facilitate gasless transactions by covering gas fees on behalf of users. They later receive ETH refunds for these covered transactions.

  2. Send Operations (sendOps): Paymasters send operations to the Bundler, similar to users.

  3. Handle Operations (handleOps): The Bundler processes the received operations.

  4. Validate Operation (validateOp): Operations are validated for accuracy and compliance.

  5. Validate Paymaster Operation (validatePaymasterOp): Additional validation specific to operations initiated by paymasters.

  6. Execute Operation (executeOp): Once validated, operations are executed.

BFEE Token Transactions

  • ETH Refund: Paymasters receive ETH refunds for the gas fees they cover.

  • Sell BFEE: The system can sell BFEE tokens during execution to manage and hedge against gas fees.

  • Buy BFEE: The system can buy BFEE tokens to maintain a stable hedge against gas fee fluctuations.

Hedging Mechanism

  • BFEE Hedge Pricing Model: This model allows the system to dynamically adjust its BFEE token transactions to hedge against volatile gas prices. By buying and selling BFEE tokens, the system stabilizes gas fee costs for both users and paymasters, making them more predictable.

Interaction Flow

  1. User Initiates Transaction: A user sends a transaction via their AA wallet, which is received by the system through the Entry Point.

  2. Bundler Processes Transaction: The Bundler processes and validates the transaction.

  3. Execute and Hedge: The transaction is executed, and the system adjusts its BFEE holdings to mitigate gas fee volatility.

  4. Paymaster Role: For gasless transactions, the paymaster covers the gas fee upfront and is later reimbursed in ETH. The paymaster also participates in the BFEE hedging process to manage gas fee risks.

This architecture ensures a smooth user experience by decoupling transactions from gas fee volatility, leveraging the BFEE token and a comprehensive hedging strategy to keep costs predictable for both users and paymasters.

Last updated