SquidGrow - Staking

CertiKFiles named in the report

Audit

Part of CertiK’s series

CertiK reviewed SquidGrow (SquidGrow - Staking) on 4 May 2023: 22 findings, 0 critical; 13 marked fixed, 9 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings22

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

SeverityOpenAcknowledgedFixed
Critical000
High102
Medium000
Low8011
HighCentralization Risks in SquidStakingAddendum.solOpen

In the contract `Ownable` 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 renounce ownership after misconfiguring privileged settings. ![](https://accelerator-tasks-prod.acc.corp.certik.com/806c5cf008fa45fc99454fc1b857bbc4/diagrams/centralization_SquidStakingAddendum-Ownable-_owner.svg) In the contract `SquidGrowStaking` 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 - whitelist an NFT they have sole access to and use to gain rewards from the contract; - remove tokens sent accidentally by the user without staking vis function `recoverUnsupportedToken()` and keep for themselves; - remove user access to functionality such as NFT staking and reward harvesting; - blacklist users to prevent access to their rewards; - set the fee address to an account they control and collect fees as high as 10%; - add a staking token they have sole access to and set the `_allocPoint` to a large value in order to drain the rewards from the contract; - update the `boostAPRPerNft` to an extremely large value or to be 0 in order to manipulate rewards; **Note**: Functions `updateSquidStakingPoolId()` and `changeSquidgrowAddress()` were added to the file post-audit. It is imperative that these functions are called in combination with other functions in the correct order. If the `_owner` account is compromised, a hacker may - use function `changeSquidgrowAddress()` to trap rewards and previous `SquidGrow` stakes in the contract; - use function `updateSquidStakingPoolId()` to prevent reward boosts or distribute reward boosts in an unintended manner. ![](https://accelerator-tasks-prod.acc.corp.certik.com/806c5cf008fa45fc99454fc1b857bbc4/diagrams/centralization_SquidStakingAddendum-SquidGrowStaking-_owner.svg)

LowInheritance of `IERC721Receiver`Open

The `SquidGrowStaking` contract inherits `IERC721Receiver` and implements function `onERC721Received()` as follows: ```solidity=871 function onERC721Received( address, address, uint256, bytes calldata ) external pure override returns (bytes4) { return IERC721Receiver.onERC721Received.selector; } ``` Any user who calls `safeTransferFrom()` on their own to send their token directly to the contract will have their token accepted by the `SquidGrowStaking` contract, but it will not be retrievable by the user, since they did not use `depositNft()` to send the NFT to the contract.

LowMissing Emit EventsOpen

Events should be emitted in sensitive functions controlled by centralization roles.

LowMissing Emit EventsOpen

Sensitive functions controlled by privileged roles or which make important updates to the project should emit events.

LowMissing Input ValidationOpen

The following checks should be made for input parameters. ### SquidStaking - Function `add()` is missing a check that `_stakedToken` has not already been added to the `poolInfo` array. If the `_stakedToken` address is added more than once, this could cause volatile issues within the staking contract.

LowMissing Zero Address ValidationOpen

Addresses should be checked before assignment or external call to ensure `address(0)` is not used.

LowState Variable Should Be Declared ConstantOpen

State variables that never change should be declared as `constant` to save gas.

LowUnnecessary Use of SafeMathOpen

The `SafeMath` library is used unnecessarily. With Solidity compiler versions 0.8.0 or newer, arithmetic operations will automatically revert in case of integer overflow or underflow.

LowVariables Can Be Declared as ImmutableOpen

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. An advantage of immutable variables is that reading them is significantly cheaper than reading from regular state variables since they are not located in storage.

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 (1)

  • contracts/SquidStakingAddendum.sol

Part of SquidGrow’s security record

SquidGrow
Audits16 audits by 2 firmsLast audit Sep 2024, by Hacken.
Critical findingsNo open critical findingsAcross the 16 reports, 1 critical finding was reported. It is marked fixed by the firm that reported it.
Open SquidGrow’s security record

Security firm

CertiK

1,045 projects reviewed · 1,376 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