Skip to content

edsphinx/builder-hub

Repository files navigation

Builder-Hub: The GasX Suite of Paymasters

Builder-Hub Logo

GasX is a professional suite of ERC-4337 Paymasters designed to eliminate gas fee friction for any dApp. Sponsor transactions completely with our Whitelist Paymaster, or empower users to pay gas with tokens like USDC using our ERC20 Fee Paymaster. GasX is the flagship protocol of Builder-Hub.

CI Telegram MIT License


✨ Why GasX Matters

On-chain adoption stalls when new users must first acquire a native gas token (like ETH) before they can perform any action. The GasX Suite directly solves this by offering two powerful solutions that dApps can integrate:

  1. Complete Sponsorship (GasXWhitelistPaymaster):

    • Problem: You want to offer a truly free "first mint" or "create profile" experience to onboard new users.
    • Solution: The protocol uses the GasXWhitelistPaymaster to pay 100% of the gas fees for specific, pre-approved actions, creating a frictionless, Web2-like experience.
  2. Convenient Payments (GasXERC20FeePaymaster):

    • Problem: Your users hold stablecoins like USDC but don't have ETH on the right network to pay for gas.
    • Solution: The GasXERC20FeePaymaster allows users to pay for their own transactions using USDC. The protocol handles the on-chain price conversion and pays the network in ETH, abstracting away the native gas token entirely.

The GasX Suite is currently deployed and tested on Arbitrum Sepolia and Scroll Sepolia and is fully compatible with EntryPoint v0.8.


📈 Project Status & Milestones

The GasX Protocol has achieved a feature-complete MVP (Minimum Viable Product) state. The core contracts, tooling, and documentation have been professionally architected, providing a stable foundation for rigorous testnet validation and future expansion.

Category Deliverable Status
Smart Contracts GasXWhitelistPaymaster deployed and verified on-chain.
GasXConfig and MultiOracleAggregator deployed and verified.
GasXERC20FeePaymaster deployed and verified.
GasXSubscriptions subscription & credit payment system.
Tooling Professional, multi-chain Hardhat deployment and testing suite.
Frontend Functional Next.js demo app for gasless transactions.
Testing Unit, Integration, E2E, Fuzz, and Invariant tests with 100% coverage on core.
Security Pausable contracts, emergency withdrawals, events for monitoring.
Documentation Complete /docs suite, including architecture, guides, and references.
Open Source MIT License, CONTRIBUTING.md, and SECURITY.md in place.

The project is fully prepared for deployment and E2E testing on the Arbitrum network.


✅ Comprehensive Test Coverage

The GasX Protocol is rigorously tested using a multi-layered approach to ensure reliability and security. Our test suite includes unit tests, integration tests, fuzz tests, and invariant tests.

Test Type Contract / System Tested Key Verifications
Unit & Integration GasXWhitelistPaymaster Owner-only access, selector whitelisting, gas limit enforcement, oracle signature logic, pausable, emergency withdrawal.
GasXERC20FeePaymaster Token fee payments, price oracle integration, pausable functionality.
GasXSubscriptions Plan management, credit system, ETH/token payments, CEI pattern.
GasXConfig Correct deployment, access control, and parameter updates.
MultiOracleAggregator Oracle management, average/median price calculation, and deviation checks.
Fuzz Testing GasXWhitelistPaymaster 9 fuzz tests with 1,000 runs each.
GasXSubscriptions 9 fuzz tests with 1,000 runs each.
Invariant Testing GasXWhitelistPaymaster 9 invariant properties verified via Echidna.
GasXSubscriptions 7 invariant properties verified via Echidna.
End-to-End (E2E) Full AA Stack (Local) Simulates a complete, sponsored UserOperation on a local Hardhat network.
Full AA Stack (Public) Verifies the entire flow on live testnets (e.g., Arbitrum Sepolia) using a real bundler.

Coverage Summary

Contract Statements Branches Functions Lines
GasXWhitelistPaymaster 100% 88.1% 100% 100%
GasXERC20FeePaymaster 100% 96.88% 100% 100%
GasXSubscriptions 93.18% 68.82% 88.57% 95.57%
GasXConfig 100% 91.67% 100% 100%

The entire test suite is run automatically on every commit via our Continuous Integration pipeline.


🔒 Security Analysis

All smart contracts have been analyzed with industry-standard static analysis tools and passed with zero high/medium severity findings.

Static Analysis Tools

Tool Version High Medium Low Status
Slither 0.10.x 0 0 0 ✅ Pass
Aderyn 0.4.x 0 0 14 ✅ Pass

Security Testing

Test Type Framework Count Status
Unit Tests Hardhat + Chai 344 ✅ Pass
Fuzz Tests Foundry 101 ✅ Pass
Invariant Tests Echidna Configured ✅ Ready

Key Security Features

  • CEI Pattern: All state changes occur before external calls (Checks-Effects-Interactions)
  • Reentrancy Protection: Critical functions follow strict ordering to prevent reentrancy
  • Access Control: Owner-only functions with proper modifiers
  • Pausable: Emergency pause functionality on all paymasters
  • Emergency Withdrawal: Recovery functions for accidentally sent ETH/tokens

Audit Status

Item Status
Internal Security Review ✅ Complete
Static Analysis (Slither/Aderyn) ✅ 0 High/Medium
Fuzz Testing (Foundry) ✅ 101 tests passing
Invariant Testing (Echidna) ✅ Configured
Formal External Audit 🔄 Pending

Full security reports available in packages/hardhat/report-aderyn.md


🛠️ Architectural & Security Highlights

  • Security-First Design: V1 contracts are deployed as immutable for maximum trust. The protocol uses a strict separation of concerns and includes on-chain protections like gas ceilings and selector whitelists.
  • Pausable Contracts: All paymasters can be paused by the owner in case of emergency, using OpenZeppelin's Pausable with whenNotPaused modifier.
  • Emergency Recovery: emergencyWithdrawEth() allows recovery of accidentally sent ETH.
  • Comprehensive Events: All admin actions emit events for monitoring: LimitsUpdated, SelectorUpdated, DevModeChanged, Paused, Unpaused, EmergencyWithdraw.
  • Multi-Paymaster Suite: A suite of specialized paymasters allows dApps to choose the exact tool for their needs.
  • Resilient On-Chain Oracles: A robust MultiOracleAggregator provides reliable price data with built-in deviation checks.
  • Chain-Agnostic Architecture: Professional deployment scripts and a centralized configuration allow for seamless multi-chain support.
  • Off-Chain Extensibility: Paymasters support time-bound signatures from off-chain services for powerful, real-time validation logic.
  • Analytics & Monitoring: Paymasters emit detailed events like GasSponsored on every successful transaction.

🚀 Roadmap

No-Code First Strategy

GasX differentiates from enterprise solutions (Pimlico, Alchemy, Biconomy) by focusing on No-Code/Low-Code tools that enable any project to implement gas sponsorship without developer resources.

Quarter Phase Key Deliverables Status
Q3 2025 Foundation & Core Infrastructure - GasXWhitelistPaymaster: Deployed on Arbitrum & Scroll Sepolia.
- GasXConfig & MultiOracleAggregator: Multi-oracle price feeds.
- Oracle Adapters: DIA & Euler adapters with factory deployment.
Q4 2025 USDC & Subscriptions - GasXERC20FeePaymaster: Token fee payments (100% coverage).
- GasXSubscriptions: Tiered subscriptions with credit system.
- Security Prep: 344 tests, 101 fuzz tests, Slither & Aderyn clean.
Q1 2026 No-Code Platform v1 - Admin Dashboard: Visual paymaster configuration & monitoring.
- Campaign Builder: Create gas sponsorship campaigns without code.
- Whitelist Manager: CSV import, API integrations, rule builder.
📝
Q2 2026 Platform Expansion - Analytics Dashboard: Usage metrics, spending reports, user insights.
- Embed Widget: Copy-paste integration snippet for any website.
- Webhook/Zapier: Connect with existing tools and workflows.
- Mainnet Deployment: Arbitrum, Base, Scroll mainnets.
📝

📘 Documentation

Comprehensive technical documentation for the GasX protocol is maintained in the /docs directory. The best place to start is the Documentation Hub (/docs/index.md).


🔨 Quick Start (Local Development)

1. Prerequisites

  • Node.js: 20.19.3 (Exact version recommended)
  • Yarn: v3.x or higher

2. Setup & Run

# Clone the repo and install dependencies
git clone [https://github.com/edsphinx/builder-hub.git](https://github.com/edsphinx/builder-hub.git)
cd builder-hub
yarn install

# In one terminal, run the local blockchain & deploy contracts
cd packages/hardhat
yarn deploy

# In a second terminal, start the frontend demo
cd packages/nextjs
yarn start

The frontend is now available at http://localhost:3000.


🤝 Contributing & Security

The GasX Protocol is an open-source project. We welcome contributions and take security very seriously. Please see our Contributing Guide and our Security Policy.

👥 Core Team

Name Role GitHub / X
edsphinx Lead Solidity / ZK @edsphinx / @oFonCK

✍️ Licence

MIT – see LICENSE.


Made with ♥ in Honduras. Coming soon to Arbitrum, Base, Scroll, and more.

About

Modular Web3 toolkit – ERC-4337 Paymaster, Allo QF strategy, Circle CCTP widget, Gas-tracker

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •