Cubiswap audit reports

Cubiswap has 1 public audit report from CertiK; dated 15 Sep 2023; no critical findings reported.

Critical findings
No open critical findings
In 1 report.
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 firm12

Statuses are the security firms’ own

12 findings are still open or acknowledged in the firms’ reports: 4 high, 2 medium, 6 low (6 open, 6 acknowledged).

High
4
Medium
2
Low
6
  • High Acknowledged

    Centralization Risks in CubiSwapFactory.sol

    CubiSwap-Audit · CertiK · 15 Sep 2023 · Report ↗

  • High Acknowledged

    Centralization Risks in CubiToken.sol

    CubiSwap-Audit · CertiK · 15 Sep 2023 · Report ↗

  • High Acknowledged

    Centralization Risks in MasterChef.sol

    CubiSwap-Audit · CertiK · 15 Sep 2023 · Report ↗

  • High Acknowledged

    Centralized Control of Contract Upgrade

    CubiSwap-Audit · CertiK · 15 Sep 2023 · Report ↗

  • Medium Acknowledged

    Potential Loss of Pool Rewards

    CubiSwap-Audit · CertiK · 15 Sep 2023 · Report ↗

  • Medium Acknowledged

    State Variables in Upgradeable Contracts are Init

    CubiSwap-Audit · CertiK · 15 Sep 2023 · Report ↗

  • Low Open

    Divide Before Multiply

    CubiSwap-Audit · CertiK · 15 Sep 2023 · Report ↗

  • Low Open

    Incompatibility with Deflationary Tokens

    CubiSwap-Audit · CertiK · 15 Sep 2023 · Report ↗

  • Low Open

    log info should be removed

    CubiSwap-Audit · CertiK · 15 Sep 2023 · Report ↗

  • Low Open

    Potential Cross-Chain Replay Attack

    CubiSwap-Audit · CertiK · 15 Sep 2023 · Report ↗

All 12 open and acknowledged findings

Audits1

Newest first

ReportSecurity firmDateScopeCritical findingsFindingsSource
CubiSwap-AuditSecurity firm: CertiKDate: Scope: Files listedNone openFindings: 4 high · 2 medium · 6 low
6 acknowledged · 6 open
skynet.certik.com ↗

Findings12

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

SeverityOpenAcknowledgedFixed
Critical000
High040
Medium020
Low600
LowDivide Before MultiplyCubiSwap-Audit · CertiK · 15 Sep 2023Open

Performing integer division before multiplication truncates the low bits, losing the precision of calculation. ```solidity=166 uint256 cubiReward = multiplier.mul(cubiPerBlock).mul(pool.allocPoint).div(totalAllocPoint); ``` ```solidity=167 accCubiPerShare = accCubiPerShare.add(cubiReward.mul(1e12).div(lpSupply)); ``` --- ```solidity=192 uint256 cubiReward = multiplier.mul(cubiPerBlock).mul(pool.allocPoint).div(totalAllocPoint); ``` ```solidity=195 pool.accCubiPerShare = pool.accCubiPerShare.add(cubiReward.mul(1e12).div(lpSupply)); ```

Open the report
LowIncompatibility with Deflationary TokensCubiSwap-Audit · CertiK · 15 Sep 2023Open

When transferring deflationary ERC20 tokens, the input amount may not be equal to the received amount due to the charged transaction fee. For example, if a user sends 100 deflationary tokens (with a 10% transaction fee), only 90 tokens actually arrived to the contract. However, a failure to discount such fees may allow the same user to withdraw 100 tokens from the contract, which causes the contract to lose 10 tokens in such a transaction. Reference: https://thoreum-finance.medium.com/what-exploit-happened-today-for-gocerberus-and-garuda-also-for-lokum-ybear-piggy-caramelswap-3943ee23a39f ```solidity=214 pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount); ``` - Transferring tokens by `_amount`. ```solidity=215 user.amount = user.amount.add(_amount); ``` - This function call executes the following operation. - In `SafeMath.add`, - `uint256 c = a + b;` - The `_amount` appears to be used for bookkeeping purposes without compensating the potential transfer fees. --- ```solidity=233 pool.lpToken.safeTransfer(address(msg.sender), _amount); ``` - Transferring tokens by `_amount`. ```solidity=232 user.amount = user.amount.sub(_amount); ``` - This function call executes the following operation. - In `SafeMath.sub`, - `return a - b;` - The `_amount` appears to be used for bookkeeping purposes without compensating the potential transfer fees.

Open the report
Lowlog info should be removedCubiSwap-Audit · CertiK · 15 Sep 2023Open

There are some console.log arguments within the codebase, this seems to only be used for development purposes and is not useful for users.

Open the report
LowPotential Cross-Chain Replay AttackCubiSwap-Audit · CertiK · 15 Sep 2023Open

Signed messages are not properly verified with the current chain ID, thus allowing attackers to perform replay attacks across chains. Hardcoded or cached chain ID values are also vulnerable since a hard fork may occur and change the chain ID in the future. ```solidity=98 abi.encodePacked( '\x19\x01', DOMAIN_SEPARATOR, keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline)) ) ``` - Reading a state variable `DOMAIN_SEPARATOR`, which seems to be a cached chain ID value. - Encoding the cached chain ID value `DOMAIN_SEPARATOR`. ```solidity=104 address recoveredAddress = ecrecover(digest, v, r, s); ``` - Calling `ecrecover` with a hash that does not properly include the chain ID.

Open the report
LowUnprotected InitializerCubiSwap-Audit · CertiK · 15 Sep 2023Open

One or more logic contracts do not protect their initializers. An attacker can call the initializer and assume ownership of the logic contract, whereby she can perform privileged operations that trick unsuspecting users into believing that she is the owner of the upgradeable contract. ```solidity=22 contract MasterChef is OwnableUpgradeable { ``` - `MasterChef` is an upgradeable contract that does not protect its initializer. ```solidity=77 function initialize( ``` - `initialize` is an unprotected initializer function.

Open the report
LowWhitelist cannot be removedCubiSwap-Audit · CertiK · 15 Sep 2023Open

The owner of the contract `Cubitoken` can add users to whitelist utilizing function `addWhiteList`. Once a user is added to the whitelist, he cannot be removed.

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.

The repositories and files the reports name

Cubiswap: questions

Is Cubiswap audited?

Trustblock holds 1 public audit report for Cubiswap, dated 15 Sep 2023. The latest is by CertiK (“CubiSwap-Audit”).

Who audited Cubiswap?

CertiK wrote the report Trustblock holds for Cubiswap.

Are there open findings in Cubiswap’s audits?

12 findings are still open or acknowledged in the firms’ reports: 4 high, 2 medium, 6 low (6 open, 6 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="cubiswap"
></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