CertiK reviewed BetFin (Betfin Stones Contracts) on 23 Sep 2024: 10 findings, 0 critical; 8 marked fixed, 2 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 | 0 | 0 | 0 |
| Medium | 0 | 0 | 1 |
| Low | 2 | 0 | 7 |
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=50 StakingInterface public immutable staking; ``` - The contract `Stones` interacts with third party contract with `StakingInterface` interface via `staking`. --- ```solidity=51 CoreInterface public immutable core; ``` - The contract `Stones` interacts with third party contract with `CoreInterface` interface via `core`. --- ```solidity uint256 private immutable created; uint256 private immutable subscriptionId; address public immutable vrfCoordinator; bytes32 public immutable keyHash; uint32 private constant callbackGasLimit = 2_500_000; uint16 public constant requestConfirmations = 3; uint32 private constant numWords = 1; constructor( uint256 _subscriptionId, address _core, address _staking, address _vrfCoordinator, bytes32 _keyHash, address _admin ) VRFConsumerBaseV2Plus(_vrfCoordinator) { // validation for vrf coordinator is not needed because it is already validated in the VRFConsumerBaseV2Plus contract vrfCoordinator = _vrfCoordinator; keyHash = _keyHash; subscriptionId = _subscriptionId; core = CoreInterface(_core); require(core.isStaking(_staking), "ST06"); staking = StakingInterface(_staking); created = block.timestamp; _grantRole(DEFAULT_ADMIN_ROLE, _admin); } ``` Since they are immutable or constant, the project team needs to ensure that the `vrfCoordinator` is always callable, and that the `keyHash` and `subscriptionId` are always valid, as well as that the `callbackGasLimit` is sufficient to execute the `rawFulfillRandomWords()` callback. In particular, the project team needs to prevent the risk of request failures caused by an invalid `subscriptionId`. It means the project team need to ensure that the request sent by calling `requestRandomWords()` in each round correctly triggers the callback.
The `getCurrentRound()` function calculates the current round based on the current `block.timestamp`, and its result is compared with the `_round` provided in the calldata. However, the `block.timestamp` at the time of transaction execution is unpredictable.
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