issue_index int64 0 18 | location stringlengths 7 206 ⌀ | title stringlengths 9 110 | repository stringclasses 17
values | audited_commit stringclasses 22
values | reported_remediated_commit stringclasses 25
values | reported_impact stringclasses 18
values | reported_likelihood stringclasses 9
values | cwe_classification stringclasses 3
values | vulnerability_class_audit stringlengths 3 63 ⌀ | vulnerability_class_scout stringclasses 8
values | description stringlengths 168 4.25k | description_summary stringlengths 48 194 | reported_status stringlengths 4 352 ⌀ | is_substrate_finding bool 2
classes | audited_project_id int64 1 20 | project_name stringclasses 12
values | auditor stringclasses 11
values | audit_link stringclasses 20
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | null | Vulnerable dependencies in the Substrate parachain | https://github.com/parallel-finance/parallel | 5ca8e13b7b4312855ae2ef1d39f14b38088dfdbd | null | Medium | Difficulty-High | null | Patching | Dependency | 1. Vulnerable dependencies in the Substrate parachain
Severity: Medium
Difficulty: High
Type: Patching
Finding ID: TOB-PLF-1
Target: parallel repository
Description
The Parallel Finance parachain node uses the following dependencies with known vulnerabilities. (All of the dependencies listed are inherited from the Subs... | The Substrate parachain uses dependencies with known vulnerabilities, including chrono, lru, time, and net2, which may lead to potential segfaults or memory issues. | null | true | 1 | Parallel | Trail of Bits | https://github.com/parallel-finance/auditing-report/blob/main/Trail%20of%20Bits_Parallel%20Finance_Final%20Report.pdf |
1 | pallets/loans/src/lib.rs:1057-1087,1106-1121 | Users can avoid accruing interest by repaying a zero amount | https://github.com/parallel-finance/parallel | 5ca8e13b7b4312855ae2ef1d39f14b38088dfdbd | null | Medium | Difficulty-Low | null | Data Validation | Business Logic | 2. Users can avoid accruing interest by repaying a zero amount
Severity: Medium
Difficulty: Low
Type: Data Validation
Finding ID: TOB-PLF-2
Target: pallets/loans/src/lib.rs
Description
To repay borrowed funds, users call the repay_borrow extrinsic. The extrinsic implementation calls the Pallet::repay_borrow_internal me... | Users can avoid paying interest on loans by repaying a zero amount, resetting the borrow index without repaying anything. | null | true | 1 | Parallel | Trail of Bits | https://github.com/parallel-finance/auditing-report/blob/main/Trail%20of%20Bits_Parallel%20Finance_Final%20Report.pdf |
2 | pallets/loans/src/lib.rs:539-556 | Missing validation in Pallet::force_update_market | https://github.com/parallel-finance/parallel | 5ca8e13b7b4312855ae2ef1d39f14b38088dfdbd | null | Informational | Difficulty-High | null | Data Validation | Error Handling and Validation | 3. Missing validation in Pallet::force_update_market
Severity: Informational
Difficulty: High
Type: Data Validation
Finding ID: TOB-PLF-3
Target: pallets/loans/src/lib.rs
Description
The Pallet::force_update_market method can be used to replace the stored market instance for a given asset. Other methods used to update ... | The force_update_market method lacks sufficient validation, potentially allowing unintended changes to immutable market parameters. | null | true | 1 | Parallel | Trail of Bits | https://github.com/parallel-finance/auditing-report/blob/main/Trail%20of%20Bits_Parallel%20Finance_Final%20Report.pdf |
3 | pallets/liquid-staking/src/types.rs:199-219,223-226,230-253 | Missing validation in multiple StakingLedger methods | https://github.com/parallel-finance/parallel | 5ca8e13b7b4312855ae2ef1d39f14b38088dfdbd | null | Undetermined | Difficulty-High | null | Data Validation | Error Handling and Validation | 4. Missing validation in multiple StakingLedger methods
Severity: Undetermined
Difficulty: High
Type: Data Validation
Finding ID: TOB-PLF-4
Target: pallets/liquid-staking/src/types.rs
Description
The staking ledger is used to keep track of the total amount of staked funds in the system. It is updated in response to cro... | StakingLedger methods lack sufficient input validation and unchecked arithmetic, potentially leading to inconsistent states or race conditions. | null | true | 1 | Parallel | Trail of Bits | https://github.com/parallel-finance/auditing-report/blob/main/Trail%20of%20Bits_Parallel%20Finance_Final%20Report.pdf |
4 | pallets/liquid-staking/src/lib.rs:1071-1159 | Failed XCM requests left in storage | https://github.com/parallel-finance/parallel | 5ca8e13b7b4312855ae2ef1d39f14b38088dfdbd | null | Low | Difficulty-High | null | Data Validation | Error Handling and Validation | 5. Failed XCM requests left in storage
Severity: Low
Difficulty: High
Type: Data Validation
Finding ID: TOB-PLF-5
Target: pallets/liquid-staking/src/lib.rs
Description
When the liquid-staking pallet generates an XCM request for the parent chain, the corresponding XCM response triggers a call to Pallet::notification_rec... | Failed XCM requests are left in storage indefinitely if not handled properly by the notification_received method. | null | true | 1 | Parallel | Trail of Bits | https://github.com/parallel-finance/auditing-report/blob/main/Trail%20of%20Bits_Parallel%20Finance_Final%20Report.pdf |
5 | pallets/loans/src/lib.rs:1430-1441 | Risk of using stale oracle prices in loans pallet | https://github.com/parallel-finance/parallel | 5ca8e13b7b4312855ae2ef1d39f14b38088dfdbd | null | Low | Difficulty-High | null | Data Validation | Business Logic | 6. Risk of using stale oracle prices in loans pallet
Severity: Low
Difficulty: High
Type: Data Validation
Finding ID: TOB-PLF-6
Target: pallets/loans/src/lib.rs
Description
The loans pallet uses oracle prices to find a USD value of assets using the get_price function. The get_price function internally uses the T::Price... | The loans pallet may use stale oracle prices, leading to incorrect asset valuations. | null | true | 1 | Parallel | Trail of Bits | https://github.com/parallel-finance/auditing-report/blob/main/Trail%20of%20Bits_Parallel%20Finance_Final%20Report.pdf |
6 | pallets/crowdloans/src/lib.rs:718-765 | Missing calculations in crowdloans extrinsics | https://github.com/parallel-finance/parallel | 5ca8e13b7b4312855ae2ef1d39f14b38088dfdbd | null | Undetermined | Difficulty-High | null | Undefined Behavior | Business Logic | 7. Missing calculations in crowdloans extrinsics
Severity: Undetermined
Difficulty: High
Type: Undefined Behavior
Finding ID: TOB-PLF-7
Target: pallets/crowdloans/src/lib.rs
Description
The claim extrinsic in the crowdloans pallet is missing code to subtract the claimed amount from vault.contributed to update the total... | The claim and refund extrinsics do not update the vault's total contribution, leading to incorrect calculations. | null | true | 1 | Parallel | Trail of Bits | https://github.com/parallel-finance/auditing-report/blob/main/Trail%20of%20Bits_Parallel%20Finance_Final%20Report.pdf |
7 | pallets/crowdloans/src/lib.rs:424-472,599-616 | Event emitted when update_vault and set_vrf calls do not make updates | https://github.com/parallel-finance/parallel | 5ca8e13b7b4312855ae2ef1d39f14b38088dfdbd | null | Informational | Difficulty-High | null | Auditing and Logging | Code Quality | 8. Event emitted when update_vault and set_vrf calls do not make updates
Severity: Informational
Difficulty: High
Type: Auditing and Logging
Finding ID: TOB-PLF-8
Target: pallets/crowdloans/src/lib.rs
Description
The update_vault extrinsic in the crowdloans pallet is responsible for updating the three values shown. It ... | The update_vault and set_vrfs extrinsics emit events even when no actual updates are made. | null | true | 1 | Parallel | Trail of Bits | https://github.com/parallel-finance/auditing-report/blob/main/Trail%20of%20Bits_Parallel%20Finance_Final%20Report.pdf |
8 | pallets/crowdloans/src/lib.rs:502-594 | The referral code is a sequence of arbitrary bytes | https://github.com/parallel-finance/parallel | 5ca8e13b7b4312855ae2ef1d39f14b38088dfdbd | null | Informational | Difficulty-High | null | Data Validation | Error Handling and Validation | 9. The referral code is a sequence of arbitrary bytes
Severity: Informational
Difficulty: High
Type: Data Validation
Finding ID: TOB-PLF-9
Target: pallets/crowdloans/src/lib.rs
Description
The referral code is used in a number of extrinsic calls in the crowdloans pallet. Because the referral code is never validated, it... | The referral code in the crowdloans pallet is arbitrary and unvalidated, potentially allowing log injection attacks. | null | true | 1 | Parallel | Trail of Bits | https://github.com/parallel-finance/auditing-report/blob/main/Trail%20of%20Bits_Parallel%20Finance_Final%20Report.pdf |
9 | pallets/crowdloans/src/lib.rs:1429-1464 | Missing validation of referral code size | https://github.com/parallel-finance/parallel | 5ca8e13b7b4312855ae2ef1d39f14b38088dfdbd | null | Low | Difficulty-Low | null | Data Validation | Error Handling and Validation | 10. Missing validation of referral code size
Severity: Low
Difficulty: Low
Type: Data Validation
Finding ID: TOB-PLF-10
Target: pallets/crowdloans/src/lib.rs
Description
The length of the referral code is not validated by the contribute extrinsic defined by the crowdloans pallet. Since the referral code is stored by th... | The contribute extrinsic lacks validation on the referral code size, potentially leading to memory exhaustion. | null | true | 1 | Parallel | Trail of Bits | https://github.com/parallel-finance/auditing-report/blob/main/Trail%20of%20Bits_Parallel%20Finance_Final%20Report.pdf |
10 | pallets/crowdloans/src/lib.rs | Code duplication in crowdloans pallet | https://github.com/parallel-finance/parallel | 5ca8e13b7b4312855ae2ef1d39f14b38088dfdbd | null | Informational | Difficulty-High | null | Patching | Code Quality | 11. Code duplication in crowdloans pallet
Severity: Informational
Difficulty: High
Type: Patching
Finding ID: TOB-PLF-11
Target: pallets/crowdloans/src/lib.rs
Description
A number of extrinsics in the crowdloans pallet have duplicate code. The close, reopen, and auction_succeeded extrinsics have virtually identical log... | Code duplication in the crowdloans pallet increases the risk of inconsistent patches and complicates maintenance. | null | true | 1 | Parallel | Trail of Bits | https://github.com/parallel-finance/auditing-report/blob/main/Trail%20of%20Bits_Parallel%20Finance_Final%20Report.pdf |
0 | null | Need to upgrade the module | https://github.com/parallel-finance/parallel | a223cd7910af3540048b58f958fea5b784876468 | fc6d8042ba51719e0f1bca40631e4649a6100510 | low-risk | null | null | null | Dependency | 5.1 Need to upgrade the module [low-risk]
ID:RUSTSEC-2021-0067
Crate:cranelift-codegen
Version: 0.71.0
Date:2021-05-21
URL:https://rustsec.org/advisories/RUSTSEC-2021-0067
Title: Memory access due to code generation flaw in Cranelift module
Solution: upgrade to >= 0.73.1 OR >= 0.74
Dependency tree: cranelift-codegen 0.... | Memory access vulnerability in Cranelift module due to code generation flaw, fixed by upgrading to >= 0.73.1 or >= 0.74. | Fixed in: https://github.com/parallel-finance/parallel/pull/210 | true | 2 | Parallel | Slow Mist | https://github.com/parallel-finance/auditing-report/blob/main/Slow%20Mist%20-%20Parallel%20Security%20Audit%20Report.pdf |
1 | parallel/pallets/loans/src/lib.rs | Numeric overflow | https://github.com/parallel-finance/parallel | a223cd7910af3540048b58f958fea5b784876468 | 386b0e7e1eea19c143900d4127daa8c475266dad | enhancement | null | null | null | Arithmetic | 5.2 Numeric overflow[enhancement]
parallel/pallets/loans/src/lib.rs
let total_reserves_new = total_reserves - reduce_amount;
//...snip code...//
let total_reserves_new = total_reserves + add_amount;
It is recommended to use `checked_add/checked_sub` to prevent numerical overflow.
Fixed in: https://github.com/parallel-f... | Numeric overflow vulnerability due to lack of checked_add/checked_sub, fixed by adding these methods. | Fixed in: https://github.com/parallel-finance/parallel/pull/241 | true | 2 | Parallel | Slow Mist | https://github.com/parallel-finance/auditing-report/blob/main/Slow%20Mist%20-%20Parallel%20Security%20Audit%20Report.pdf |
2 | parallel/pallets/loans/src/lib.rs | Lack of bounds checking | https://github.com/parallel-finance/parallel | a223cd7910af3540048b58f958fea5b784876468 | 2bb80a4e75416e27a03ffb9f8d3100aca548d8b2 | weakness | null | null | null | Error Handling and Validation | 5.3 Lack of bounds checking[weakness]
`mint_amount` has no boundary limit, it is recommended to enhance.
Fixed in: https://github.com/parallel-finance/parallel/pull/258 | Lack of bounds checking for mint_amount, recommended to enhance. | Fixed in: https://github.com/parallel-finance/parallel/pull/258 | true | 2 | Parallel | Slow Mist | https://github.com/parallel-finance/auditing-report/blob/main/Slow%20Mist%20-%20Parallel%20Security%20Audit%20Report.pdf |
3 | parallel/pallets/prices/src/lib.rs | Oracle price feed risk | https://github.com/parallel-finance/parallel | a223cd7910af3540048b58f958fea5b784876468 | null | weakness | null | null | null | Business Logic | 5.4 Oracle price feed risk[weakness]
Due to the lack of time parameter, if the price is not feed in time, the price may be inaccurate.
parallel/pallets/prices/src/lib.rs
pub enum Event<T: Config> {
/// Set emergency price. [currency_id, price_detail]
SetPrice(CurrencyId, PriceWithDecimal),
/// Reset emergency price. [c... | Oracle price feed may be inaccurate due to lack of a time parameter. | null | true | 2 | Parallel | Slow Mist | https://github.com/parallel-finance/auditing-report/blob/main/Slow%20Mist%20-%20Parallel%20Security%20Audit%20Report.pdf |
0 | pallets/automation-time/src/lib.rs | Calculate inaccurate risk | https://github.com/OAK-Foundation/OAK-blockchain | 643342e936bbc821d2fb91be69872e4fcecd2273 | cba1acd6961fce877cef95c6b6a198ea8b415a0f | Suggestion | null | null | Integer Overflow | Arithmetic | [N1] [Suggestion] Calculate inaccurate risk
Category: Integer Overflow Audit
Content
pallets/automation-time/src/lib.rs
There are some risks of value overflow.
saturating_mul, saturating_sub, saturating_add and +-*/, +=, -=
saturating at the numeric bounds instead of overflowing, The returned result is inaccurate.
Solu... | Inaccurate calculation risk due to potential integer overflow; replace saturating operations with checked operations. | Fixed | true | 3 | AvaProtocol | Slow Mist | https://avaprotocol.org/docs/papers/SlowMist.Audit.Report.-.Turing.Network.-.June.2022.pdf |
1 | pallets/automation-time/src/lib.rs | User balance is not checked before transfer | https://github.com/OAK-Foundation/OAK-blockchain | 643342e936bbc821d2fb91be69872e4fcecd2273 | null | Suggestion | null | null | Others | Error Handling and Validation | [N2] [Suggestion] User balance is not checked
Category: Others
Content
pallets/automation-time/src/lib.rs
The amount transferred by the user is not compared with the user's balance here, and the user may not have enough NativeToken.
pub fn schedule_native_transfer_task(
origin: OriginFor<T>,
provided_id: Vec<u8>,
execu... | User balance is not checked before transfer, allowing potential insufficient funds. | Ignored; This is expected behaviour. | true | 3 | AvaProtocol | Slow Mist | https://avaprotocol.org/docs/papers/SlowMist.Audit.Report.-.Turing.Network.-.June.2022.pdf |
2 | pallets/parachain-staking/src/lib.rs:962,1004,1390
pallets/parachain-staking/src/types.rs:463
pallets/parachain-staking/src/delegation_requests.rs:279,648-651
pallets/parachain-staking/src/migrations.rs:404 | Return value not checked | https://github.com/OAK-Foundation/OAK-blockchain | 643342e936bbc821d2fb91be69872e4fcecd2273 | null | Low | null | null | Others | Error Handling and Validation | [N3] [Low] Return Value Not Checked
Category: Others
Content
pallets/parachain-staking/src/lib.rs
//#L962
T::Currency::unreserve(&bond.owner, bond.amount);
//#L1004
T::Currency::unreserve(&candidate, state.bond);
//#L1390
T::Currency::unreserve(&delegator, amount);
pallets/parachain-staking/src/types.rs
//#L463
T::Curr... | Return value of unreserve function is not checked, risking unhandled errors. | Ignored; This is unlikely to happen, and no specific handling is required. | true | 3 | AvaProtocol | Slow Mist | https://avaprotocol.org/docs/papers/SlowMist.Audit.Report.-.Turing.Network.-.June.2022.pdf |
3 | pallets/parachain-staking/src/types.rs
pallets/parachain-staking/src/lib.rs
pallets/parachain-staking/src/delegation_requests.rs | Calculate inaccurate risk | https://github.com/OAK-Foundation/OAK-blockchain | 643342e936bbc821d2fb91be69872e4fcecd2273 | null | Suggestion | null | null | Integer Overflow | Arithmetic | [N4] [Suggestion] Calculate inaccurate risk
Category: Integer Overflow Audit
Content
pallets/parachain-staking/src/types.rs
pallets/parachain-staking/src/lib.rs
pallets/parachain-staking/src/delegation_requests.rs
There are some risks of value overflow.
saturating_mul, saturating_sub, saturating_add and +-*/, +=, -=
sa... | Potential inaccurate calculation due to integer overflow; replace saturating operations with checked operations. | Ignored; Overflow is not considered an issue due to the data type used. | true | 3 | AvaProtocol | Slow Mist | https://avaprotocol.org/docs/papers/SlowMist.Audit.Report.-.Turing.Network.-.June.2022.pdf |
4 | pallets/parachain-staking/src/lib.rs | Missing logic | https://github.com/OAK-Foundation/OAK-blockchain | 643342e936bbc821d2fb91be69872e4fcecd2273 | null | Low | null | null | Others | Business Logic | [N5] [Low] Missing logic
Category: Others
Content
pallets/parachain-staking/src/lib.rs
It is necessary to make a judgment in the case of deposit_into_existing failure. If the transfer fails, the entire transaction needs to be rolled back.
fn prepare_staking_payouts(now: RoundIndex) {
// payout is now - delay rounds ago... | Missing rollback logic for failed transfers in staking payouts. | Ignored; Planned for future updates. | true | 3 | AvaProtocol | Slow Mist | https://avaprotocol.org/docs/papers/SlowMist.Audit.Report.-.Turing.Network.-.June.2022.pdf |
5 | pallets/parachain-staking/src/types.rs | Missing error message | https://github.com/OAK-Foundation/OAK-blockchain | 643342e936bbc821d2fb91be69872e4fcecd2273 | null | Low | null | null | Malicious Event Log | Error Handling and Validation | [N6] [Suggestion] Missing error message
Category: Malicious Event Log Audit
Content
pallets/parachain-staking/src/types.rs
let new_bottom_delegation = top_delegations.delegations.pop().expect(""); missing error message.
pub fn add_top_delegation<T: Config>(&mut self, candidate: &T::AccountId, delegation: Bond<T::Accoun... | Missing error message in delegation handling, leaving potential issues unlogged. | Ignored; Planned for future updates. | true | 3 | AvaProtocol | Slow Mist | https://avaprotocol.org/docs/papers/SlowMist.Audit.Report.-.Turing.Network.-.June.2022.pdf |
0 | runtime/foucoco/src/lib.rs | ChainExtension Implementation Lacks Weight Charging | https://github.com/pendulum-chain/pendulum | d01528d17b96bf3de72c36deb3800c2ed0cf2afb | 5b922a210b2a6705d3ea6fefbf67b317698f7b80 | Medium | null | null | Denial-of-Service (DoS) | Weight Management | ChainExtension Implementation Lacks Weight Charging
The current implementation of the ChainExtension trait fails to charge weight when allowing smart contracts to call into the runtime.
IDPDM-006
Scope: Chain Extension
Severity: MEDIUM
Vulnerability Type: Denial-of-Service (DoS)
Status: Fixed (5b922a210b2a6705d3ea6fefb... | The ChainExtension implementation does not charge weight for runtime calls, making the system vulnerable to Denial-of-Service (DoS) attacks. | Fixed (5b922a210b2a6705d3ea6fefbf67b317698f7b80) | true | 4 | Pendulum | Hacken | https://audits.hacken.io/pendulum/l1-pendulum-pendulum-chain-jun2023/ |
1 | pallets/orml-currencies-allowance-extension/src/lib.rs:134 | Vector of unlimited size in the pallet | https://github.com/pendulum-chain/pendulum | d01528d17b96bf3de72c36deb3800c2ed0cf2afb | 05607a1a9cd2ad3cebeff1294b2e4c34fa3e4721 | Low | null | null | Memory exhaustion / DoS | Denial of Service (DoS) and Spamming | Vector of unlimited size in the pallet
The orml-currencies-allowance-extension pallet employs the usage of the Vec data structure without incorporating any size checks.
ID: PDM-007
Scope: orml-currencies-allowance-extension pallet
Severity: LOW
Vulnerability Type: Memory exhaustion / DoS
Status: Fixed (c1a20acd965cc024... | Unrestricted vector size can lead to memory exhaustion and DoS attacks. | Fixed (c1a20acd965cc024ac756effbff8a12522dac87a and 05607a1a9cd2ad3cebeff1294b2e4c34fa3e4721) | true | 4 | Pendulum | Hacken | https://audits.hacken.io/pendulum/l1-pendulum-pendulum-chain-jun2023/ |
2 | runtime/foucoco/src/lib.rs:1509
node/src/chain_spec.rs:229 | Employment of Sudo Pallet | https://github.com/pendulum-chain/pendulum | d01528d17b96bf3de72c36deb3800c2ed0cf2afb | null | null | null | null | Centralization | Business Logic | Employment of Sudo Pallet
The current implementation of the sudo FRAME pallet in the runtime employs it as an alternative to the governance mechanism.
ID: PDM-010
Scope: Decentralization
Status: Acknowledged
Description:
The sudo pallet is integrated into the runtime configuration:
runtime/foucoco/src/lib.rs:1509:
con... | The use of the sudo pallet risks centralization and security vulnerabilities due to potential misuse of root access. | Acknowledged | true | 4 | Pendulum | Hacken | https://audits.hacken.io/pendulum/l1-pendulum-pendulum-chain-jun2023/ |
3 | runtime/foucoco/src/lib.rs:None | Error Handling in Chain Extension | https://github.com/pendulum-chain/pendulum | d01528d17b96bf3de72c36deb3800c2ed0cf2afb | null | null | null | null | Code Quality | Error Handling and Validation | Error Handling in Chain Extension
Implementation of ChainExtension often utilizes DispatchError::Other("Explanatory string") error, which makes error handling difficult.
ID: PDM-009
Scope: Code Quality
Status: Acknowledged
Description:
The current implementation of ChainExtension frequently relies on the generic Dispa... | Use of generic DispatchError::Other hampers error handling and troubleshooting. | Acknowledged | true | 4 | Pendulum | Hacken | https://audits.hacken.io/pendulum/l1-pendulum-pendulum-chain-jun2023/ |
4 | runtime/foucoco/src/lib.rs:964 | Hardcoded Constants in match | https://github.com/pendulum-chain/pendulum | d01528d17b96bf3de72c36deb3800c2ed0cf2afb | null | null | null | null | Code Quality | Code Quality | Hardcoded Constants in match
The presence of hardcoded constants in the match statement within the implementation of ChainExtension hampers code readability.
ID: PDM-008
Scope: Code Quality
Status: Acknowledged
Description:
The following code segment has drawn our attention:
runtime/foucoco/src/lib.rs:964:
match func... | Hardcoded constants in match statements reduce code readability and maintainability. | Acknowledged | true | 4 | Pendulum | Hacken | https://audits.hacken.io/pendulum/l1-pendulum-pendulum-chain-jun2023/ |
5 | pallets/orml-currencies-allowance-extension/src/lib.rs:245,246 | Linter Warnings | https://github.com/pendulum-chain/pendulum | d01528d17b96bf3de72c36deb3800c2ed0cf2afb | null | null | null | null | Linters | Error Handling and Validation | Linter Warnings
The codebase has generated several warnings when analyzed using cargo clippy, indicating areas where improvements can be made to enhance the code quality.
ID: PDM-002
Scope: Linters
Status: Acknowledged
Description:
During the static analysis process using cargo clippy, the following warnings within t... | Codebase has linter warnings that impact maintainability and should be resolved to enhance quality and security. | Acknowledged | true | 4 | Pendulum | Hacken | https://audits.hacken.io/pendulum/l1-pendulum-pendulum-chain-jun2023/ |
6 | runtime/foucoco/src/lib.rs | Logging in Runtime | https://github.com/pendulum-chain/pendulum | d01528d17b96bf3de72c36deb3800c2ed0cf2afb | null | null | null | null | Code Quality | Code Quality | Logging in Runtime
The implementation of ChainExtension contains a lot of unnecessary warn!() macros.
ID: PDM-011
Scope: Logging
Status: Acknowledged
Description:
Upon reviewing the runtime code, it was observed that numerous instances of the warn!() macro are present. While the warn macro can be useful during testing... | Excessive warn!() macros in the implementation of ChainExtension clutter code and reduce maintainability. | Acknowledged | true | 4 | Pendulum | Hacken | https://audits.hacken.io/pendulum/l1-pendulum-pendulum-chain-jun2023/ |
7 | Cargo.toml | Pendulum build | https://github.com/pendulum-chain/pendulum | d01528d17b96bf3de72c36deb3800c2ed0cf2afb | null | null | null | null | Build Process | Code Quality | Pendulum build
The Pendulum chain demonstrates a smooth and error-free build process.
ID: PDM-001
Scope: Build Process
Status: Fixed
Description:
The build process for the Pendulum chain is efficient and error-free. When executing the cargo build --release command, the output confirms a successful build with only one ... | Missing a member in the workspace configuration. | Fixed | true | 4 | Pendulum | Hacken | https://audits.hacken.io/pendulum/l1-pendulum-pendulum-chain-jun2023/ |
8 | pallets/orml-currencies-allowance-extension/src/lib.rs:99 | Superfluous Implementation of Hooks Trait | https://github.com/pendulum-chain/pendulum | d01528d17b96bf3de72c36deb3800c2ed0cf2afb | null | null | null | null | Code Quality | Code Quality | Superfluous Implementation of Hooks Trait
The Hooks trait has been declared in the orml-currencies-allowance-extension pallet, but no custom implementations have been provided.
ID: PDM-005
Scope: Code Quality
Status: Acknowledged
Description:
The following code snippet raises concerns:
pallets/orml-currencies-allowanc... | The Hooks trait has been declared in the orml-currencies-allowance-extension pallet, but no custom implementations have been provided. | Acknowledged | true | 4 | Pendulum | Hacken | https://audits.hacken.io/pendulum/l1-pendulum-pendulum-chain-jun2023/ |
9 | pallets/orml-currencies-allowance-extension/src/lib.rs
runtime/foucoco/src/lib.rs | Test Coverage | https://github.com/pendulum-chain/pendulum | d01528d17b96bf3de72c36deb3800c2ed0cf2afb | null | null | null | null | Code Quality / Testing | Code Quality | Test Coverage
The current test coverage of the orml-currencies-allowance-extension pallet is insufficient, with only 22.22% coverage. Moreover, the implementation of ChainExtension in the runtime lacks any test coverage.
ID: PDM-003
Scope: Code Quality / Testing
Status: Acknowledged
Description:
To evaluate the test ... | Insufficient test coverage in key areas affects security, stability, and maintainability. | Acknowledged | true | 4 | Pendulum | Hacken | https://audits.hacken.io/pendulum/l1-pendulum-pendulum-chain-jun2023/ |
10 | pallets/orml-currencies-allowance-extension/Cargo.toml | Vulnerable and Unmaintained Dependencies | https://github.com/pendulum-chain/pendulum | d01528d17b96bf3de72c36deb3800c2ed0cf2afb | null | null | null | null | Dependency Management | Dependency | Vulnerable and Unmaintained Dependencies
The orml-currencies-allowance-extension pallet has dependencies that include one vulnerable crate plus three unmaintained crates.
ID: PDM-004
Scope: Dependencies
Status: Acknowledged
Description:
The orml-currencies-allowance-extension pallet has several dependencies that raise... | Dependency includes one vulnerable and three unmaintained crates requiring updates or replacements. | Acknowledged | true | 4 | Pendulum | Hacken | https://audits.hacken.io/pendulum/l1-pendulum-pendulum-chain-jun2023/ |
0 | null | TCR voting design should be improved | https://github.com/NodleCode/chain | de356170bfe2eb9f537e3c4861d6752dd099f43e | null | 3 | 3 | null | null | Business Logic | 3.1 (HAL-01) HAL-01 TCR VOTING DESIGN SHOULD BE IMPROVED - MEDIUM
Description:
It was observed that it is possible to:
• Vote with 0 amount
• Challenge yourself
• Counter yourself
• Vote for yourself
By combining these properties, some scenarios might be possible:
• A whale can influence any challenge/counter decisio... | TCR voting design allows self-voting, zero-amount votes, and potential manipulation by large token holders. | NOT APPLICABLE: The issue is marked as not applicable by the Nodle team as the tcr and root of trust pallets will be removed. | true | 5 | Nodle | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Nodle_Nodl_Substrate_Pallet_Security_Audit_Report_Halborn_Final.pdf |
1 | pallets/staking/src/lib.rs | Denomination logic should be improved | https://github.com/NodleCode/chain | de356170bfe2eb9f537e3c4861d6752dd099f43e | 2db8b4707606bf88b8fdefbe616d67a720e434ea | 2 | 4 | null | null | Business Logic | 3.2 (HAL-02) HAL-02 DENOMINATION LOGIC SHOULD BE IMPROVED - MEDIUM
Description:
It was observed that if a nominator has a single validator, it is not possible to remove a validator through nominator_denominate since it has a check for <StakingMinNominatorTotalBond<T>>. In that case, nominator_denominate_all has to be ... | Denomination logic bypasses minimum bond check when only one validator is nominated. | SOLVED | true | 5 | Nodle | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Nodle_Nodl_Substrate_Pallet_Security_Audit_Report_Halborn_Final.pdf |
2 | pallets | Emergency shutdown not used in critical functions | https://github.com/NodleCode/chain | de356170bfe2eb9f537e3c4861d6752dd099f43e | null | 4 | 3 | null | null | Denial of Service (DoS) and Spamming | 3.3 (HAL-03) HAL-03 EMERGENCY SHUTDOWN NOT USED IN MANY CRITICAL FUNCTIONS - MEDIUM
Description:
It was observed that the emergency shutdown pallet is used only in the allocate function in the allocations pallet. However, there are more public functions across different pallets that might be problematic if, at any poi... | Emergency shutdown functionality is missing in multiple critical public functions across different pallets. | PENDING: In a future release, the Nodle team will modify the emergency shutdown pallet to better generalize. | true | 5 | Nodle | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Nodle_Nodl_Substrate_Pallet_Security_Audit_Report_Halborn_Final.pdf |
3 | pallets/staking/src/lib.rs:201-208 | Missing sanity checks | https://github.com/NodleCode/chain | de356170bfe2eb9f537e3c4861d6752dd099f43e | 2db8b4707606bf88b8fdefbe616d67a720e434ea | 2 | 3 | null | null | Error Handling and Validation | 3.4 (HAL-04) HAL-04 MISSING SANITY CHECKS - LOW
Description:
It was observed that the set_staking_limits privileged function is missing sanity checks on provided values. Even though it is a protected function, it is still advised to have some sanity checks to avoid any human error.
Code Location:
Listing 3: pallets/s... | Missing sanity checks in set_staking_limits function may allow invalid parameter values. | SOLVED | true | 5 | Nodle | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Nodle_Nodl_Substrate_Pallet_Security_Audit_Report_Halborn_Final.pdf |
4 | pallets/grants/src/lib.rs:157-168 | Vesting to yourself is allowed | https://github.com/NodleCode/chain | de356170bfe2eb9f537e3c4861d6752dd099f43e | 91cfe0cb3300811bb02a47c4cf70f68c7e48f94d | 2 | 3 | null | null | Business Logic | 3.5 (HAL-05) HAL-05 VESTING TO YOURSELF IS ALLOWED - LOW
Description:
It was observed that you can create a vesting schedule to yourself.
Code Location:
Listing 4: pallets/grants/src/lib.rs
157 pub fn add_vesting_schedule (
origin: OriginFor<T>,
dest: <T::Lookup as StaticLookup>::Source,
schedule: VestingSch... | Vesting schedule allows setting up a vesting to oneself without restrictions. | SOLVED | true | 5 | Nodle | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Nodle_Nodl_Substrate_Pallet_Security_Audit_Report_Halborn_Final.pdf |
5 | pallets/grants/src/lib.rs:88 | Missing zero value check | https://github.com/NodleCode/chain | de356170bfe2eb9f537e3c4861d6752dd099f43e | f31c19a06ab0047f0c533c83ba67654eedfa6147 | 2 | 2 | null | null | Error Handling and Validation | 3.6 (HAL-06) HAL-06 MISSING ZERO VALUE CHECK - LOW
Description:
It was observed that the allocate function should have a zero value check on the amount argument.
Code Location:
Listing 5: pallets/grants/src/lib.rs (Line 88)
85 pub fn allocate (
origin: OriginFor<T>,
to: T::AccountId,
amount: BalanceOf<T>,
... | Allocate function lacks a zero-value check for the amount argument. | SOLVED | true | 5 | Nodle | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Nodle_Nodl_Substrate_Pallet_Security_Audit_Report_Halborn_Final.pdf |
6 | null | Vesting schedules less than a current block can be created | https://github.com/NodleCode/chain | de356170bfe2eb9f537e3c4861d6752dd099f43e | null | 1 | 1 | null | null | Business Logic | 3.7 (HAL-07) HAL-07 VESTING SCHEDULES LESS THAN A CURRENT BLOCK CAN BE CREATED - INFORMATIONAL
Description:
It was observed that the pallet allows the creation of vesting schedules that are less than the current block number. Those vesting schedules are not more than the regular transfers with extra steps. Therefore, ... | Vesting schedules can be created with start blocks earlier than the current block, making them redundant. | NOT APPLICABLE: The issue was marked as not applicable by the Nodle team saying: This can be useful to keep it as it is. In fact, we may have to create retroactive awards that may have been partially vested. | true | 5 | Nodle | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Nodle_Nodl_Substrate_Pallet_Security_Audit_Report_Halborn_Final.pdf |
7 | pallets/grants/src/lib.rs:253 | Redundant check | https://github.com/NodleCode/chain | de356170bfe2eb9f537e3c4861d6752dd099f43e | 91cfe0cb3300811bb02a47c4cf70f68c7e48f94d | 1 | 1 | null | null | Code Quality | 3.8 (HAL-08) HAL-08 REDUNDANT CHECK - INFORMATIONAL
Description:
It was observed that the grants pallet contains a redundant check.
Code Location:
There is no need for a second new_lock.is_zero() since it was already checked prior. Removing of the vestingSchedule can be performed within the first check.
Listing 7: p... | Redundant check of new_lock.is_zero() found in grants pallet. | SOLVED | true | 5 | Nodle | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Nodle_Nodl_Substrate_Pallet_Security_Audit_Report_Halborn_Final.pdf |
8 | pallets/tcr/src/lib.rs:138-152,478 | Redundant variable | https://github.com/NodleCode/chain | de356170bfe2eb9f537e3c4861d6752dd099f43e | 91cfe0cb3300811bb02a47c4cf70f68c7e48f94d | 1 | 1 | null | null | Code Quality | 3.9 (HAL-09) HAL-09 REDUNDANT VARIABLE - INFORMATIONAL
Description:
It was observed that the old1 variable in on_finalize function in tcr pallet is redundant. Tuple returned from commit_applications is Ok(( new_members, Vec::new())). Therefore, old1 is always going to be an empty vector. Hence, extending it with old2 ... | Redundant variable old1 in on_finalize function. | SOLVED | true | 5 | Nodle | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Nodle_Nodl_Substrate_Pallet_Security_Audit_Report_Halborn_Final.pdf |
9 | null | Usage of vulnerable crates | https://github.com/NodleCode/chain | de356170bfe2eb9f537e3c4861d6752dd099f43e | null | 1 | 2 | null | null | Dependency | 3.10 (HAL-10) HAL-10 USAGE OF VULNERABLE CRATES - INFORMATIONAL
Description:
It was observed that the project uses crates with known vulnerabilities.
Code Location:
ID
RUSTSEC-2020-0159
RUSTSEC-2020-0071
RUSTSEC-2021-0130
RUSTSEC-2021-0067
RUSTSEC-2021-009
RUSTSEC-2021-0079
RUSTSEC-2021-0078
RUSTSEC-2021-0076
RUSTSEC... | Usage of crates with known vulnerabilities identified. | ACKNOWLEDGED | true | 5 | Nodle | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Nodle_Nodl_Substrate_Pallet_Security_Audit_Report_Halborn_Final.pdf |
10 | Cargo.toml | Outdated Rust edition | https://github.com/NodleCode/chain | de356170bfe2eb9f537e3c4861d6752dd099f43e | 41ce7de56ff6dd701de1f5d247c91aaff6803954 | 1 | 1 | null | null | Code Quality | 3.11 (HAL-11) HAL-11 OUTDATED RUST EDITION - INFORMATIONAL
Description:
It was observed that the project is using outdated rust edition (2018). Recently, 2021 rust edition came out, which includes a lot of stability improvements and new features that might make the code more readable.
Code Location:
• Cargo.toml
Ris... | Project is using an outdated Rust edition (2018). | SOLVED | true | 5 | Nodle | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Nodle_Nodl_Substrate_Pallet_Security_Audit_Report_Halborn_Final.pdf |
0 | modules/evm-accounts/src/lib.rs:182,313,314
modules/evm-bridge/src/lib.rs:183,186,191 | Integer overflow | https://github.com/reef-defi/reef-chain | 393d0c0821cc25ea5c6912d9cac8f61a9232c9a3 | 6e4153498a28d03b8600739709cb200065c88781 | 3 | 3 | null | null | Arithmetic | 3.1 (HAL-01) INTEGER OVERFLOW - MEDIUM
Description:
An overflow happens when an arithmetic operation reaches the maximum size of a type. For instance, in the ethereum_signable_message() method, an if statement is summing up a few u32 values, which may end up overflowing the integer. In computer programming, an integer ... | Integer overflow vulnerability due to unchecked arithmetic operations in ethereum_signable_message and to_ascii_hex functions. | SOLVED | true | 6 | ReefChain | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Reef_Chain_Substrate_Security_Audit_Report_Halborn_v1_1.pdf |
1 | modules/currencies/src/lib.rs:168 | Total issuance not updated on mint | https://github.com/reef-defi/reef-chain | 393d0c0821cc25ea5c6912d9cac8f61a9232c9a3 | null | 3 | 3 | null | null | Business Logic | 3.2 (HAL-02) TOTAL ISSUANCE NOT UPDATED ON MINT - MEDIUM
Description:
The update_balance dispatchable defined in modules/currencies/src/lib.rs does not update the total issuance of the currency (identified by user-supplied ID) which is minted to the target address. This may lead to discrepancies in token data.
Code Lo... | Total issuance is not updated on mint, causing potential discrepancies in token data. | ACKNOWLEDGED: Reef states that the affected function is sudo only and will be deprecated in a future release. | true | 6 | ReefChain | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Reef_Chain_Substrate_Security_Audit_Report_Halborn_v1_1.pdf |
2 | modules/evm-bridge/src/lib.rs:183,186,191 | Casting overflow | https://github.com/reef-defi/reef-chain | 26ed9e88e773f5d628c01d558945cd38cd5a7d5a | 313439bb7940afa0f0d5060fbcbbe26d5a3e5298 | 3 | 2 | null | null | Arithmetic | 3.3 (HAL-03) CASTING OVERFLOW - LOW
Description:
When converting or casting between types, an “overflow”/wrapping may occur and result in logic bugs leading to thread panic. The decode_string utility method defined in modules/evm-bridge/src/lib.rs does not validate if the values of the offset and length variables can b... | Casting overflow vulnerability due to unchecked type conversion in decode_string method. | SOLVED | true | 6 | ReefChain | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Reef_Chain_Substrate_Security_Audit_Report_Halborn_v1_1.pdf |
3 | modules/currencies/src/lib.rs:396 | Slash amount validation missing | https://github.com/reef-defi/reef-chain | 393d0c0821cc25ea5c6912d9cac8f61a9232c9a3 | bd43bec58890be763b32bfdfd18ba85a8c0ef9e5 | 2 | 2 | null | null | Error Handling and Validation | 3.4 (HAL-04) SLASH AMOUNT VALIDATION MISSING - LOW
Description:
The slash_reserved method defined in modules/currencies/src/lib.rs does not validate if the value of the user-supplied value parameter exceeds the actual balance of the account owned by the address that is to have its ERC20 tokens slashed.
Code Location:
... | Missing validation in slash_reserved method allows slashing beyond account balance. | SOLVED | true | 6 | ReefChain | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Reef_Chain_Substrate_Security_Audit_Report_Halborn_v1_1.pdf |
4 | modules/currencies/src/lib.rs:125,178,186,199,217,235,290,303,316,324,336,376,386,394,402,423,445 | Currency ID validation missing | https://github.com/reef-defi/reef-chain | 393d0c0821cc25ea5c6912d9cac8f61a9232c9a3 | null | 2 | 2 | null | null | Error Handling and Validation | 3.5 (HAL-05) CURRENCY ID VALIDATION MISSING - LOW
Description:
Many dispatchables and helper methods defined in modules/currencies/src/lib.rs do not check if the user-supplied currency ID matches any of the existing ones before calling the possibly resource-intensive underlying utility functions.
Code Location:
Listin... | Missing validation for currency ID in multiple methods could lead to resource exhaustion. | ACKNOWLEDGED: Reef states that there is only 1 currency id in use, and there likely won’t be more going forward. | true | 6 | ReefChain | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Reef_Chain_Substrate_Security_Audit_Report_Halborn_v1_1.pdf |
5 | modules/evm-accounts/src/lib.rs:313 | Vector capacity validation missing | https://github.com/reef-defi/reef-chain | 393d0c0821cc25ea5c6912d9cac8f61a9232c9a3 | 6b826f7ca16d1a30f3fa55f0606d0b94b69b2b3a | 2 | 1 | null | null | Error Handling and Validation | 3.6 (HAL-06) VECTOR CAPACITY VALIDATION MISSING - INFORMATIONAL
Description:
The to_ascii_hex utility function defined in modules/evm-accounts/src/lib.rs when creating a new Vec<u8> from the user-supplied data slice with a Vec::with_capacity method does not validate if the capacity of the new vector exceeds the maximum... | Missing validation in to_ascii_hex function allows vector capacity to exceed maximum limit. | SOLVED | true | 6 | ReefChain | Halborn | https://github.com/HalbornSecurity/PublicReports/blob/master/Substrate%20Audits/Reef_Chain_Substrate_Security_Audit_Report_Halborn_v1_1.pdf |
0 | parachain-staking/lib.rs | Static fee charged despite dynamic storage accesses | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Medium | null | null | Bad Extrinsic Weight | Weight Management | 4.1.1 V-MANC-VUL-001: Static fee charged despite dynamic storage accesses
Severity: Medium
Type: Bad Extrinsic Weight
Commit: 45ba60e1d
Status: Acknowledged
File(s): parachain-staking/lib.rs
Location(s): go_online, go_offline, candidate_bond_more
Blockchain computations must have appropriate fees to prevent network ... | Fixed fees are charged for dynamic storage operations, potentially leading to DoS as CandidatePool size grows. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
1 | pallets/manta-pay/src/lib.rs | Users can use any previously seen Merkle root | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Medium | null | null | Hash Collision | Dependency | 4.1.2 V-MANC-VUL-002: Users can use any previously seen Merkle root
Severity: Medium
Type: Hash Collision
Commit: 45ba60e1d
Status: Acknowledged
File(s): pallets/manta-pay/src/lib.rs
Location(s): has_matching_utxo_accumulator_output
The MantaPay protocol maintains a Merkle tree on the ledger where the leaves of the ... | Allowing any previously seen Merkle root increases the risk of hash collisions, potentially allowing asset theft. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
2 | pallets/manta-pay/src/lib.rs | MantaPay weights calculated with a small database | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Medium | null | null | Bad Extrinsic Weight | Weight Management | 4.1.3 V-MANC-VUL-003: MantaPay weights calculated with a small database
Severity: Medium
Type: Bad Extrinsic Weight
Commit: 45ba60e1d
Status: Acknowledged
File(s): pallets/manta-pay/src/lib.rs
Location(s): to_private, to_public, private_transfer
Transactions to_public, to_private, and private_transfer take as input ... | Inadequate benchmarking of weights for MantaPay's Merkle tree could lead to DoS attacks as the tree grows. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
3 | pallets/asset-manager/src/lib.rs | Total supply of native assets can exceed the set limit | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Medium | null | null | Logic Error | Business Logic | 4.1.4 V-MANC-VUL-004: Total supply of native assets can exceed the set limit
Severity: Medium
Type: Logic Error
Commit: 45ba60e1d
Status: Acknowledged
File(s): pallets/asset-manager/src/lib.rs
Location(s): mint_asset
One invariant underlying the correctness of MantaPay is that the total supply of an asset cannot exc... | Native asset supply can exceed the maximum limit for an account, causing to_private transactions to fail. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
4 | pallets/asset-manager/src/lib.rs | Missing updates in update_asset_metadata | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Medium | null | null | Logic Error | Business Logic | 4.1.5 V-MANC-VUL-005: Missing updates in update_asset_metadata
Severity: Medium
Type: Logic Error
Commit: 45ba60e1d
Status: Acknowledged
File(s): pallets/asset-manager/src/lib.rs
Location(s): update_asset_metadata
Manta Chain has an asset-manager pallet responsible for registering and minting assets. Each asset has ... | update_asset_metadata does not apply updates to min_balance and is_sufficient metadata as expected. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
5 | parachain-staking | No slashing mechanism for collators | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Medium | null | null | Consensus | Business Logic | 4.1.6 V-MANC-VUL-006: No slashing mechanism for collators
Severity: Medium
Type: Consensus
Commit: 45ba60e1d
Status: Acknowledged
File(s): parachain-staking
Location(s): N/A
Proof of Stake blockchains often have a slashing mechanism to detect poorly performing stakers and punish them. Typically, a significant portio... | No automated slashing mechanism exists to penalize poorly performing collators, relying on social pressure and manual intervention. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
6 | pallets/parachain-staking/src/lib.rs | Collators given full rewards regardless of quality | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Medium | null | null | Consensus | Business Logic | 4.1.7 V-MANC-VUL-007: Collators given full rewards regardless of quality
Severity: Medium
Type: Consensus
Commit: 45ba60e1d
Status: Open
File(s): pallets/parachain-staking/src/lib.rs
Location(s): pay_one_collator_reward
Manta Chain rewards collators by first allocating a fixed number of points (20) for every block t... | Collators receive full rewards regardless of block quality, allowing low-quality blocks to earn the same as high-quality ones. | Open | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
7 | pallets/manta-pay/src/lib.rs:593 | Missing validation in pull_ledger_diff | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Low | null | null | Data Validation | Error Handling and Validation | 4.1.8 V-MANC-VUL-008: Missing validation in pull_ledger_diff
Severity: Low
Type: Data Validation
Commit: 45ba60e1d
Status: Acknowledged
File(s): pallets/manta-pay/src/lib.rs
Location(s): Line 593
pull_ledger_diff takes as input a Checkpoint, which is a struct with two fields: receiver_index and sender_index. It pull... | Missing bounds checks in pull_ledger_diff could lead to overflow, potentially crashing the node. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
8 | pallets/asset-manager/src/lib.rs:590 | increase_count_of_associated_assets can overflow | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Low | null | null | Logic Error | Arithmetic | 4.1.9 V-MANC-VUL-009: increase_count_of_associated_assets can overflow
Severity: Low
Type: Logic Error
Commit: 45ba60e1d
Status: Acknowledged
File(s): pallets/asset-manager/src/lib.rs
Location(s): Line 590
The asset_manager pallet maintains a mapping of paraids to a count of assets associated with that paraid. Each ... | increase_count_of_associated_assets lacks overflow check, risking node crash or reset to zero in certain cases. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
9 | pallets/manta-pay/src/lib.rs | Account checks are incorrect | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Low | null | null | Logic Error | Business Logic | 4.1.10 V-MANC-VUL-010: Account checks are incorrect.
Severity: Low
Type: Logic Error
Commit: 45ba60e1d
Status: Acknowledged
File(s): pallets/manta-pay/src/lib.rs
Location(s): check_sink_accounts, check_source_accounts
When validating a transaction, the source and sink accounts are checked by check_sink_accounts and ... | Account checks in transaction validation assume unique accounts, which may lead to issues if APIs change to allow multiple accounts. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
10 | parachain-staking/lib.rs | Unstaked user may be selected as collator | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Low | null | null | Logic Error | Business Logic | 4.1.11 V-MANC-VUL-011: Unstaked user may be selected as collator
Severity: Low
Type: Logic Error
Commit: 45ba60e1d
Status: Acknowledged
File(s): parachain-staking/lib.rs
Location(s): select_top_candidates
Parachains use collators to combine transactions into blocks that are then checked by Validators on the relay ch... | Unstaked users may be selected as collators if no sufficiently staked collators are available, reducing network stability. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
11 | runtime/calamari/src/weights/xcm/mod.rs
runtime/dolphin/src/weights/xcm/mod.rs | XCM instructions can charge 0 weight | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Low | null | null | Bad Extrinsic Weight | Weight Management | 4.1.12 V-MANC-VUL-012: XCM instructions can charge 0 weight
Severity: Low
Type: Bad Extrinsic Weight
Commit: 45ba60e1d
Status: Acknowledged
File(s): runtime/(calamari, dolphin)/src/weights/xcm/mod.rs
Location(s): Every use of weigh_multi_assets
The Polkadot ecosystem uses the XCM messaging standard to enable paracha... | XCM instructions can be executed with zero weight, allowing potential spam through 0-cost messages. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
12 | pallets/asset-manager/src/lib.rs | Missing validation in set_units_per_second | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Low | null | null | Data Validation | Error Handling and Validation | 4.1.13 V-MANC-VUL-013: Missing validation in set_units_per_second
Severity: Low
Type: Data Validation
Commit: 45ba60e1d
Status: Acknowledged
File(s): pallets/asset-manager/src/lib.rs
Location(s): set_units_per_second
The asset-manager pallet manages a hashmap called UnitsPerSecond which maps assetIds to a u128 value... | Missing validation in set_units_per_second allows potential overflow, enabling weight to be purchased at low cost, risking DoS. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
13 | null | Collator is a single point of failure for a round | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Low | null | null | Consensus | Code Quality | 4.1.14 V-MANC-VUL-014: Collator is a single point of failure for a round
Severity: Low
Type: Consensus
Commit: 45ba60e1d
Status: Acknowledged
The Manta parachain uses the Aura consensus mechanism to select collators to author blocks. Aura selects a primary collator for a round, and only that collator is allowed to pr... | Single collator selection creates a point of failure, risking block production halt if the collator goes down. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
14 | pallets/manta-pay/src/lib.rs | Unchecked index calculation in spend_all | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Warning | null | null | Logic Error | Arithmetic | 4.1.15 V-MANC-VUL-015: Unchecked index calculation in spend_all
Severity: Warning
Type: Logic Error
Commit: 45ba60e1d
Status: Acknowledged
File(s): pallets/manta-pay/src/lib.rs
Location(s): spend_all
The spend_all function in the Manta-Pay pallet does the following:
1. Adds the nullifier commitments in the Transacti... | Unchecked index calculation in spend_all may cause overflow, leading to incorrect data insertion. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
15 | parachain-staking/lib.rs | Excess fees not refunded | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Warning | null | null | Bad Extrinsic Weight | Weight Management | 4.1.16 V-MANC-VUL-016: Excess fees not refunded
Severity: Warning
Type: Bad Extrinsic Weight
File(s): parachain-staking/lib.rs
Location(s): (cancel_leave, execute_leave, schedule_leave, join)_candidates
Commit: 45ba60e1d
Status: Intended Behavior
When a substrate extrinsic is created, its weight must be carefully con... | Extrinsics may charge unnecessary fees without refunding excess. | Intended Behavior | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
16 | pallets/asset-manager/src/lib.rs | Assets can be registered at unsupported locations | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Warning | null | null | Data Validation | Error Handling and Validation | 4.1.17 V-MANC-VUL-017: Assets can be registered at unsupported locations
Severity: Warning
Type: Data Validation
File(s): pallets/asset-manager/src/lib.rs
Location(s): register_asset
Commit: 45ba60e1d
Status: Acknowledged
The asset-manager pallet allows assets to be registered, managed, and minted. In particular, reg... | Assets can be registered without validating their location. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
17 | parachain-staking/lib.rs | Minimum delegator funds is not MinDelegatorStk | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Warning | null | null | Logic Error | Business Logic | 4.1.18 V-MANC-VUL-018: Minimum delegator funds is not MinDelegatorStk
Severity: Warning
Type: Logic Error
File(s): parachain-staking/lib.rs
Location(s): N/A
Commit: 45ba60e1d
Status: Acknowledged
In the case where MinDelegation < MinDelegatorStk, it is possible for the delegator’s staked funds to be less than MinDele... | Delegators can have staked funds below the required MinDelegatorStk. | Acknowledged | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
18 | pallets/manta-pay/src/lib.rs | Unintended test crashes | https://github.com/Manta-Network/Manta | 45ba60e1d940dbf3491ce0f1223e44c84d5b7218 | null | Info | null | null | Maintainability | Code Quality | 4.1.19 V-MANC-VUL-019: Unintended test crashes
Severity: Info
Type: Maintainability
File(s): pallets/manta-pay/src/lib.rs
Location(s): to_private_should_work
Commit: 45ba60e1d
Status: Open
Many of the manta-pay tests randomly generate an asset id, total supply, and an amount to make private. To ensure the total suppl... | Randomized test may fail due to unintended overflow in total supply generation. | Open | true | 7 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-Chain.pdf |
0 | pallets/manta-sbt/src/lib.rs:376 | Loss of Reserved SBT IDs | https://github.com/Manta-Network/Manta | ceb9e46cd53b77eb914ba6c17452fc238bc3a28f | null | Low | null | null | null | Business Logic | 4.1 (HAL-01) LOSS OF RESERVED SBT IDS - LOW (2.5)\nDescription:\nCode Location:\nThe reserve_sbt function calculates a range of IDs and stores this range in the ReservedIds storage map, using the caller’s address as the key. It was identified that users lose their reserved SBT IDs when they call the reserve_sbt functio... | Users lose previously reserved SBT IDs if they reserve new ones without minting the old. | null | true | 8 | MantaNetwork | Halborn | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Halborn-zkSBT.pdf |
1 | pallets/manta-sbt/src/lib.rs:369,883 | Last SBT IDs Cannot Be Reserved | https://github.com/Manta-Network/Manta | ceb9e46cd53b77eb914ba6c17452fc238bc3a28f | null | Low | null | null | null | Error Handling and Validation | 4.2 (HAL-02) LAST SBT IDS CANNOT BE RESERVED - LOW (2.5)\nDescription:\nWhen users invoke the reserve_sbt function, it reserves a specific number of IDs - quantified by MintPerReserve. The reserve_sbt function achieves this by repeatedly calling the next_sbt_id_and_increment function - as many times as the MintPerReser... | Overflow in next_sbt_id_and_increment causes unreserved IDs and transaction failure. | null | true | 8 | MantaNetwork | Halborn | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Halborn-zkSBT.pdf |
2 | pallets/manta-sbt/src/lib.rs:783
pallets/manta-support/src/manta_pay.rs:874,1095,1096
runtime/calamari/src/migrations/staking.rs:70 | Downcasting of 64-Bit Integer | https://github.com/Manta-Network/Manta | ceb9e46cd53b77eb914ba6c17452fc238bc3a28f | null | Low | null | null | null | Arithmetic | 4.3 (HAL-03) DOWNCASTING OF 64-BIT INTEGER - LOW (2.5)\nDescription:\nIt was observed that in certain circumstances, usize values are cast to types such as u8 and u32. The usize data type in the Rust programming language represents a pointer-sized unsigned integer. The actual size of usize is dependent on the platform:... | Casting usize to smaller types may cause data loss and unexpected behavior. | null | true | 8 | MantaNetwork | Halborn | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Halborn-zkSBT.pdf |
3 | runtime/calamari/src/fee.rs:76
primitives/manta/src/xcm.rs:183,251,252
runtime/manta/src/fee.rs:47,52
runtime/common/src/lib.rs:115
primitives/manta/src/constants.rs:110 | Unchecked Math Could Impact Weight Calculation | https://github.com/Manta-Network/Manta | ceb9e46cd53b77eb914ba6c17452fc238bc3a28f | null | Low | null | null | null | Weight Management | 4.4 (HAL-04) UNCHECKED MATH COULD IMPACT WEIGHT CALCULATION - LOW (2.5)\nDescription:\nIt was identified that several areas in the buy_weight and the refund_weight functions that could potentially benefit from enhanced computational checks. Currently, despite numerous instances of proven arithmetic calculations, the fu... | Unchecked math in weight calculations may lead to overflow, underflow, or division by zero errors. | null | true | 8 | MantaNetwork | Halborn | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Halborn-zkSBT.pdf |
0 | pallets/manta-sbt/src/lib.rs | SBT reservations can be overwritten | https://github.com/Manta-Network/Manta | ceb9e46cd53b77eb914ba6c17452fc238bc3a28f | be7f1c7a8b7d35a84f657854032b2bf3b7e01ab8 | Medium | null | null | Logic Error | Business Logic | 4.1 Detailed Description of Issues
V-MSBT-VUL-001: SBT reservations can be overwritten
Severity: Medium
Type: Logic Error
Commit: ceb9e46
Status: Fixed
File(s): pallets/manta-sbt/src/lib.rs
Location(s): reserve_sbt
The manta-sbt pallet exposes a method reserve_sbt whereby callers pay MANTA tokens to reserve the righ... | SBT reservations can be overwritten, causing users to lose reserved tokens. | Fixed | true | 9 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-zkSBT.pdf |
1 | pallets/manta-sbt/src/lib.rs | Extrinsics charge static fees that do not account for Merkle tree updates | https://github.com/Manta-Network/Manta | ceb9e46cd53b77eb914ba6c17452fc238bc3a28f | f0ed5957c3bc87b4a4a2631f26aceefb9607f069 | Low | null | null | Bad Extrinsic Weight | Weight Management | 4.1.2 V-MSBT-VUL-002: Extrinsics charge static fees that do not account for Merkle tree updates
Severity: Low
Type: Bad Extrinsic Weight
Commit: ceb9e46
Status: Fixed
File(s): pallets/manta-sbt/src/lib.rs
Location(s): to_private, mint_sbt_eth
Transactions to_private and mint_sbt_eth take membership proofs and store U... | Static fees for extrinsics do not account for Merkle tree updates, risking underpriced transactions. | Fixed | true | 9 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-zkSBT.pdf |
2 | pallets/manta-sbt/src/lib.rs | Missing validation in pull_ledger_diff | https://github.com/Manta-Network/Manta | ceb9e46cd53b77eb914ba6c17452fc238bc3a28f | null | Warning | null | null | Data Validation | Error Handling and Validation | 4.1.3 V-MSBT-VUL-003: Missing validation in pull_ledger_diff
Severity: Warning
Type: Data Validation
Commit: ceb9e46
Status: Acknowledged
File(s): pallets/manta-sbt/src/lib.rs
Location(s): pull_ledger_diff
pull_ledger_diff takes as input a Checkpoint which is a struct of two fields receiver_index and sender_index and... | Missing bounds check in pull_ledger_diff could allow overflow and node crash. | Acknowledged | true | 9 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-zkSBT.pdf |
3 | pallets/manta-sbt/src/lib.rs | Off-by-one error in to_private | https://github.com/Manta-Network/Manta | ceb9e46cd53b77eb914ba6c17452fc238bc3a28f | null | Warning | null | null | Logic Error | Arithmetic | 4.1.4 V-MSBT-VUL-004: Off-by-one error in to_private
Severity: Warning
Type: Logic Error
Commit: ceb9e46
Status: Acknowledged
File(s): pallets/manta-sbt/src/lib.rs
Location(s): to_private
The manta-sbt pallet has a user-callable extrinsic, to_private, which allows users to mint reserved SBT tokens. To facilitate mint... | Off-by-one error in to_private may prevent users from minting reserved tokens. | Acknowledged | true | 9 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-zkSBT.pdf |
4 | pallets/manta-sbt/src/lib.rs:382 | Unnecessary Storage Variable | https://github.com/Manta-Network/Manta | ceb9e46cd53b77eb914ba6c17452fc238bc3a28f | fa10f39afcd8882d14252f55ce08ffcab6321911 | Warning | null | null | Gas Optimization | Code Quality | 4.1.5 V-MSBT-VUL-005: Unnecessary Storage Variable
Severity: Warning
Type: Gas Optimization
Commit: ceb9e46
Status: Fixed
File(s): pallets/manta-sbt/src/lib.rs
Location(s): 382
The storage variable UtxoAccumulatorOutputs keeps track of all Merkle roots generated by manta-sbt; however, this variable is unnecessary. It... | Unnecessary storage variable increases transaction fees and storage usage. | Fixed | true | 9 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-zkSBT.pdf |
5 | pallets/manta-sbt/src/lib.rs | Missing validation when setting mint info | https://github.com/Manta-Network/Manta | ceb9e46cd53b77eb914ba6c17452fc238bc3a28f | null | Info | null | null | Data Validation | Error Handling and Validation | 4.1.6 V-MSBT-VUL-006: Missing validation when setting mint info
Severity: Info
Type: Data Validation
Commit: ceb9e46
Status: Acknowledged
File(s): pallets/manta-sbt/src/lib.rs
Location(s): new_mint_info, update_mint_info
When setting metadata for a mint type, the functions new_mint_info and update_mint_info set the s... | Missing validation allows minting periods to be set in the past, blocking minting. | Acknowledged | true | 9 | MantaNetwork | Veridise | https://github.com/Manta-Network/Atlantic-Audits/blob/main/Atlantic-Veridise-zkSBT.pdf |
0 | precompiles/dispatch-lockdrop/src/lib.rs:88-90 | Missing benchmarking for the lockdrop precompile dispatch | https://github.com/AstarNetwork/Astar | 282485aa2d50f12f42463bba1d393fce4c57c2a3 | null | Info | null | null | null | Weight Management | 3.2.1 Missing benchmarking for the lockdrop precompile dispatch
Attack scenario
Location
Tracking
Attack impact
Severity
Status
Static ref_time used for weight calculation leading to underestimation
of the weights can enable an attacker to perform denial of service
precompiles/dispatch-lockdrop
[2]
An attacker may spam... | Underestimated weight_to_gas estimation due to missing benchmarking allows attackers to perform denial of service attacks. | Closed [4] [Online].Available: https://github.com/AstarNetwork/dappstaking-v3-audit/issues/7#issuecomment-2034174383. | true | 10 | Astar | Security Research Labs | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/astar-srl-2403.pdf |
1 | precompiles/dispatch-lockdrop/src/lib.rs:74,104 | Unbounded call length limit in lockdrop dispatch call | https://github.com/AstarNetwork/Astar | 282485aa2d50f12f42463bba1d393fce4c57c2a3 | null | Low | null | null | null | Denial of Service (DoS) and Spamming | 3.2.2 Unbounded call length limit in lockdrop dispatch call
Attack scenario
Location
Tracking
Attack impact
Severity
Status
An attacker may create multiple nested calls bloating the call_length
before call decoding
precompiles/dispatch-lockdrop
[3]
Unbounded call length can aid an attacker to cause heap overflow when
c... | Unbounded call length in dispatch call allows attackers to cause heap overflow and perform denial of service attacks. | Closed [7] [Online].Available: https://github.com/AstarNetwork/Astar/pull/1208. | true | 10 | Astar | Security Research Labs | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/astar-srl-2403.pdf |
0 | null | Weight calculation | https://github.com/AstarNetwork/Astar | fc14b13401e1fb5e7391715fc76a308204173802 | null | Low | Low | null | Coding Mistakes | Weight Management | All the assets pallet functions exposed by the chain extension are weighted with a constant amount. The weight of some operations is charged using the same quantity that the assets pallet benchmarks have computed. However, other operations only charge the weight of one runtime database read operation — T::DbWeight::get... | Constant weight for functions, ignores variable data in MetadataSymbol & MetadataName. | The Astar team acknowledged this issue and stated that the gas weight currently being charged for one read is equivalent to a read of length 80 bytes. They also pointed out that the MetadataName and MetadataSymbol are bounded by the AssetsStringLimit config variable, which is set to 50 bytes. Therefore, charging for on... | true | 11 | Astar | Zellic | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/astar-zellic-2401.pdf |
0 | pallets/lend-market/src/lib.rs:782-800 | Static calculation of weights for the claim_reward extrinsic enables DoS attack vector | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Major | null | null | null | Weight Management | 1. Static calculation of weights for the claim_reward extrinsic enables DoS attack vector
Severity: Major
The claim_reward function, defined in pallets/lend-market/src/lib.rs:782-800, iterates over all the existing markets to collect rewards from each of them. However, since the number of registered markets is not boun... | Static weight calculation in claim_reward allows potential DoS due to unbounded market iterations. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
1 | pallets/prices/src/lib.rs:120-143 | Price feeder centralization risks | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | null | Minor | null | null | null | Error Handling and Validation | 2. Price feeder centralization risks
Severity: Minor
In the prices pallet, the FeederOrigin can set arbitrary emergency prices by executing the set_price and reset_price extrinsics defined in pallets/prices/src/lib.rs:120-143. However, prices are not validated before being stored and every value is accepted.
As a conse... | Price feeder allows unvalidated emergency prices, risking privilege abuse and input errors. | Acknowledged | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
2 | pallets/prices/src/lib.rs:149-157 | Multiple foreign_asset_id can be mapped to the same asset_id | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Minor | null | null | null | Error Handling and Validation | 3. Multiple foreign_asset_id can be mapped to the same asset_id
Severity: Minor
In pallets/prices/src/lib.rs:149-157, the set_foreign_asset extrinsic permits the UpdateOrigin origin to establish a mapping within the pallet, associating a foreign_asset_id with an asset_id. However, it lacks a verification mechanism to e... | Lack of verification allows multiple foreign_asset_id to map to the same asset_id, risking market misconfigurations. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
3 | pallets/prices/src/lib.rs:149-157 | Missing check that foreign_asset_id is specifically of the ForeignAsset type | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Minor | null | null | null | Error Handling and Validation | 4. Missing check that foreign_asset_id is specifically of the ForeignAsset type
Severity: Minor
In pallets/prices/src/lib.rs:149-157, the set_foreign_asset extrinsic enables the UpdateOrigin origin to establish a mapping within the pallet that associates a foreign_asset_id with an asset_id. However, it does not verify ... | Missing validation allows mapping of non-ForeignAsset types, risking misconfigurations. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
4 | pallets/prices/src/lib.rs:179-186 | Default mantissa precision can lead to an incorrect price | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | null | Minor | null | null | null | Error Handling and Validation | 5. Default mantissa precision can lead to an incorrect price
Severity: Minor
In pallets/prices/src/lib.rs:179-186, the get_asset_mantissa function is designed to calculate the mantissa for a given asset by attempting to retrieve the asset's decimal precision from multiple sources. However, if it fails to find any decim... | Default mantissa precision assumption can lead to incorrect asset price calculation. | Acknowledged | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
5 | pallets/lend-market/src/lib.rs:656-680 | Missing validation for the lend_token_id | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Minor | null | null | null | Error Handling and Validation | 6. Missing validation for the lend_token_id
Severity: Minor
In pallets/lend-market/src/lib.rs:656-680, the force_update_market function enables the UpdateOrigin to assign a new lend_token_id to a specified market. However, it fails to verify whether the lend_token_id is not already a market, a validation that is perfor... | Missing validation for lend_token_id may lead to market configuration inconsistencies. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
6 | pallets/lend-market/src/lib.rs:659 | The force_update_market extrinsic could break existing markets | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Minor | null | null | null | Business Logic | 7. The force_update_market extrinsic could break existing markets
Severity: Minor
In pallets/lend-market/src/lib.rs:659, the force_update_market function permits the UpdateOrigin to forcibly replace an existing market with another, without ensuring the coherence of the provided data. This poses a risk since UpdateOrigi... | force_update_market extrinsic allows data inconsistencies that could break market operations. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
7 | pallets/lend-market/src/interest.rs:1123-1130 | Static calculation of weights for the update_liquidation_fee_collateral extrinsic | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Minor | null | null | null | Weight Management | 8. Static calculation of weights for the update_liquidation_fee_collateral extrinsic
Severity: Minor
In pallets/lend-market/src/interest.rs:1123-1130, the update_liquidation_fee_collateral extrinsic takes a collaterals vector as a parameter. However, the calculation of the extrinsic weights does not take into account t... | Static weight calculation for update_liquidation_fee_collateral ignores vector length, causing uncorrelated fee charges. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
8 | pallets/lend-market/src/lib.rs:381,610,1757 | Missing validation of liquidate_incentive_reserved_factor during market update | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Minor | null | null | null | Error Handling and Validation | 9. Missing validation of liquidate_incentive_reserved_factor during market update
Severity: Minor
In pallets/lend-market/src/lib.rs:381 the add_market function checks the correct allowed ranges for the provided market parameters, including liquidate_incentive_reserved_factor. This value is forced to be in the (0,1) ran... | Missing validation in update_market allows liquidate_incentive_reserved_factor outside valid range. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
9 | pallets/lend-market/src/interest.rs:58,75 | Incorrect interest is calculated if requested before market initialization | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Minor | null | null | null | Business Logic | 10. Incorrect interest is calculated if requested before market initialization
Severity: Minor
In pallets/lend-market/src/interest.rs:58, the get_market_status function calculates and returns information about the queried market. However, in case the market has not been used yet, the last_accrued_interest_time variable... | Incorrect interest calculation occurs if requested before market initialization. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
10 | pallets/lend-market/src/lib.rs:1801-1806 | Inefficient active markets search | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Informational | null | null | null | Code Quality | 11. Inefficient active markets search
Severity: Informational
The ensure_active_market function, defined in pallets/lend-market/src/lib.rs:1801-1806, searches for a market by comparing identifiers one by one in a loop through all markets with an asymptotic complexity of O(n). However, the same operation could be perfor... | Active market search is inefficient due to O(n) iteration; can be optimized with constant time method. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
11 | pallets/lend-market/src/lib.rs:1145-1151,1407 | Inefficient market data aggregation | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | null | Informational | null | null | null | Code Quality | 12. Inefficient market data aggregation
Severity: Informational
The get_lf_base_position function, defined in pallets/lend-market/src/lib.rs:1145-1151 iterates through all active markets, aggregating collateral for underlying assets. However, the markets queried are not retained, despite being re-queried later by the c... | Inefficient market data aggregation leads to unnecessary re-queries and higher execution costs. | Acknowledged | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
12 | pallets/lend-market/src/lib.rs:315,945-946,1280-1283,1312-1315,2105-2106,1146 | Redundant storage queries | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | null | Informational | null | null | null | Code Quality | 13. Redundant storage queries
Severity: Informational
The pallets/lend-market/src/lib.rs file exhibits redundant uses of on-chain storage. For instance, the AccountDeposits storage, introduced at line 315, undergoes redundant queries in lines 945-946, 1280-1283, 1312-1315, and 2105-2106. In each case, the storage is fi... | Redundant storage queries impact performance and code clarity. | Acknowledged | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
13 | pallets/lend-market/src/lib.rs:1144-1152,1158-1166,1280-1293,1312-1325 | Code duplication | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | null | Informational | null | null | null | Code Quality | 14. Code duplication
Severity: Informational
The pallets/lend-market/src/lib.rs file contains multiple code duplicates:
1. The code fragments in lines 1144-1152 and 1158-1166 are nearly identical, with the only distinction being the function called on the iterated values: collateral_asset_value (line 1149) in one insta... | Code duplication impacts maintainability and increases potential for security issues. | Acknowledged | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
14 | pallets/prices/src/lib.rs:188 | The get_special_asset_price function consistently returns None | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Informational | null | null | null | Code Quality | 15. The get_special_asset_price function consistently returns None
Severity: Informational
In pallets/prices/src/lib.rs:188, the get_special_asset_price function is designed to return a TimeStampedPrice value, but it consistently returns None instead. As a consequence, this behavior is misleading and renders the functi... | The get_special_asset_price function consistently returns None, making it ineffective. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
15 | pallets/lend-market/src/lib.rs:1045 | Inefficient reduce_reserves extrinsic execution in case of reduce_reserves parameter equal to zero | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Informational | null | null | null | Code Quality | 16. Inefficient reduce_reserves extrinsic execution in case of reduce_reserves parameter equal to zero
Severity: Informational
In pallets/lend-market/src/lib.rs:1045, the reduce_reserves extrinsic takes reduce_amount as a parameter. However, if this amount is zero, the function will perform all operations unnecessarily... | Inefficient execution occurs if reduce_reserves parameter is zero, performing unnecessary operations. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
16 | pallets/lend-market/src/farming.rs:28
pallets/lend-market/src/rate_model.rs:173 | Use of magic numbers decreases maintainability | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | null | Informational | null | null | null | Code Quality | 17. Use of magic numbers decreases maintainability
Severity: Informational
Throughout the codebase, hard-coded number literals without context or a description are used. Using such 'magic numbers' goes against best practices as they reduce code readability and maintenance as developers are unable to easily understand t... | Use of magic numbers decreases code readability and maintainability. | Acknowledged | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
17 | pallets/lend-market/src/lib.rs:678,778 | State change events are emitted even if no change has occurred | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | null | Informational | null | null | null | Business Logic | 18. State change events are emitted even if no change has occurred
Severity: Informational
In pallets/lend-market/src/lib.rs:778 and pallets/lend-market/src/lib.rs:678, when updating market parameters, the event about success is emitted regardless of whether anything has been changed. If none of the optional values are... | State change events are emitted even when no actual change has occurred. | Acknowledged | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
18 | pallets/lend-market/src/lib.rs:959,1894
pallets/leverage-staking/src/lib.rs:129
pallets/lend-market/src/interest.rs:141 | Miscellaneous comments | https://github.com/bifrost-finance/bifrost | fcf0acbaa93b631a3618af07e986c5c9c1c4ed38 | a0aef4bb83bab000cb99b8fb96e38b58afce432d | Informational | null | null | null | Code Quality | 19. Miscellaneous comments
Severity: Informational
Miscellaneous recommendations can be found below:
- In pallets/lend-market/src/lib.rs:1894 there should be an Overflow error, not an Underflow one, causing exchange_rate to be between (0.02, 1) range, so the division of amount value and exchange_rate could cause overfl... | Various code recommendations to fix minor errors and improve clarity. | Resolved | true | 12 | Bifrost | Oak Security | https://github.com/polkadot-assurance-legion/pal-docs/blob/main/audits/24h1/bifrost-oak-2401.pdf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.