Chiliz - V2 Genesis Contracts

CertiKFiles named in the report

CertiK reviewed Chiliz (Chiliz - V2 Genesis Contracts) on 21 Aug 2023: 12 findings, 0 critical; none marked fixed.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings12

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

SeverityOpenAcknowledgedFixed
Critical000
High200
Medium300
Low700
HighCentralization Related RisksOpen

In the contract `ChainConfig` the role `_fromgovernance` has authority over the functions shown in the diagram below. Any compromise to the `_fromgovernance` account may allow the hacker to take advantage of this authority and set `activeValidatorsLength`, `epochBlockInterval`, `misdemeanorThreshold`, `felonyThreshold`, `validatorJailEpochLength`, `undelegatePeriod`, `minValidatorStakeAmount`, `minStakingAmount` ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-3a69-c9ac6680-bfa9-d1659bbf5705/diagrams/centralization_ChainConfig-ChainConfig-_fromgovernance.svg) In the contract `DeployerProxy` the role `_fromcoinbase` has authority over the functions shown in the diagram below. Any compromise to the `_fromcoinbase` account may allow the hacker to take advantage of this authority and register deployed contracts. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-3a69-c9ac6680-bfa9-d1659bbf5705/diagrams/centralization_DeployerProxy-DeployerProxy-_fromcoinbase.svg) In the contract `DeployerProxy` the role `_fromgovernance` has authority over the functions shown in the diagram below. Any compromise to the `_fromgovernance` account may allow the hacker to take advantage of this authority and add/remove/ban/unban the deployer and disable/enable the contract ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-3a69-c9ac6680-bfa9-d1659bbf5705/diagrams/centralization_DeployerProxy-DeployerProxy-_fromgovernance.svg) In the contract `Governance` the role `_fromgovernance` has authority over the functions shown in the diagram below. Any compromise to the `_fromgovernance` account may allow the hacker to take advantage of this authority and add/remove the proposer and activate the proposer registry. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-3a69-c9ac6680-bfa9-d1659bbf5705/diagrams/centralization_Governance-Governance-_fromgovernance.svg) In the contract `Governance` the role `_proposer` has authority over the functions shown in the diagram below. Any compromise to the `_proposer` account may allow the hacker to take advantage of this authority and propose a new proposal and execute the proposal. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-3a69-c9ac6680-bfa9-d1659bbf5705/diagrams/centralization_Governance-Governance-_proposer.svg) In the contract `RuntimeUpgrade` the role `_fromgovernance` has authority over the functions shown in the diagram below. Any compromise to the `_fromgovernance` account may allow the hacker to take advantage of this authority and upgrade/deploy the system smart contract. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-3a69-c9ac6680-bfa9-d1659bbf5705/diagrams/centralization_RuntimeUpgrade-RuntimeUpgrade-_fromgovernance.svg) In the contract `SlashingIndicator` the role `_fromcoinbase` has authority over the functions shown in the diagram below. Any compromise to the `_fromcoinbase` account may allow the hacker to take advantage of this authority and slash the validator. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-3a69-c9ac6680-bfa9-d1659bbf5705/diagrams/centralization_SlashingIndicator-SlashingIndicator-_fromcoinbase.svg) In the contract `Staking` the role `_fromcoinbase` has authority over the functions shown in the diagram below. Any compromise to the `_fromcoinbase` account may allow the hacker to take advantage of this authority and deposit fee. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-3a69-c9ac6680-bfa9-d1659bbf5705/diagrams/centralization_Staking-Staking-_fromcoinbase.svg) In the contract `Staking` the role `_fromgovernance` has authority over the functions shown in the diagram below. Any compromise to the `_fromgovernance` account may allow the hacker to take advantage of this authority and add/remove/activate/disable the validator,pause/unpause the contract and fix the validator epoch. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-3a69-c9ac6680-bfa9-d1659bbf5705/diagrams/centralization_Staking-Staking-_fromgovernance.svg) In the contract `Staking` the role `_fromslashingindicator` has authority over the functions shown in the diagram below. Any compromise to the `_fromslashingindicator` account may allow the hacker to take advantage of this authority and slash the validator. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-3a69-c9ac6680-bfa9-d1659bbf5705/diagrams/centralization_Staking-Staking-_fromslashingindicator.svg) In the contract `SystemReward` the role `_fromgovernance` has authority over the functions shown in the diagram below. Any compromise to the `_fromgovernance` account may allow the hacker to take advantage of this authority and update distribution share. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-3a69-c9ac6680-bfa9-d1659bbf5705/diagrams/centralization_SystemReward-SystemReward-_fromgovernance.svg)

HighCentralized Control of Contract UpgradeOpen

The “Governance” contract inherits multiple upgradeable contracts, indicating that it’s part of an upgradeable system. Upgradeable contracts often pair with a proxy contract responsible for managing contract upgrades. The `admin` of the proxy has the authority to update the implementation contract (i.e., the Governance contract). Any compromise of the admin account could allow a hacker to exploit this authority, potentially altering the implementation contract pointed to by the proxy, and thus executing malicious functionality within the implementation contract.

Medium`_processDelegateQueue()`, `_processUndelegateQueOpen

The identified loop logic in `_processDelegateQueue()`, `_processUndelegateQueue()`, and `_calcDelegatorRewardsAndPendingUndelegates()` may exceed the block gas limit when the parameter `beforeEpochExclude`/`beforeEpoch` is far bigger than the epoch of last processed delegation. It can happen if functions `redelegateDelegatorFee()`/`claimDelegatorFee()`/`claimDelegatorFeeAtEpoch()` have not been called by a delegator for a long time. This is especially critical for `StakingPool` because it does not use `claimDelegatorFeeAtEpoch()` to process delegation little by little. Thus the modifier `advanceStakingRewards()` in `StakingPool` may always fail due to the use of `_processDelegateQueue()`/`_calcDelegatorRewardsAndPendingUndelegates()`. Then the functions `stake()`/`unstake()`/`claim()` in `StakingPool` will always fail and users' funds are locked in the contract and lost.

MediumPotentially incompatible bytecode for deploying nOpen

Deploying new contracts and upgrading existing contracts use different bytecodes. Deploying new contracts run `contract creation bytecode` which runs constructor code and returns the actual runtime bytecode. Upgrading existing contracts involves using new runtime bytecode to replace existing runtime bytecode. The function `_upgradeSystemSmartContract()` does not run constructor code at all which is required by deploying new contracts. Thus any new contract with non-empty constructor will not initialize properly and malfunction afterwards. See https://docs.soliditylang.org/en/latest/contracts.html#immutable

MediumValidators with non-zero amount of delegation orOpen

If a validator with non-zero delegation or pending validator rewards is removed, the functions `undelegate()`/`claimValidatorFee()`/`claimValidatorFeeAtEpoch()` will malfunction and users' funds can not be withdrawn.

LowMissing Error MessagesOpen

The **require** can be used to check for conditions and throw an exception if the condition is not met. It is better to provide a string message containing details about the error that will be passed back to the caller.

LowPotential Divide by ZeroOpen

Performing division by zero would raise an error and revert the transaction. ```solidity=136 uint64 epoch = uint64(blockNumber / _chainConfigContract.getEpochBlockInterval()); ``` The expression `blockNumber / _chainConfigContract.getEpochBlockInterval()` may divide by zero. Its divisor has has estimated interval [0, 4294967295]. --- ```solidity=241 return uint64(block.number / _chainConfigContract.getEpochBlockInterval() + 0); ``` The expression `block.number / _chainConfigContract.getEpochBlockInterval()` may divide by zero. Its divisor has has estimated interval [0, 4294967295]. --- ```solidity=48 return _stakerShares[validator][staker] * 1e18 / _calcRatio(validatorPool); ``` The expression `_stakerShares[validator][staker] * 1e18 / _calcRatio(validatorPool)` may divide by zero. Its divisor has has estimated interval [-1, pinf]. --- ```solidity=103 return uint64(block.number / _chainConfigContract.getEpochBlockInterval()); ``` The expression `block.number / _chainConfigContract.getEpochBlockInterval()` may divide by zero. Its divisor has has estimated interval [0, 4294967295].

LowPotential Out-of-Gas ExceptionOpen

When a loop allows an arbitrary number of iterations or accesses state variables in its body, the function may run out of gas and revert the transaction. ```solidity=42 for (uint256 i = 0; i < deployers.length; i++) { ``` Function `DeployerProxy.ctor` contains a loop and its loop condition depends on parameters: `deployers`. --- ```solidity=86 for (uint256 i = 0; i < currentValidatorSet.length; i++) { ``` Function `Governance.activateProposerRegistry` contains a loop and its loop condition depends on external calls: `_stakingContract.getValidators`. --- ```solidity=148 for (uint256 i = 0; i < validators.length; i++) { ``` Function `Governance._votingSupply` contains a loop and its loop condition depends on external calls: `_stakingContract.getValidators`. --- ```solidity=64 for (uint256 i = 0; i < _deployedSystemContracts.length; i++) { ``` Function `RuntimeUpgrade.getSystemContracts` contains a loop and its loop condition depends on state variables: `_deployedSystemContracts`. --- ```solidity=129 for (uint256 i = 0; i < validators.length; i++) { ``` Function `Staking.ctor` contains a loop and its loop condition depends on parameters: `validators`. --- ```solidity=664 for (uint256 i = 0; i < k; i++) { ``` Function `Staking.getValidators` contains a loop and its loop condition depends on external calls: `_chainConfigContract.getActiveValidatorsLength`. --- ```solidity=178 for (uint256 i = 0; i < validators.length; i++) { ``` Function `StakingPool.manuallyClaimPendingUndelegates` contains a loop and its loop condition depends on parameters: `validators`.

LowUninitialized State VariableOpen

One or more state variables are used without being initialized in the constructor. ```solidity=29 address internal _systemTreasury; ``` - `_systemTreasury` is never initialized, but used in `SystemReward._claimSystemFee`.

LowUnsafe Integer CastOpen

Type casting refers to changing an variable of one data type into another. The code contains an unsafe cast between integer types, which may result in unexpected truncation or sign flipping of the value. ```solidity=136 uint64 epoch = uint64(blockNumber / _chainConfigContract.getEpochBlockInterval()); ``` Casted expression `blockNumber / _chainConfigContract.getEpochBlockInterval()` has estimated range [0, 115792089237316195423570985008687907853269984665640564039457584007913129639935] but target type `uint64` has range [0, 18446744073709551615]. --- ```solidity=342 require(recentDelegateOp.amount >= uint64(amount / BALANCE_COMPACT_PRECISION), "insufficient balance"); ``` Casted expression `amount / BALANCE_COMPACT_PRECISION` has estimated range [0, 11579208923731619542357098500868790785326998466564056403945758400791] but target type `uint64` has range [0, 18446744073709551615]. --- ```solidity=696 currentSnapshot.totalRewards += uint96(msg.value); ``` Casted expression `msg.value` has estimated range [1, 115792089237316195423570985008687907853269984665640564039457584007913129639935] but target type `uint96` has range [0, 79228162514264337593543950335]. --- ```solidity=859 return uint112(amount / BALANCE_COMPACT_PRECISION); ``` Casted expression `amount / BALANCE_COMPACT_PRECISION` has estimated range [0, 11579208923731619542357098500868790785326998466564056403945758400791] but target type `uint112` has range [0, 5192296858534827628530496329220095].

Show 2 more
LowUnused Return ValueOpen

The smart contract does not check or store the return value of an external call in a local or state variable, which may introduce vulnerabilities due to the unhandled outcome. ```solidity=89 return _stakingContract.calcAvailableForRedelegateAmount(validatorPool.validatorAddress, address(this)); ```

LowUnused State VariableOpen

One or more state variables are never used in the codebase. Variable `__reserved` in `InjectorContextHolder` is never used in `ChainConfig`. ```solidity=36 uint256[100 - 8] private __reserved; ```

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

  • contracts/Governance.sol
  • contracts/StakingPool.sol
  • contracts/RuntimeUpgrade.sol
  • contracts/Injector.sol
  • contracts/SystemReward.sol
  • contracts/ChainConfig.sol
  • contracts/SlashingIndicator.sol
  • contracts/DeployerProxy.sol
  • contracts/Staking.sol

Part of Chiliz’s security record

Chiliz
Audits8 audits by 3 firmsLast audit Jan 2026, by Halborn.
Critical findingsNo open critical findingsAcross the 8 reports, 1 critical finding was reported. It is marked fixed by the firm that reported it.
Open Chiliz’s security record

Security firm

CertiK

1,044 projects reviewed · 1,375 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