swaprum.finance audit reports

Arbitrum, Ethereumswaprum.financeX

swaprum.finance has 1 public audit report from CertiK; dated 5 May 2023; no critical findings reported. It also holds 1 incident (latest 17 May 2023).

Critical findings
No open critical findings
In 1 report.
Incident
Incident 17 May 2023
Source: De.Fi incident database. No audit on Trustblock is dated after it. See the incident
Open the latest report
Your label, live
Get the label for your site

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

Open findings across every firm23

Statuses are the security firms’ own

23 findings are still open or acknowledged in the firms’ reports: 4 high, 19 low (all open).

High
4
Low
19
  • High Open

    Centralization Risks in MasterChef.sol

    Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗

  • High Open

    Centralization Risks in SwaprumV2Factory.sol

    Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗

  • High Open

    Centralized Control of Contract Upgrade

    Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗

  • High Open

    Unknown Implementation of `migrator.migrate()`

    Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗

  • Low Open

    `add()` Function Not Restricted

    Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗

  • Low Open

    Check Effect Interaction Pattern Violated

    Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗

  • Low Open

    Improper Usage of `public` and `external` Type

    Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗

  • Low Open

    Incompatibility With Deflationary Tokens

    Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗

  • Low Open

    Incorrect Event Emit

    Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗

  • Low Open

    Lack of Input Validation

    Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗

All 23 open and acknowledged findings

Incidents1

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

Incident

Incident,

Swaprum, an Arbitrum-based DEX project, experienced a rugpull by the deployer.

Source: De.Fi incident database.

Audits before it
1.
Audits since
None on Trustblock.

Audits1

Newest first

ReportSecurity firmDateScopeCritical findingsFindingsSource
Swaprum - Audit 1Security firm: CertiKDate: Scope: Not recorded; see the reportNone openFindings: 4 high · 19 low
23 open
skynet.certik.com ↗

Findings23

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

SeverityOpenAcknowledgedFixed
Critical000
High400
Medium000
Low1900
HighCentralization Risks in MasterChef.solSwaprum - Audit 1 · CertiK · 5 May 2023Open

In the contract `MasterChef` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and perform, including but not limited to, the following: - set the `BONUS_MULTIPLIER` to 0 and remove any kind of rewards from all the pools. - set the `allocPoint` of a pool to 0 and exclude it from the rewards. - set the `migrator` contract address to a malicious one, which can execute any code with the call `migrator.migrate(lpToken)` (e.g., stealing all lpTokens of a pool). ![](https://accelerator-tasks-prod.acc.corp.certik.com/a6a51b05e44b4e549259a0790f8eef8b/diagrams/centralization_MasterChef-MasterChef-_owner.svg)

Open the report
HighCentralization Risks in SwaprumV2Factory.solSwaprum - Audit 1 · CertiK · 5 May 2023Open

In the contract `SwaprumV2Factory` the role `feeToSetter` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/c92cb894dcf141628f71e1037f6c2904/diagrams/centralization_SwaprumV2Factory-SwaprumV2Factory-feeToSetter.svg) Any compromise to the `feeToSetter` account may allow the hacker to take advantage of this authority and change the recipient address of the fees.

Open the report
HighCentralized Control of Contract UpgradeSwaprum - Audit 1 · CertiK · 5 May 2023Open

The `MasterChef` is an upgradeable contract, the owner can upgrade the contract without the community's commitment. If an attacker compromises the account, he can change the implementation of the contract and drain tokens from the contract.

Open the report
HighUnknown Implementation of `migrator.migrate()`Swaprum - Audit 1 · CertiK · 5 May 2023Open

The `setMigrator()` function can set the migrator contract to any contract that is implemented from the `IMigratorChef` interface by the owner. As a result, invoking `migrator.migrate()` in the `migrate()` function may have dangerous effects that are unknown to the user. However, removing `setMigrator()` and `migrate()` could result in losing the ability to upgrade and migrate the project.

Open the report
Low`add()` Function Not RestrictedSwaprum - Audit 1 · CertiK · 5 May 2023Open

When the same LP token is added into a pool more than once in function `add()`, the total amount of reward in function `updatePool()` is incorrectly calculated. The current implementation is relying on the operational correctness to avoid repeatedly adding the same LP token to the pool, as the function can only be called by the owner.

Open the report
LowCheck Effect Interaction Pattern ViolatedSwaprum - Audit 1 · CertiK · 5 May 2023Open

The order of external call/transfer and storage manipulation must follow the check-effect-interaction pattern in functions: - `enterStaking()` - `leaveStaking()` - `deposit()` - `withdraw()` - `emergencyWithdraw()` - `getTokens()`

Open the report
LowImproper Usage of `public` and `external` TypeSwaprum - Audit 1 · CertiK · 5 May 2023Open

`public` functions that are never called by the contract could be declared as `external`. `external` functions can be more efficient than `public` functions.

Open the report
LowIncompatibility With Deflationary TokensSwaprum - Audit 1 · CertiK · 5 May 2023Open

The MasterChef contract operates as the main entry for interaction with staking users. The staking users deposit LP tokens into the Swaprum pool and in return get a proportionate share of the pool’s rewards. Later on, the staking users can withdraw their own assets from the pool. In this procedure, `deposit()` and `withdraw()` are involved in transferring users’ assets into (or out of) the Swaprum protocol. When transferring standard ERC20 deflationary tokens, the input amount may not be equal to the received amount due to the charged (and burned) transaction fee. As a result, this may not meet the assumption behind these low-level asset-transferring routines and will bring unexpected balance inconsistencies.

Open the report
LowIncorrect Event EmitSwaprum - Audit 1 · CertiK · 5 May 2023Open

The functions `enterStaking()` and `leaveStaking()` emit an event when they are called. Such events are `Deposit` and `Withdraw`, respectively. These errors can confuse as users can not deposit nor withdraw the `SAPR` token but they can either `Stake` or `Unstake` them.

Open the report
LowLack of Input ValidationSwaprum - Audit 1 · CertiK · 5 May 2023Open

At the pointed locations the input parameters are not checked to be valid: - The function `initialize()` does not check that the parameters `_SAPR`, `_devaddr`, `_SAPRPerBlock`, and `_startBlock` are not the zero address or the value zero, as they correspond. - The function `updateMultiplier()` does not check whether the new value of `BONUS_MULTIPLIER` is zero. - The function `newDevAddress()` does not check whether the new parameter `_devaddr` is the zero address. - The function `setMigrator()` does not check whether the new parameter `_migrator` is the zero address. - The functions `deposit()`, `withdraw()`, `enterStaking()` and `leaveStaking()` do not check whether the parameter `_amount` is zero.

Open the report
Show 10 more
LowMissing Emit EventsSwaprum - Audit 1 · CertiK · 5 May 2023Open

There should always be events emitted in the sensitive functions that are controlled by centralization roles.

Open the report
LowMissing Explicit Pool Validity ChecksSwaprum - Audit 1 · CertiK · 5 May 2023Open

The functions at the pointed location, do not have a sanity check to validate if a pool is existing.

Open the report
LowMissing License IdentifiersSwaprum - Audit 1 · CertiK · 5 May 2023Open

While the SPDX license identifiers where not introduced until Solidity 0.6.8 it is still good practice to include them when using earlier compiler versions as well.

Open the report
LowRedundant Calls To `arbBlockNumber()`Swaprum - Audit 1 · CertiK · 5 May 2023Open

The function `getTokens()` calls three times the function `ArbSys(100).arbBlockNumber()` to get the current block number. Two of those calls can be avoided if the value was stored in a local variable. This could save gas and make the code more efficient. A similar issue happens on the functions `pendingSAPR()` and `updatePool()`.

Open the report
LowRedundant FunctionsSwaprum - Audit 1 · CertiK · 5 May 2023Open

In the codebase, the functions `enterStaking()` and `leaveStaking()` are implemented almost identically to `deposit()` and `withdraw()`. The main difference is that they update the `depositedSapr` value, which represents the total supply of the `SAPR` pool. This creates unnecessary code duplication and could lead to confusion for developers maintaining the codebase.

Open the report
LowRedundant MultiplicationSwaprum - Audit 1 · CertiK · 5 May 2023Open

The linked code is a multiplication of one, which will return the same value. This multiplication can be removed to optimize the code.

Open the report
LowSafeMath Not UsedSwaprum - Audit 1 · CertiK · 5 May 2023Open

OpenZeppelin's `SafeMath` library is not used in the linked operations, making it possible for overflow/underflow to occur and lead to inaccurate calculations.

Open the report
LowTyposSwaprum - Audit 1 · CertiK · 5 May 2023Open

There are typos in the highlighted lines of the codebase. "R" can be deleted. "1/2th" should be "1/2".

Open the report
LowUnclear Error MessageSwaprum - Audit 1 · CertiK · 5 May 2023Open

The linked error message reads "withdraw: not good". This message does not state what is the condition that didn't meet.

Open the report
LowUnder-minted TokensSwaprum - Audit 1 · CertiK · 5 May 2023Open

The function `updatePool()` mints less than the expected `SAPRReward`. In fact, the total value is multiplied by `855` and divided by `1000` reducing the token minting by a 14.5%.

Open the report
Show 3 more
LowUnused VariableSwaprum - Audit 1 · CertiK · 5 May 2023Open

The linked variable is unused and can be removed.

Open the report
LowUsage of Magic NumbersSwaprum - Audit 1 · CertiK · 5 May 2023Open

Different magic numbers are used as-is in code.

Open the report
LowVariables That Could Be Declared as ImmutableSwaprum - Audit 1 · CertiK · 5 May 2023Open

The linked variables assigned in the constructor can be declared as `immutable`. Immutable state variables can be assigned during contract creation but will remain constant throughout the lifetime of a deployed contract. A big advantage of immutable variables is that reading them is significantly cheaper than reading from regular state variables since they will not be stored in storage.

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.

swaprum.finance: questions

Is swaprum.finance audited?

Trustblock holds 1 public audit report for swaprum.finance, dated 5 May 2023. The latest is by CertiK (“Swaprum - Audit 1”).

Who audited swaprum.finance?

CertiK wrote the report Trustblock holds for swaprum.finance.

Are there open findings in swaprum.finance’s audits?

23 findings are still open or acknowledged in the firms’ reports: 4 high, 19 low (all open). 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="swaprum"
></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