CertiK reviewed Port3 (Port3-audit) on 30 Oct 2023: 10 findings, 1 critical; 2 marked fixed, 3 acknowledged, 5 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 | 1 | 0 |
| High | 0 | 1 | 0 |
| Medium | 0 | 1 | 0 |
| Low | 5 | 0 | 2 |
The "claimRandomPool" function allows owners to withdraw certain amount of assets from the contract without any restrictions. The auditor would like to understand how such an implementation matches the function name "claimRandomPool." What does the word "Random" mean in the context of the function?
When transferring deflationary ERC20 tokens, the input amount may not be equal to the received amount due to the charged transaction fee. For example, if a user sends 100 deflationary tokens (with a 10% transaction fee), only 90 tokens actually arrived to the contract. However, a failure to discount such fees may allow the same user to withdraw 100 tokens from the contract, which causes the contract to lose 10 tokens in such a transaction. Reference: https://thoreum-finance.medium.com/what-exploit-happened-today-for-gocerberus-and-garuda-also-for-lokum-ybear-piggy-caramelswap-3943ee23a39f ```solidity=106 IERC20(rewardToken).safeTransferFrom(msg.sender, address(this), amount); ``` - Transferring tokens by `amount`. ```solidity=110 totalReward = totalReward.add(amount); ``` - This function call executes the following operation. - In `SafeMath.add`, - `uint256 c = a + b;` - The `amount` appears to be used for bookkeeping purposes without compensating the potential transfer fees.
The contract is serving 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=18 address public rewardToken; ``` - The contract `PrizePool` interacts with third party contract with `IERC20` interface via `rewardToken`.
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. ```solidity=13 using SafeMath for uint256; ``` - `SafeMath` library is used for `uint256` type in `PrizePool` contract. ```solidity=83 userFeePool[_users[i]] = userFeePool[_users[i]].add(_amounts[i]); ``` - `SafeMath.add` is called in `setWhitelist` function of `PrizePool` contract. *Note: Only a sample of 2 `SafeMath` library usage in this contract (out of 18) are shown above.* --- ```solidity=17 library SafeMath { ``` - An implementation of `SafeMath` library is found.
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.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (2)
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