Web3 · Smart Contract Audit

Pantos Security Audits

softstack has completed 2 smart contract audits for Pantos in October 2024, reporting 22 findings in total (1 high, 10 medium, 8 low and 3 informational). Every report is published in the softstack public audit archive.

Key facts

Client
Pantos
Audits completed
2
Latest audit
Chains
Ethereum
Languages
Python

About the project

Pantos was a multi-blockchain token system designed to move digital assets between separate blockchain networks. It began as a research project of Bitpanda, the Austrian digital investment platform, and addressed interoperability between otherwise isolated chains. Its token contracts were deployed on Ethereum and other supported networks.

Case study

Findings

Combined across all 2 reviews softstack has completed for Pantos. Each report is broken out below.

0Critical
1High
10Medium
8Low
3Informational

Reports

Newest first. Every report covers its own scope and commit.

  1. Service & Validator Node CODEBASE AND ARCHITECTURE security audit

    · 33 files

    PDF
    0Critical
    0High
    5Medium
    5Low
    2Informational
    ScopeSource repositorygithub.com/pantos-io/servicenode

    Components reviewed

    14 modules · 33 files
    1. .8.1/pantos/servicenode/database/enums.py
    2. .8.1/pantos/servicenode/database/access.py
    3. .8.1/pantos/servicenode/database/__init__.py
    4. .8.1/pantos/servicenode/database/exceptions.py
    5. .8.1/pantos/servicenode/configuration.py
    6. .8.1/pantos/servicenode/plugins/bids.py
    7. .8.1/pantos/servicenode/plugins/__init__.py
    8. .8.1/pantos/servicenode/business/plugins.py
    9. .8.1/pantos/servicenode/business/base.py
    10. .8.1/pantos/servicenode/blockchains/avalanche.py
    11. .8.1/pantos/servicenode/blockchains/solana.py
    12. .8.1/pantos/servicenode/blockchains/polygon.py
    13. .8.1/pantos/servicenode/blockchains/__init__.py
    14. .8.1/pantos/servicenode/blockchains/bnbchain.py
    All 11 findings
    IDTitleSeverityStatus
    6.2.1Error Handling in initialize_package

    If the initialize_package() function encounters an error, the session might still get initialized incorrectly. There is no rollback mechanism or logging to handle such cases.

    Mediumacknowledged
    6.2.2Concurrency Bug in _create_instance Method

    The Pantos service node ecosystem uses various database operations to manage blockchains, contracts, bids, and transfers.

    Mediumfixed
    6.2.3Non-Unique Constraints Handling

    There is a bug in the handling of UNIQUE_SENDER_NONCE_CONSTRAINT in the create_transfer function where, on encountering an IntegrityError, the session is rolled back but not restarted correctly.

    Mediumfixed
    6.2.4Debug Mode in Production

    The debug mode for the Flask application is directly controlled by a configuration flag. This poses a security risk if the debug flag is inadvertently set to True in a production environment.

    Mediumfixed
    6.2.6Broad Exception Handling in get_cross_blockchain_bids Method

    The get_cross_blockchain_bids method in the BidInteractor class uses a broad except Exception: block to capture and handle errors.

    Lowacknowledged
    6.2.7Insufficient Log Message Context

    Current log messages, like _logger.info('Reading cross-blockchain bids from database'), are too generic. They do not provide enough information to pinpoint the exact operation being logged.

    Lowfixed
    6.2.8Broad Exception Handling in update_node_registrations

    The method update_node_registrations is designed to update the service node registrations on all supported blockchains. Within this method, an except Exception block is used to catch and raise a custom NodeInteractorError.

    Lowacknowledged
    6.2.9Error Handling during Table Initialization

    During the initialization of tables in the database, the code does not handle potential exceptions that may occur when adding records. This can lead to unhandled exceptions and potential instability during the table initialization process.

    Lowacknowledged
    6.2.10is_main_module Function Might Not Reliably Detect All Celery Worker Processes

    The is_main_module function in the Celery initialization module might not reliably detect all Celery worker processes, depending on how they're started.

    Lowfixed
    6.2.11Unsafe Assumption in read_transfer_nonce Function

    The read_transfer_nonce function in the module for creating, reading, updating, and deleting database records assumes that the query result will always contain at least one row.

    Informationalfixed
    6.2.12Replace Assertions with Runtime Type Checking

    In entities.py, the CrossChainTransfer class uses assertions for type checking within the from_dict method. Assertions might be disabled in production environments, which could lead to critical type errors going unnoticed.

    Informationalacknowledged
  2. on-chain components for Ethereum and compatible blockchains smart contract audit

    PDF
    0Critical
    1High
    5Medium
    3Low
    1Informational

    4 of 10 resolved

    ScopeSource repositorygithub.com/pantos-io/ethereum-contracts

    Components reviewed

    1 module
    1. See the published report for the file list
    All 10 findings
    IDTitleSeverityStatus
    6.2.1Absence of Slashing Mechanism in Staking System

    The PantosRegistryFacet contract implements a staking system for both tokens and service nodes. However, it lacks a crucial component of many staking systems: a slashing mechanism.

    Highfixed
    6.2.2Unsafe ERC Operation in PantosRegistryFacet.sol

    The PantosRegistryFacet.sol contract contains multiple instances of unsafe ERC20 token transfer operations.

    Mediumacknowledged
    6.2.3Potential Division by Zero and Precision Loss in _transferFee Function

    The _transferFee function in the PantosForwarder contract performs divisions that can lead to potential issues: Division by Zero: The function does not check for zero values in the input parameters, which can cause the function to revert…

    Mediumacknowledged
    6.2.4Potential Denial of Service Due to Unbounded Loops in Token and Service Node Unregistration

    The contract contains unbounded loops in the unregisterToken and unregisterServiceNode functions. These loops iterate over the s.tokens and s.serviceNodes arrays respectively.

    Mediumfixed
    6.2.5Lack of Minimum Value Checks in Critical Parameter Setting Functions

    The PantosRegistryFacet contract contains several functions for setting critical system parameters.

    Mediumacknowledged
    6.2.6Immediate Parameter Changes Pose Risk of System Instability

    The PantosRegistryFacet contract contains several functions that allow the owner to modify critical system parameters.

    Mediumfixed
    6.2.7Decimals Function Not Part of ERC-20 Standard

    The decimals() function is not part of the original ERC-20 standard. It was introduced later as an optional extension through the IERC20Metadata interface. As a result, some valid ERC-20 tokens do not support this interface.

    Lowacknowledged
    6.2.8Symbol Function Not Part of ERC-20 Standard

    The symbol() function is not part of the original ERC-20 standard. It was introduced later as an optional extension through the IERC20Metadata interface. Consequently, some valid ERC-20 tokens do not support this interface.

    Lowacknowledged
    6.2.9Use of Single-Step Ownership Transfer Instead of Safer Two-Step Process

    The PantosBaseToken contract currently uses the Ownable contract from OpenZeppelin for ownership management. This implementation allows for a single-step ownership transfer, which can be less secure.

    Lowacknowledged
    6.2.10Unnecessary Use of pragma abicoder v2 in PantosRegistryFacet.sol

    The PantosRegistryFacet.sol file includes the directive pragma abicoder v2. However, as of Solidity 0.6.0, the ABI coder v2 is considered non-experimental, and starting with Solidity 0.8.0, it is enabled by default.

    Informationalfixed

About this engagement

A smart contract audit reviews on-chain code for flaws an attacker could exploit. Engineers trace how assets move through the contracts, check who can call privileged functions, and test the arithmetic, external calls and upgrade paths. Each finding is rated by severity, and fixes are re-checked before the final report.

How softstack runs smart contract audits

Methodology

Review process

  1. Scoping and threat modelling

    The commit hash is frozen and the attack surface is mapped: asset flows, trust assumptions, privileged roles and the external systems the code depends on.

  2. Automated analysis

    Static analysers sweep the full codebase to surface known weakness patterns, unreachable states and deviations from established conventions.

  3. Manual code review

    Independent engineers read the code line by line, concentrating on business logic, access control, arithmetic and the handling of external calls.

  4. Adversarial testing

    Property-based fuzzing and invariant tests attack the assumptions the protocol relies on, targeting states that ordinary unit tests never reach.

  5. Reporting

    Every finding is documented with a severity rating, its impact, the steps to reproduce it and a concrete remediation the team can act on.

  6. Remediation verification

    Submitted fixes are re-reviewed against the original finding, and the final report records the resolved state of each one.

Standards and references

  • SWC RegistrySmart Contract Weakness Classification
  • CWECommon Weakness Enumeration

FAQ

Pantos was audited by softstack GmbH, a German Web3 security and software company based in Flensburg and certified to ISO/IEC 27001 by TÜV SÜD. softstack has completed 2 smart contract audits for Pantos in October 2024. The published reports are linked on this page and in the softstack public audit archive.

2 separate reviews, the first in October 2024 and the most recent in October 2024. Each one covers its own scope and commit, and is listed individually on this page.

22 findings across all 2 reviews: 1 high, 10 medium, 8 low and 3 informational.

Each report covers the code as it stood at the commit it names, the most recent in October 2024. Any code changed after that point is outside the reviewed scope.

Related audits

Browse all security audits

Disclaimer

This audit represents a point-in-time security assessment of the reviewed codebase and is intended for informational purposes only. While Softstack applies industry-standard security review methodologies, no audit can guarantee the absence of vulnerabilities, bugs, or other security risks. This report does not constitute financial, legal, regulatory, or investment advice, nor does it endorse the project, its business model, products, or services. Security is an ongoing process, and we strongly recommend conducting a new assessment following any material code changes or at least every 6 months to address newly emerging threats, vulnerabilities, and ecosystem developments.