pNetwork audit reports

Arbitrum, BNB Chain, Ethereum, Polygon (POS)p.networkXGitHub

pNetwork has 2 public audit reports from CertiK; the latest is CertiK, 6 Jan 2023; no critical findings reported. It also holds 1 incident (latest 18 Sep 2021).

Critical findings
No open critical findings
Across 2 reports.
Incident
Incident 18 Sep 2021
Source: De.Fi incident database. 2 audits have been published since. See the incident
Open the latest report
Your label, live
Get the label for your site

Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.

Open findings across every firm15

Statuses are the security firms’ own

15 findings are still open or acknowledged in the firms’ reports: 3 medium, 12 low (14 open, 1 acknowledged).

Medium
3
Low
12
  • Medium Open

    `maybe_initialize_core` functions don't check tra

    pNetwork · CertiK · 6 Jan 2023 · Report ↗

  • Medium Open

    Risk For Weak Randomness

    pNetwork · CertiK · 6 Jan 2023 · Report ↗

  • Medium Acknowledged

    Dependency on Valid Block Input

    pNetwork - Audit 2 · CertiK · 16 Dec 2022 · Report ↗

  • Low Open

    `get_eos_enabled_protocol_features_from_db` shoul

    pNetwork · CertiK · 6 Jan 2023 · Report ↗

  • Low Open

    DICTIONARIES/eos_eth `convert_eos_asset_to_eth_am

    pNetwork · CertiK · 6 Jan 2023 · Report ↗

  • Low Open

    Document process of adding new `chain_ids` to eco

    pNetwork · CertiK · 6 Jan 2023 · Report ↗

  • Low Open

    ETH_TRANSACTION `EthTransaction` uses legacy tran

    pNetwork · CertiK · 6 Jan 2023 · Report ↗

  • Low Open

    Functions not critical for production should be l

    pNetwork · CertiK · 6 Jan 2023 · Report ↗

  • Low Open

    Non public data (e.g. private keys) should be enc

    pNetwork · CertiK · 6 Jan 2023 · Report ↗

  • Low Open

    Incomplete `Rinkeby` implementation in `validate_

    pNetwork - Audit 2 · CertiK · 16 Dec 2022 · Report ↗

All 15 open and acknowledged findings

Incidents1

Attached through a shared contract address. Our incident data ends in Nov 2026.

Incident

Incident,

Source: De.Fi incident database.

Audits before it
0.
Audits since
2, the latest dated 6 Jan 2023.

Audits2

Newest first

ReportSecurity firmDateScopeCritical findingsFindingsSource
pNetworkSecurity firm: CertiKDate: Scope: Not recorded; see the reportNone openFindings: 6 high · 8 medium · 28 low
34 fixed · 8 open
skynet.certik.com ↗
pNetwork - Audit 2Security firm: CertiKDate: Scope: Not recorded; see the reportNone openFindings: 2 medium · 10 low
5 fixed · 1 acknowledged · 6 open
skynet.certik.com ↗

Findings54

Statuses are the security firm’s own, from each report.

SeverityOpenAcknowledgedFixed
Critical000
High006
Medium217
Low12026
Medium`maybe_initialize_core` functions don't check trapNetwork · CertiK · 6 Jan 2023Open

As directed in the `README` file of the project, the first trusted block that is sealed to the database should not contain any transactions related to pTokens otherwise they will be ignored. The list of transactions are a part of the valid JSON format in which the block is submitted and parsed. However, there is no step in the transaction of the core with the database (different from an actual btc "transaction") where the list of transactions are checked for ptoken transactions. Risk: user of library can accidentally supply initial block with transactions that will be silently ignored.

Open the report
MediumRisk For Weak RandomnesspNetwork · CertiK · 6 Jan 2023Open

Currently `get_x_random_bytes` relies on `thread_rng()` which is the standard random generator that takes randomness from the system. This may allow attacker to reduce search space of potential random seeds and cause brute force attack against private keys, feasible.

Open the report
Low`get_eos_enabled_protocol_features_from_db` shoulpNetwork · CertiK · 6 Jan 2023Open

The function `get_eos_enabled_protocol_features_from_db` will accept all features that are fetched from database regardless if they are correct, supported, or known. This may lead to situation where an attacker who managed node operators in the past has enabled features that are not present or known to current version of software (i.e. could clean traces after their activity).

Open the report
LowDICTIONARIES/eos_eth `convert_eos_asset_to_eth_ampNetwork · CertiK · 6 Jan 2023Open

If converting an asset from lower precision to higher precision there is a loss of information. For example from 9 decimal places of precision to 18 decimal places of precision, there is a loss of information. It is unclear how the dust is treated in such a case. This occurs for each of the conversion functions: - `convert_u64_to_eos_asset()`; - `convert_u256_to_eos_asset_string;convert_eos_asset_to_eth_amount()`.

Open the report
LowDocument process of adding new `chain_ids` to ecopNetwork · CertiK · 6 Jan 2023Open

Currently, there is no established process described in the code for introducing new ids in the `chain_ids` Enum. It puts the ecosystem at risk since if there are contributors creating new bridges, they may create overlapping identifiers for chains which could result in collisions.

Open the report
LowETH_TRANSACTION `EthTransaction` uses legacy tranpNetwork · CertiK · 6 Jan 2023Open

Currently, Ethereum transactions are formatted as legacy transactions using `gas_price`. This causes the gas fees and hence transactions fees to be maximized as `max_priority_fee_per_gas` is set to `transaction.gas_price` and `max_fee_per_gas` is set to `transaction.gas_price`.

Open the report
LowFunctions not critical for production should be lpNetwork · CertiK · 6 Jan 2023Open

Currently a lot of functions that are not meant to be used in production code are not explicitly limited to debug mode with `#[cfg(feature = "debug")]` . This mean lead to accidentally compiling functions never intended to be used in production , into release build , and creating new attack vectors.

Open the report
LowNon public data (e.g. private keys) should be encpNetwork · CertiK · 6 Jan 2023Open

Data is written to DB (database) without encryption. If any existing database is persistent outside TEE, that implies that private keys (and other non-public data) can leak from TEE to outside.

Open the report
LowIncomplete `Rinkeby` implementation in `validate_pNetwork - Audit 2 · CertiK · 16 Dec 2022Open

The block hash validation for `Rinkeby` is skipped in `validate_block_in_state`. ```rust if chain_id == EthChainId::Rinkeby { // FIXME/TODO Add in rinkeby block validation! info!("✔ Skipping Rinkeby ETH block header validaton!"); Ok(state) } else { ... } ``` The block will not be validated when a `Rinkeby` block is used as input.

Open the report
LowMissing Feature Flag For Debug FunctionpNetwork - Audit 2 · CertiK · 16 Dec 2022Open

Based on the linked comment, the function initiated with `debug_` should only be used in debug mode.

Open the report
Show 4 more
LowPotential Loss of Asset on AlgorandpNetwork - Audit 2 · CertiK · 16 Dec 2022Open

According to the [Algorand developing manual](https://developer.algorand.org/docs/get-details/asa/#receiving-an-asset), in order to receive the corresponding asset on Algorand, the address needs to opt-in to receive it. Therefore, when performing a cross bridge transaction, if the receiver address does not opt-in to receive the corresponding pToken, the transfer invocation will revert, thus causing potential unexpected loss.

Open the report
LowPotential Private key leaks in source codepNetwork - Audit 2 · CertiK · 16 Dec 2022Open

There are multiple private keys leaked in the source code via the test section. For instance, in the file `submit_int_block.rs`, the private key of the address N4F4VB7GYZWL2RRTMQVMBKM5GKTKDTOHVB5PHGQYFB6XSXR3MRYIVOPTWE can be found. At the time of writing the report, there is `0.99 ALGO` in this address. The PoC below shows how the address was retrieved from the private key and how the balance of the address was retrieved. \ The real private key is not shown for security reasons. ```python #pip3 install bip_utils import binascii, requests, json from time import sleep from bip_utils import Bip44, Bip44Coins, Bip44Changes def getAddressFromPK(priv_key_bytes): bip44_key = Bip44.FromPrivateKey(priv_key_bytes, Bip44Coins.ALGORAND) address=bip44_key.PublicKey().ToAddress() return address def getAlgoBalance(address): pattern1="https://indexer.algoexplorerapi.io/v2/accounts/" pattern2="?include-all=false&apps-local-state-limit=50&assets-limit=50&exclude=created-apps,created-assets" url=pattern1 + address + pattern2 reponse=requests.get(url) jsonResponse=json.loads(reponse.text) balance=str(jsonResponse['account']['amount'] / 10**6) return balance array=[ ["ALGO_N4F4", binascii.unhexlify(b"abc123...")], ["...","..."], ] for item in array: try: address=getAddressFromPK(item[1]) print("Balance of " + str(item[0]) + " : " + str(getAlgoBalance(address))) except: print("Request failed for address " + str(address)) ``` ```text $ python3 test.py Balance of ALGO_N4F4 : 0.993001 ```

Open the report
LowRisk For Weak RandomnesspNetwork - Audit 2 · CertiK · 16 Dec 2022Open

Currently, the program generates private keys while initializing the Algo core or INT core via the following random functions: - For `maybe_initialize_algo_core`: ```rust pub fn create_random() -> Self { Self(Keypair::generate(&mut OsRng {})) } ``` - For `maybe_initialize_int_core`: ```rust fn get_x_random_bytes(num_bytes: usize) -> Vec<u8> { let mut bytes = vec![0u8; num_bytes]; thread_rng().fill_bytes(&mut bytes); bytes } ``` Both methods use randomness from the system, which may allow attackers to reduce the search space of potential random seeds and cause a brute-force attack against private keys.

Open the report
LowThe output of `submit_algo_block_to_core()` and `pNetwork - Audit 2 · CertiK · 16 Dec 2022Open

After invoking `submit_algo_block_to_core()` and `submit_int_block_to_core()` to submit and verify Algorand / Ethereum block, it will generate an output, which is a signed message that can be used as proof to retrieve asset from the other chain. Considering the database only maintains a small piece of chain, and the result of the output is not preserved, it could lead to the loss of the output result. Therefore, if the output is mistakenly and improperly handled since there is no copy of the output within the pNetwork core, it could cause the asset to be unretrievable on the other side of the chain.

Open the report

Contracts

No deployed address is recorded for these audits.

The reports name a repository or files. Open a report to see its scope.

pNetwork: questions

Is pNetwork audited?

Trustblock holds 2 public audit reports for pNetwork, dated 16 Dec 2022 to 6 Jan 2023. The latest is by CertiK (“pNetwork”).

Who audited pNetwork?

CertiK wrote the 2 reports Trustblock holds for pNetwork.

Are there open findings in pNetwork’s audits?

15 findings are still open or acknowledged in the firms’ reports: 3 medium, 12 low (14 open, 1 acknowledged). No critical finding is reported. Statuses are the security firms’ own.

Show this on your site

Is this your project? Show this record on your own website. The label states what the record holds, links to this page and updates by itself. It is free and needs no sign-in.

Content

Facts

Automatic: the three strongest facts of this project’s own record (its last audit and two more), highlighted. They update with the record. Picking a fact turns Automatic off.

Fixed as
Language

Style

Layout
Theme
Accent
Corners

Format

Size
Date
Embed as
HTML
<head>
<script src="https://widget.trustblock.run/project-widget.min.js" defer></script>
</head>
<body>
<div
data-tb-project-widget
data-tb-project-slug="pnetwork"
></div>
</body>

Paste the code where the label should appear. It uses no API credit and updates by itself.

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us