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.
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).
Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.
Statuses are the security firms’ own
23 findings are still open or acknowledged in the firms’ reports: 4 high, 19 low (all open).
Centralization Risks in MasterChef.sol
Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗
Centralization Risks in SwaprumV2Factory.sol
Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗
Centralized Control of Contract Upgrade
Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗
Unknown Implementation of `migrator.migrate()`
Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗
`add()` Function Not Restricted
Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗
Check Effect Interaction Pattern Violated
Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗
Improper Usage of `public` and `external` Type
Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗
Incompatibility With Deflationary Tokens
Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗
Incorrect Event Emit
Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗
Lack of Input Validation
Swaprum - Audit 1 · CertiK · 5 May 2023 · Report ↗
Attached through a shared contract address. Our incident data ends in Nov 2026.
Swaprum, an Arbitrum-based DEX project, experienced a rugpull by the deployer.
Source: De.Fi incident database.
Newest first
| Report | Security firm | Date | Scope | Critical findings | Findings | Source |
|---|---|---|---|---|---|---|
| Swaprum - Audit 1 | Security firm: CertiK | Date: | Scope: —Not recorded; see the report | None open | Findings: 4 high · 19 low 23 open | skynet.certik.com ↗ |
Statuses are the security firm’s own, from each report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 4 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 19 | 0 | 0 |
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). 
Open the reportIn the contract `SwaprumV2Factory` the role `feeToSetter` has authority over the functions shown in the diagram below.  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 reportThe `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 reportThe `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 reportWhen 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 reportThe 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`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 reportThe 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 reportThe 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 reportAt 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 reportThere should always be events emitted in the sensitive functions that are controlled by centralization roles.
Open the reportThe functions at the pointed location, do not have a sanity check to validate if a pool is existing.
Open the reportWhile 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 reportThe 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 reportIn 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 reportThe linked code is a multiplication of one, which will return the same value. This multiplication can be removed to optimize the code.
Open the reportOpenZeppelin'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 reportThere are typos in the highlighted lines of the codebase. "R" can be deleted. "1/2th" should be "1/2".
Open the reportThe linked error message reads "withdraw: not good". This message does not state what is the condition that didn't meet.
Open the reportThe 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 reportThe linked variable is unused and can be removed.
Open the reportDifferent magic numbers are used as-is in code.
Open the reportThe 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 reportThe reports name a repository or files. Open a report to see its scope.
Trustblock holds 1 public audit report for swaprum.finance, dated 5 May 2023. The latest is by CertiK (“Swaprum - Audit 1”).
CertiK wrote the report Trustblock holds for swaprum.finance.
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.
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.
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.
<head><script src="https://widget.trustblock.run/project-widget.min.js" defer></script></head><body><divdata-tb-project-widgetdata-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