Spectrum Protocol - Audit

CertiKFiles named in the report

CertiK reviewed Kroma (Spectrum Protocol - Audit) on 3 Apr 2024: 16 findings, 0 critical; 10 marked fixed, 4 acknowledged, 2 open.

No open critical findings
Open the reportOpen Kroma’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings16

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

SeverityOpenAcknowledgedFixed
Critical000
High020
Medium023
Low207
HighCentralization Related RisksAcknowledged

In the contract `CallOrder` 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 function call with value, function multi-call with value, and function delegate call. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-ebd3-77376550-b132-cb306981fd1d/diagrams/centralization_CallOrder-CallOrder-_owner.svg) ----- In the contract `SelectorRoleControlUpgradeable` the role `_admin` has authority over the functions shown in the diagram below. Any compromise to the `_admin` account may allow the hacker to take advantage of this authority and grant/revoke the selector role and pause/unpause the contract. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-ebd3-77376550-b132-cb306981fd1d/diagrams/centralization_SelectorRoleControlUpgradeable-SelectorRoleControlUpgradeable-_admin.svg) ----- In the contract `SlotOrder` 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 set/get the slot. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-ebd3-77376550-b132-cb306981fd1d/diagrams/centralization_SlotOrder-SlotOrder-_owner.svg) ----- In the contract `EcoProxyAdmin` 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 upgrade the proxy to implementation and call a function on the new implementation. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-ebd3-77376550-b132-cb306981fd1d/diagrams/centralization_admin-EcoProxyAdmin-_owner.svg) ----- In the contract `ERC20L2BridgedUpgradeable` the role `_admin` has authority over the functions shown in the diagram below. Any compromise to the `_admin` account may allow the hacker to take advantage of this authority and burn tokens from any address and mint tokens to any address. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-ebd3-77376550-b132-cb306981fd1d/diagrams/centralization_ERC20L2BridgedUpgradeable-ERC20L2BridgedUpgradeable-_admin.svg) ----- In the contract `ERC20MintableUpgradeable` the role `_admin` has authority over the functions shown in the diagram below. Any compromise to the `_admin` account may allow the hacker to take advantage of this authority and mint tokens to any address. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-ebd3-77376550-b132-cb306981fd1d/diagrams/centralization_ERC20MintableUpgradeable-ERC20MintableUpgradeable-_admin.svg) In the contract `SpectrumCoreState` the role `_admin` has authority over the functions - setCoreInfo() - setDeXInfo() - setIndexToken() - setIndexEvalRate() Any compromise to the `_admin` account may allow the hacker to take advantage of this authority and set core information( bridge address, fee address, fund underlying address, etc), set DEX information( weth address, router address, and path), set index token information and set index token's eval rate.

HighCentralized Control of Contract UpgradeAcknowledged

In the contract `SpectrumCore`, `SpectrumETH`, `L2SpectrumETH`,`SelectorRoleControlUpgradeable`, `EcoProxyAdmin`, `WrappingNativeCoin`, `EcoERC20Upgradeable` and `ERC20L2BridgedUpgradeable`, the role `admin` has the authority to update the implementation contract behind the proxy contract. Any compromise to the `admin` account may allow a hacker to take advantage of this authority and change the implementation contract which is pointed by proxy and therefore execute potential malicious functionality in the implementation contract.

MediumLack of Storage Gap in Upgradeable ContractAcknowledged

When updating upgradeable smart contracts for new features or bug fixes, it's essential to keep the state variables' declaration order unchanged to avoid storage layout issues. A practical solution is to include unused state variables or explicitly named storage gaps (like `__gap`) in the base contracts. This foresight allows reserved slots for future use, ensuring that any additions to the contract's state won't disrupt the storage pattern of derived contracts or the compatibility with previously deployed versions. The problem of "Lack of Storage Gap in Upgradeable Contract" occurs when these storage gaps are not incorporated into the base contract's logic. As a result, if new state variables are added to the base contract, they might overwrite existing variables in the child contracts due to storage slot collisions. For detailed guidelines and best practices, refer to the following OpenZeppelin documentation: - https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#storage-gaps

MediumThird-Party Dependency UsageAcknowledged

The contract serves as the underlying entity to interact with one or more third-party protocols. The scope of the audit treats third-party entities as black boxes and assumes their functional correctness. However, in the real world, third parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of third parties can possibly create severe impacts, such as increasing fees of third parties, migrating to new LP pools, etc. ```solidity=7 import { IKromaBridge } from "../../eco-libs/kroma/interfaces.sol"; ``` - The contract `SpectrumCoreLogic` interacts with third-party contract with `IKromaBridge` interface via `memSnap.info.bridge`. ```solidity=17 interface IidxAssetWrapper ``` - The contract `SpectrumCoreLogic` interacts with third-party contract with `IidxAssetWrapper` interface via `idxAsset`. ```solidity=221 idxAmount = IstETH(payable(requestedAsset)).submit{ value: amount }(address(0)); ``` - The contract `SpectrumCoreLogic` interacts with third-party contract with `IstETH` interface via `requestedAsset`. ```solidity=113 ethAmount = IEcoUniswapV3Router(memDex.router).exactInput( ``` - The contract `SpectrumCoreEntry` interacts with third-party contract with `IEcoUniswapV3Router` interface via `memDex.router`.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (18)

  • contracts/proxy/transparent.sol
  • contracts/access/CallOrder.sol
  • contracts/token/ERC20/ERC20MintableUpgradeable.sol
  • contracts/proxy/admin.sol
  • contracts/access/SelectorRoleControlUpgradeable.sol
  • contracts/spectrum/core/SpectrumCoreLogic.sol
  • contracts/spectrum/core/SpectrumCoreUtils.sol
  • contracts/access/EcoOwnable.sol
  • contracts/token/ERC20/ERC20L2BridgedUpgradeable.sol
  • contracts/token/ERC20/WETH.sol
  • contracts/spectrum/core/SpectrumCoreEntry.sol
  • contracts/token/ERC20/EcoERC20Upgradeable.sol
  • contracts/spectrum/core/SpectrumCore.sol
  • contracts/access/SlotOrder.sol
  • contracts/utils/BasisPointRateMath.sol
  • contracts/spectrum/core/SpectrumCoreState.sol
  • contracts/spectrum/SpectrumETH.sol
  • contracts/token/ERC20/ERC20MetadataUpgradeable.sol

Part of Kroma’s security record

Kroma
Audits3 audits by 1 firmLast audit Dec 2024, by CertiK.
Critical findingsNo open critical findingsAcross 3 reports.
Open Kroma’s security record

Security firm

CertiK

1,044 projects reviewed · 1,375 reports · latest May 2025

See CertiK’s audits

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