The Hacken 2025 Yearly Security ReportCovers major Web3 breaches, their root causes, prevention insights, and key regulatory trends for 2026.
Learn more

Audit name:

[SCA] ADI Chain | Gasless Paymaster | Feb2026

Date:

Feb 24, 2026

Table of Content

Introduction
Audit Summary
System Overview
Potential Risks
Findings
Appendix 1. Definitions
Appendix 2. Scope
Appendix 3. Additional Valuables
Disclaimer

Want a comprehensive audit report like this?

Introduction

We express our gratitude to the ADI Chain team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

GaslessPaymaster implements an ERC-4337 (account abstraction) paymaster that sponsors gas fees on behalf of users, enabling gasless transactions.

Document

NameSmart Contract Code Review and Security Analysis Report for ADI Chain
Audited ByOlesia Bilenka; Ivan Bondar
Approved ByIvan Bondar
Websitehttps://www.adi.foundation/
Changelog04/02/2026 - Preliminary Report
11/02/2026 - Interim report
24/02/2026 - Final Report
PlatformEthereum
LanguageSolidity
TagsSignatures, Meta Transactions, Centralization, ERC4337
Methodologyhttps://docs.hacken.io/methodologies/smart-contracts
  • Document

    Name
    Smart Contract Code Review and Security Analysis Report for ADI Chain
    Audited By
    Olesia Bilenka; Ivan Bondar
    Approved By
    Ivan Bondar
    Changelog
    04/02/2026 - Preliminary Report
    11/02/2026 - Interim report
    24/02/2026 - Final Report
    Platform
    Ethereum
    Language
    Solidity
    Tags
    Signatures, Meta Transactions, Centralization, ERC4337

Audit Summary

16Total Findings
16Resolved
0Accepted
0Mitigated

The system users should acknowledge all the risks summed up in the risks section of the report

{Finding_Table?columns=title,severity,status&setting.filter.type=Vulnerability}

Documentation quality

  • Functional requirements are provided.

    • Project overview is detailed

    • Main flows are described

    • Includes system architecture

  • Technical description is complete.

    • Run instructions are provided.

    • NatSpec is sufficient.

    • Technical specification is provided.

Code quality

  • The development environment is configured.

Test coverage

Code coverage of the project is 87.16% (branch coverage).

  • Deployment and basic user interactions are covered with tests.

System Overview

GaslessPaymaster implements an ERC-4337 (account abstraction) paymaster that sponsors gas fees on behalf of users, enabling gasless transactions. It integrates with the eth-infinitism/account-abstraction v0.7 EntryPoint singleton — the protocol-level contract that orchestrates UserOperation validation, execution, and gas accounting. The paymaster holds an ETH deposit at the EntryPoint, which is debited to cover gas costs for sponsored operations and refunded for unused gas after execution.The contract provides two independent authorization paths for gas sponsorship:

  1. Whitelist path — An admin-configured per-address allowlist with optional fee-per-gas caps, gas-volume caps, time windows, and transaction count limits. A global maxCostPerOperation bound applies across both paths. Whitelisted senders require no signature; the paymaster sponsors any operation from an active whitelisted address that satisfies the configured constraints.

  2. Signature path — An off-chain verifier (holding VERIFIER_ROLE) signs a commitment hash over a subset of UserOperation fields and fee caps. The on-chain contract recovers the signer, verifies the role, enforces fee caps embedded in the paymasterAndData, and marks the signature as used to prevent replay.

The contract inherits BasePaymaster (which provides EntryPoint integration, deposit/stake management, and Ownable access control), OpenZeppelin's AccessControl (for role-based administration), and Pausable (for emergency stops). This dual inheritance creates two independent authority systems governing different aspects of the contract.

Files in scope

  • GaslessPaymaster.sol — ERC-4337 paymaster supporting dual-path gas sponsorship (whitelist and verifier signature). Validates UserOperations during the EntryPoint's validation phase, returns context for post-execution processing, and emits events in _postOp. Manages whitelist configurations, transaction counters, and signature replay tracking.

Privileged Roles

  • VERIFIER_ROLE - only allowed signer in _validatePaymasterUserOp unless the caller is whitelisted.

  • DEFAULT_ADMIN_ROLE - can pause the contracts, setup whitelisted addresses, revoke signatures.

  • owner - ability to withdraw deposit, as well as add/unlock/withdraw stake from the EntryPoint. Gated by pause state via _checkOwner override; fund management is blocked while the contract is paused.

  • entryPoint - only allowed caller of validatePaymasterUserOp and postOp.

Potential Risks

Permissions, Authorization & Access

  • Dual Authority Model from Mixed Inheritance: The contract inherits Ownable (via BasePaymaster) and AccessControl (directly), establishing two independent authority systems. At deployment, ownership is transferred to defaultAdmin, aligning both systems initially. However, owner and DEFAULT_ADMIN_ROLE can subsequently diverge, transferOwnership and renounceOwnership are callable by the owner independently of AccessControl, and DEFAULT_ADMIN_ROLE can be granted to additional addresses independently of Ownable. Continued alignment of the two authority systems depends on operational discipline.

  • Standing Authorization via Whitelist: Whitelisted addresses receive ongoing gas sponsorship without per-operation verifier approval, bounded only by configured fee caps, time windows, and transaction count limits.

Centralization

  • Single Point of Failure for Fund Custody: The owner address can unconditionally withdraw the entire EntryPoint deposit without time-lock, or multi-signature constraints.

  • Centralized Verifier Trust: The signature path relies on off-chain verifiers holding VERIFIER_ROLE. Compromise of a verifier key permits issuance of arbitrary sponsorship signatures until the role is revoked.

Gas Accounting & Operational Continuity

  • Pre-Funded Deposit Model: All sponsored operations draw from a shared deposit at the EntryPoint. No on-chain mechanism exists for automatic pause or alert when the deposit falls below a safe threshold.

Findings

Code
Title
Status
Severity
F-2026-1500Unsigned preVerificationGas in Paymaster Commitment Hash Enables Full Deposit Drain via a Single Sponsored UserOperation
fixed

Critical
F-2026-1500Whitelisted Addresses Can Drain Full Deposit Regardless of Configured Caps
fixed

High
F-2026-1500Missing requiredPreFund Validation Allows Uncontrolled Operation Costs
fixed

High
F-2026-1501Split Ownership Between Ownable and AccessControl Allows Deployer to Drain Paymaster Funds
fixed

Medium
F-2026-1521Improper Comparison of Packed accountGasLimits Allows Bypass of callGasLimit Cap
fixed

Low
F-2026-1504No Global Safety Caps for Gas Parameters in Signature Validation Path
fixed

Low
F-2026-1501Missing Input Validation on Admin Configuration Functions
fixed

Low
F-2026-1501Paused State Does Not Gate Fund Withdrawal Functions
fixed

Low
F-2026-1501Atomic Whitelist Configuration Not Supported
fixed

Low
F-2026-1492Excessively Trusted Whitelisted Users Bypass all Transaction Protections
fixed

Low
1-10 of 16 findings

Identify vulnerabilities in your smart contracts.

Appendix 1. Definitions

Severities

When auditing smart contracts, Hacken is using a risk-based approach that considers Likelihood, Impact, Exploitability and Complexity metrics to evaluate findings and score severities.

Reference on how risk scoring is done is available through the repository in our Github organization:

Severity

Description

Critical
Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation.

High
High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation.

Medium
Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category.

Low
Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution.
  • Severity

    Critical

    Description

    Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation.

    Severity

    High

    Description

    High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation.

    Severity

    Medium

    Description

    Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category.

    Severity

    Low

    Description

    Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution.

Potential Risks

The "Potential Risks" section identifies issues that are not direct security vulnerabilities but could still affect the project’s performance, reliability, or user trust. These risks arise from design choices, architectural decisions, or operational practices that, while not immediately exploitable, may lead to problems under certain conditions. Additionally, potential risks can impact the quality of the audit itself, as they may involve external factors or components beyond the scope of the audit, leading to incomplete assessments or oversight of key areas. This section aims to provide a broader perspective on factors that could affect the project's long-term security, functionality, and the comprehensiveness of the audit findings.

Appendix 2. Scope

The scope of the project includes the following smart contracts from the provided repository:

Scope Details

Repositoryhttps://gitlab.sre.ideasoft.io/adi-foundation/custody-core/smart-contracts/-/blob/main/contracts/GaslessPaymaster.sol
Initial Commitb017eb6
Final Commit3ca0338
Whitepaperhttps://docs.adi.foundation/whitepaper
Requirements./Readme.md
Technical Requirements./Readme.md

Assets in Scope

GaslessPaymaster.sol - GaslessPaymaster.sol

Appendix 3. Additional Valuables

Additional Recommendations

The smart contracts in the scope of this audit could benefit from the introduction of automatic emergency actions for critical activities, such as unauthorized operations like ownership changes or proxy upgrades, as well as unexpected fund manipulations, including large withdrawals or minting events. Adding such mechanisms would enable the protocol to react automatically to unusual activity, ensuring that the contract remains secure and functions as intended.

To improve functionality, these emergency actions could be designed to trigger under specific conditions, such as:

  • Detecting changes to ownership or critical permissions.

  • Monitoring large or unexpected transactions and minting events.

  • Pausing operations when irregularities are identified.

These enhancements would provide an added layer of security, making the contract more robust and better equipped to handle unexpected situations while maintaining smooth operations.

Frameworks and Methodologies

This security assessment was conducted in alignment with recognised penetration testing standards, methodologies and guidelines, including the NIST SP 800-115 – Technical Guide to Information Security Testing and Assessment , and the Penetration Testing Execution Standard (PTES) , These assets provide a structured foundation for planning, executing, and documenting technical evaluations such as vulnerability assessments, exploitation activities, and security code reviews. Hacken’s internal penetration testing methodology extends these principles to Web2 and Web3 environments to ensure consistency, repeatability, and verifiable outcomes.

Disclaimer

ADI Chain audit by Hacken