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

Audit name:

[SCA] Perceptron Network | PCN Program | Jul2026

Date:

Aug 3, 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 Perceptron Network team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

Perceptron Network is a decentralised data mesh on Solana that turns idle residential bandwidth and human-contributed data into infrastructure for AI data acquisition and agentic web access, rewarding pseudonymous node operators in the native $PERC token as a function of measurable per-epoch performance. The audit covered the PCN Program,a permissioned bandwidth-reward system on Solana that mints PCN reward tokens to network participants based on bandwidth measurements submitted by a trusted oracle. Emissions are bounded by a scarcity and support curve, by the remaining maximum token supply, and by the SOL support budget deposited for each epoch, and users redeem their allocations through per-epoch claim accounts.

Document

NameSmart Contract Code Review and Security Analysis Report for Perceptron Network
Audited ByKerem Solmaz
Approved ByHamza Sajid
Website
Changelog21/07/2026 - Preliminary Report
29/07/2026 - Final Report
PlatformSolana
LanguageRust
TagsClaims, Fungible Token, Oracle, Incentives, Centralization
Methodologyhttps://docs.hacken.io/methodologies/smart-contracts
  • Document

    Name
    Smart Contract Code Review and Security Analysis Report for Perceptron Network
    Audited By
    Kerem Solmaz
    Approved By
    Hamza Sajid
    Website
    Changelog
    21/07/2026 - Preliminary Report
    29/07/2026 - Final Report
    Platform
    Solana
    Language
    Rust
    Tags
    Claims, Fungible Token, Oracle, Incentives, Centralization

Review Scope

Repositoryhttps://github.com/Perceptron-Network/pcn-program
Initial Commita47dbcd
Final Commitf79a076

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

The project provides a technical whitepaper that describes the network architecture, token economics, and the emission and reward-allocation formulas in detail. The whitepaper is the primary specification, and the onchain program implements a subset of it, namely the per-epoch emission curve and per-node reward settlement. Inline documentation in the program is sparse, and the relationship between the implemented arithmetic and the documented formulas is not recorded in the code. Deviations between the implemented emission and reward-weight formulas and the whitepaper specification were identified and reported.

Code quality

The codebase is organised along Anchor conventions with a clear separation between state definitions, instruction handlers, and reward mathematics, and value-determining accounting is performed in checked integer arithmetic. Account validation relies on Anchor constraints, program derived addresses, and explicit authority checks. Several code-quality and best-practice issues were identified and reported, including manual account space calculation and the use of floating point in value-determining curve arithmetic.

Test coverage

Code coverage of the project is unmeasurable. However, the program ships with unit tests for the reward mathematics and a LiteSVM integration suite exercising configuration authority, epoch validation, the rewards flow, and claim validation. Negative and boundary scenarios are represented, though coverage of the permissionless configuration path and of large-magnitude curve inputs is limited. Adding fuzz tests over the emission curve and reward-weight arithmetic, and explicit tests for unauthorized initialization, is recommended.

System Overview

The PCN Program is a reward-distribution system that mints a native SPL token to participants in proportion to bandwidth contribution, as measured off chain and reported by a trusted oracle. The program is deployed on Solana under the Anchor framework and is structured around a single global configuration account and a per-epoch lifecycle that moves each epoch from open, to finalized, to swept.

Initialization creates the singleton configuration account through the initialize_config instruction. During initialization the program creates a nine-decimal SPL reward mint whose mint authority is a program derived address, a SOL reserve account, and a token reserve vault. The configuration account records the admin and oracle authorities, the reward mint, the reserve addresses and their bumps, the lifetime minted amount, the claim window duration in slots, and the curve parameters that drive emissions.

The epoch lifecycle begins with the open_epoch instruction, in which the oracle opens a new epoch and a funder deposits a SOL support budget into the epoch account. After the epoch window ends, the finalize_epoch instruction computes the reward pool from the reported total reward weight, the lifetime minted supply, the remaining maximum supply, and the available SOL support. The consumed portion of the support budget is moved into the SOL reserve, the unused portion is refunded, the reward pool is minted into the epoch token vault, and the lifetime minted amount is increased accordingly. The reward pool is the minimum of the scarcity cap, the support cap, and the remaining supply, which keeps issuance bounded on every axis.

Reward allocation is performed by the oracle through the create_claim instruction, which creates one claim account per user, deriving its address from the epoch identifier and the user key. Each claim records the user, bandwidth units, quality factor, reward weight, and reward amount, and the cumulative allocated amount is constrained to never exceed the epoch reward pool. Users redeem allocations through the claim_reward instruction, which transfers the recorded reward amount from the epoch token vault to a user-owned token account and marks the claim as redeemed so that it cannot be claimed twice. After the claim window expires, the sweep_epoch instruction transfers any unclaimed tokens from the epoch token vault into the token reserve vault and marks the epoch as swept.

The system holds value in three places: the per-epoch token vaults that back user claims, the SOL reserve that accumulates consumed support lamports, and the token reserve vault that accumulates swept and unclaimed tokens. All token movements are authorized by the program mint authority program derived address, and all epoch and claim accounts are isolated by seeds that include the epoch identifier, preventing cross-epoch interference.

Privileged Roles

  • Admin (configuration account): The admin is a single address set at initialization. The admin can rotate the oracle authority, change the claim window length, and replace the entire emission curve parameter set through the configuration update instruction, subject only to basic validity checks and a constraint that the new maximum supply is not below the amount already minted. Changes take effect immediately with no timelock or multisig. Compromise of the admin key would allow redirecting the oracle authority and reshaping future emissions.

  • Oracle (configuration account): The oracle is a single address and holds control over the entire reward flow. The oracle opens epochs, finalizes epochs and thereby determines the aggregate reward weight that drives emission and triggers minting, creates each node's claim with its bandwidth and quality inputs, and sweeps residual balances. The per-node performance score is computed entirely from the two scalars the oracle supplies, so the oracle effectively decides how much every node receives. Compromise or misbehaviour of the oracle key would allow inflating or suppressing emissions within the curve bounds and misallocating rewards among nodes.

  • Mint authority (program derived address): The mint authority is a program derived address with no external key. It signs the reward token minting during finalization and the token transfers during claims and sweeps. Its powers are exercised only through the program instructions and cannot be invoked directly by any external signer.

  • Configuration initializer (initialization instruction): The initialization instruction that creates the singleton configuration account is not access-controlled and can be called by any account, which sets the admin and oracle authorities and binds the reward mint. This is documented in the findings.

Potential Risks

Scope Definition and Security Guarantees: The audit covers the pcn-program only. The Perceptron system described in the whitepaper depends on a substantial offchain infrastructure, including the residential node clients, the performance-metric collection and verification pipeline, and the oracle service that reports aggregate work and per-node scores. The Data Questing bounty distribution, the protocol funding and claim burns, staking, and governance described in the whitepaper are not present in the audited program. These offchain components and unimplemented mechanisms were not assessed, and their correctness is presumed; flaws in the oracle or metric pipeline would directly affect the integrity of onchain emissions and reward allocation regardless of the program's correctness.

Centralized Oracles as Data Sources: The program derives every value-determining quantity from inputs supplied by a single oracle authority. The aggregate reward weight passed to epoch finalization sets the size of the minted reward pool, and the bandwidth and quality inputs passed to claim creation set each node's share. The program applies only range and consistency checks and does not reconstruct or constrain the documented multi-metric performance score, so the accuracy of emissions and reward distribution rests entirely on the honesty and correctness of this single offchain data source. An incorrect or manipulated oracle report would misprice emissions or misallocate rewards among nodes without violating any onchain invariant.

Administrative Key Control Risks: The admin and oracle authorities are each a single address with no multisig or key-separation. The admin can rotate the oracle and rewrite the emission curve parameters, and the oracle controls the full epoch and claim lifecycle. Concentrating the emission-shaping capability and the reward-reporting capability in single keys means that compromise of either key grants control over the reward flow, and the two roles may in practice be held by related parties.

Absence of Time-lock Mechanisms for Critical Operations: The configuration update instruction applies changes to the oracle authority, the claim window, and the emission curve parameters immediately upon a valid admin call. There is no delay, announcement period, or review window before a new curve or a new oracle takes effect, so node operators have no opportunity to observe or react to a change in emission economics or reporting authority before it governs live epochs.

Missing Access Control on Deployment Initialization: The instruction that creates the singleton configuration account enforces no access control and can be executed by any account before the legitimate deployer. The first caller sets the admin and oracle authorities to arbitrary addresses and binds the configuration to a caller-controlled mint, after which the deterministic configuration address cannot be reinitialized. This creates a denial-of-service and identity-hijack risk on deployment and is reported as a finding; deployment should bind initialization to the intended authority atomically or through a trusted deployment procedure.

Findings

Code
Title
Status
Severity
F-2026-1809Unconstrained Refund Recipient In Epoch Finalization Allows Support Budget Refund To Divert From The Original Funder
fixed

Low
F-2026-1808Missing Access Control On Config Initialization Allows Deployment Hijack And Denial Of Service
fixed

Low
F-2026-1809Onchain Emission And Reward-Weight Formulas Diverge From The Whitepaper Specification
fixed

Observation
F-2026-1809Floating-Point Use In Scarcity Curve Loses Integer Precision For Large Reward Pools
fixed

Observation
F-2026-1807Passing The Rent Sysvar As An Account Instead Of Using The Syscall Wastes Transaction Space
fixed

Observation
F-2026-1807Manual Account Space Calculation Without InitSpace Derivation
fixed

Observation
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/Perceptron-Network/pcn-program
Initial Commita47dbcdae999faa5b0703a1d30711c73e58b8dcf
Final Commitf79a0761bc008cd4195cea7de3d48f37f99610de
Whitepaperhttps://docs.google.com/document/d/1WdGkGWHMy32vILSBYGTyAco78nH5Wtk-ofszt1vnbqg
RequirementsREADME.md
Technical RequirementsREADME.md

Assets in Scope

.
src
constants.rs - . › src › constants.rs
error.rs - . › src › error.rs
instructions
claim
claim_reward.rs - . › src › instructions › claim › claim_reward.rs
create_claim.rs - . › src › instructions › claim › create_claim.rs
mod.rs - . › src › instructions › claim › mod.rs
config
initialize_config.rs - . › src › instructions › config › initialize_config.rs
mod.rs - . › src › instructions › config › mod.rs
update_config.rs - . › src › instructions › config › update_config.rs
epoch
finalize_epoch.rs - . › src › instructions › epoch › finalize_epoch.rs
mod.rs - . › src › instructions › epoch › mod.rs
open_epoch.rs - . › src › instructions › epoch › open_epoch.rs
sweep_epoch.rs - . › src › instructions › epoch › sweep_epoch.rs
lib.rs - . › src › lib.rs
rewards.rs - . › src › rewards.rs
state
claim.rs - . › src › state › claim.rs

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