Betfin Stones Contracts

CertiKFiles named in the report

CertiK reviewed BetFin (Betfin Stones Contracts) on 23 Sep 2024: 10 findings, 0 critical; 8 marked fixed, 2 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings10

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

SeverityOpenAcknowledgedFixed
Critical000
High000
Medium001
Low207
LowThird-Party Dependency UsageOpen

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.

LowUnpredictable `block.timestamp` in `getCurrentRouOpen

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.

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

  • src/Stones.sol
  • src/StonesBet.sol

Part of BetFin’s security record

BetFin
Audits4 audits by 1 firmLast audit Dec 2024, by CertiK.
Critical findingsNo open critical findingsAcross the 4 reports, 3 critical findings were reported. Each is marked fixed by the firm that reported it.
Open BetFin’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