Q2 2026 Security & Compliance Report67 incidents, $764M in losses, 88% from operational failures.
Get the report →

Audit name:

[SCA] DOP | Token | Jun2025

Date:

Jul 23, 2025

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 DOP (Data Ownership Protocol) team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

Data Ownership Protocol Token (DOP) is the secodn iteration of the existing DOP token. This Burnable ERC20 implementation introduces an upgraded token distribution mechanism based on Time-Weighted Average Price (TWAP)

Document

NameSmart Contract Code Review and Security Analysis Report for DOP (Data Ownership Protocol)
Audited ByTurgay Arda Usman, Khrystyna Tkachuk
Approved ByIvan Bondar
Websitehttps://dop.org/→
Changelog26/06/2025 - Preliminary Report
23/07/2025 - Final Report
PlatformEthereum
LanguageSolidity
TagsERC20, Vesting
Methodologyhttps://hackenio.cc/sc_methodology→
  • Document

    Name
    Smart Contract Code Review and Security Analysis Report for DOP (Data Ownership Protocol)
    Audited By
    Turgay Arda Usman, Khrystyna Tkachuk
    Approved By
    Ivan Bondar
    Changelog
    26/06/2025 - Preliminary Report
    23/07/2025 - Final Report
    Platform
    Ethereum
    Language
    Solidity
    Tags
    ERC20, Vesting

Review Scope

Repositoryhttps://github.com/dop-labs/dop-token→
Initial Commit86b165d
Final Commit5c89912

Audit Summary

6Total Findings
6Resolved
0Accepted
0Mitigated

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

Documentation quality

  • Functional requirements are provided.

  • Technical description is provided.

Code quality

  • The code mostly follows the best practices and style guides.

    • See informational findings for more information.

  • The development environment is configured.

Test coverage

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

  • Deployment and basic user interactions are covered with tests.

  • Negative cases coverage is missed.

  • Interactions by several users are not tested thoroughly.

  • Vesting distribution case from start to finale cycle  is missing.

System Overview

Data Ownership Protocol Token (DOP) is the second iteration of the existing DOP token. This Burnable ERC20 implementation introduces an upgraded token distribution mechanism based on Time-Weighted Average Price (TWAP). It has the following contracts:

DOP  — An ERC-20 token adopts ERC20 Permit and ERC20Burnable libraries. It also has an inflation logic inside for the migration.

It has the following attributes:

  • Name: Data Ownership Protocol

  • Symbol: DOP

  • Decimals: 18

Privileged roles

DOP.sol contract:

  • owner is the administrator of the DOP contract. The owner has the following responsibilities:

    • Enable global transfers. Initially, transfers are disabled and only allowed for whitelisted addresses.

    • Update the treasury address that receives newly minted allocations via the fund() function.

    • Update the dedicatedCaller and accumulator addresses.

    • Grant transfer permissions to specific accounts via the updateAccountState() function (only valid while transfers remain disabled).

    • Add, modify, or remove entries in the inflationTable, which governs the inflation schedule and rate.

  • dedicatedCaller - this address is authorized to perform funding operations by calling the fund() function. Funding is executed based on the fully diluted market capitalization rules defined in the contract.

Potential Risks

The project is fully or partially centralized, introducing single points of failure and control. This centralization can lead to vulnerabilities in decision-making and operational processes, making the system more susceptible to targeted attacks or manipulation.

The protocol utilizes centralized oracles for external data inputs. Dependence on a singular or limited set of data sources can introduce accuracy and manipulation risks, potentially affecting the DApp's operations and decision-making processes.

The token ecosystem grants a single entity the authority to implement upgrades or changes. This centralization of power risks unilateral decisions that may not align with the community or stakeholders' interests, undermining trust and security.

Dependence on external DeFi protocols inherits their risks and vulnerabilities. This might lead to direct financial losses if these protocols are exploited, indirectly affecting the audited project.

The functioning of the system significantly relies on specific external contracts. Any flaws or vulnerabilities in these contracts adversely affect the audited project, potentially leading to security breaches or loss of funds.

Once the vesting begins at START_BLOCK_NUMBER, migration is permanently disabled. Users who fail to migrate within the allowed window will lose access to their legitimate right to receive new tokens, which may result in irreversible loss and user dissatisfaction.

Findings

F-2025-1119Incorrect Decimal Scaling in Market Cap Calculation Leads to Inflation Mechanism Failure
Status
fixed
Severity

High
F-2025-1116Off-by-One Cycle Reference Allows Bypassing the Historical TWAP and Force Spot-Price Inflation
Status
fixed
Severity

High
F-2025-1116TWAP Calculation can be Manipulated via End-of-Cycle Spot Price Skewing
Status
fixed
Severity

High
F-2025-1113Inflation and Price Accumulation Cycles Can Desynchronize
Status
fixed
Severity

Medium
F-2025-1113Lack of Input Validation on Inflation Table
Status
fixed
Severity

Low
F-2025-1113Incorrect Authorization Check Allows Whitelisted Contracts to Bypass User Transfer Restrictions
Status
fixed
Severity

Low
Code
―
Title
Status
Severity
F-2025-1119Incorrect Decimal Scaling in Market Cap Calculation Leads to Inflation Mechanism Failure
fixed

High
F-2025-1116Off-by-One Cycle Reference Allows Bypassing the Historical TWAP and Force Spot-Price Inflation
fixed

High
F-2025-1116TWAP Calculation can be Manipulated via End-of-Cycle Spot Price Skewing
fixed

High
F-2025-1113Inflation and Price Accumulation Cycles Can Desynchronize
fixed

Medium
F-2025-1113Lack of Input Validation on Inflation Table
fixed

Low
F-2025-1113Incorrect Authorization Check Allows Whitelisted Contracts to Bypass User Transfer Restrictions
fixed

Low
1-6 of 6 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://github.com/dop-labs/dop-token→
Initial Commit86b165d
Final Commit5c89912
Whitepapern/a
Requirementshttps://github.com/hknio/dop-labs___dop-token/blob/release/v2.0.0/README.md→
Technical RequirementsProvided Files

Appendix 3. Additional Valuables

Verification of System Invariants

During the audit of DOP, Hacken followed its methodology by performing fuzz-testing on the project's main functions.  Foundry, a smart contrat development tool chain was employed to check how the protocol behaves under various inputs. Due to the complex and dynamic interactions within the protocol, unexpected edge cases might arise. Therefore, it was important to use fuzz-testing to ensure that several system invariants hold true in all situations.

Fuzz-testing allows the input of many random data points into the system, helping to identify issues that regular testing might miss. A specific Foundry fuzzing suite was prepared for this task, and throughout the assessment, 10 invariants were tested over 10,000,000 runs. This thorough testing ensured that the system works correctly even with unexpected or unusual inputs.

Invariant

Test Result

Run Count

mulDiv should match standard division when the product fits in 256 bits.Passed1M+
mulDiv result should satisfy the mathematical floor-division property for all inputs.Failed1M+
mulDivRoundingUp should match standard ceiling division when the product fits in 256 bits.Passed1M+
mulDiv should revert when the denominator is zero.Passed1M+
mulDiv should revert when the final result would overflow a 256-bit integer.Passed1M+
Tick should round-trip through its sqrt ratio back to the same tick.Passed1M+
Sqrt ratio should strictly increase (and decrease) as the tick increases (or decreases).Passed1M+
Derived tick should strictly increase (and decrease) as the sqrt ratio increases (or decreases).Passed1M+
getSqrtRatioAtTick should revert when the tick lies outside the allowed range.Passed1M+
getTickAtSqrtRatio should revert when the sqrt ratio lies outside the allowed range.Passed1M+
  • Invariant

    mulDiv should match standard division when the product fits in 256 bits.

    Test Result

    Passed

    Run Count

    1M+

    Invariant

    mulDiv result should satisfy the mathematical floor-division property for all inputs.

    Test Result

    Failed

    Run Count

    1M+

    Invariant

    mulDivRoundingUp should match standard ceiling division when the product fits in 256 bits.

    Test Result

    Passed

    Run Count

    1M+

    Invariant

    mulDiv should revert when the denominator is zero.

    Test Result

    Passed

    Run Count

    1M+

    Invariant

    mulDiv should revert when the final result would overflow a 256-bit integer.

    Test Result

    Passed

    Run Count

    1M+

    Invariant

    Tick should round-trip through its sqrt ratio back to the same tick.

    Test Result

    Passed

    Run Count

    1M+

    Invariant

    Sqrt ratio should strictly increase (and decrease) as the tick increases (or decreases).

    Test Result

    Passed

    Run Count

    1M+

    Invariant

    Derived tick should strictly increase (and decrease) as the sqrt ratio increases (or decreases).

    Test Result

    Passed

    Run Count

    1M+

    Invariant

    getSqrtRatioAtTick should revert when the tick lies outside the allowed range.

    Test Result

    Passed

    Run Count

    1M+

    Invariant

    getTickAtSqrtRatio should revert when the sqrt ratio lies outside the allowed range.

    Test Result

    Passed

    Run Count

    1M+

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.

Disclaimer