Part of CertiK’s series
CertiK reviewed SquidGrow (SquidGrow - Staking) on 4 May 2023: 22 findings, 0 critical; 13 marked fixed, 9 open.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 1 | 0 | 2 |
| Medium | 0 | 0 | 0 |
| Low | 8 | 0 | 11 |
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.  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. 
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.
Events should be emitted in sensitive functions controlled by centralization roles.
Sensitive functions controlled by privileged roles or which make important updates to the project should emit events.
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.
Addresses should be checked before assignment or external call to ensure `address(0)` is not used.
State variables that never change should be declared as `constant` to save gas.
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.
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.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (1)
1,045 projects reviewed · 1,376 reports · latest May 2025
See CertiK’s auditsSomething 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