OKZOO Info

OKZOO is the leading AI infrastructure, powering next-gen GameFAI DApps. Officially live on BNB Chain.

OKZOO Logo

Team and KYC Verification

The team has securely submitted their personal information to SolidProof.io for verification.

In the event of any fraudulent activities, this information will be promptly reported to the relevant authorities to ensure accountability and compliance.

TrustNet Score

The TrustNet Score evaluates crypto projects based on audit results, security, KYC verification, and social media presence. This score offers a quick, transparent view of a project's credibility, helping users make informed decisions in the Web3 space.

95.94
Poor Excellent

Real-Time Threat Detection

Real-time threat detection, powered by Cyvers.io, is currently not activated for this project.

This advanced feature provides continuous monitoring and instant alerts to safeguard your assets from potential security threats. Real-time detection enhances your project's security by proactively identifying and mitigating risks. For more information, click here.

Security Assessments

Select the audit
"Static Analysis Dynamic Analysis Symbolic Execution SWC Check Manual Review"
Contract address
N/A
Network N/A
License N/A
Compiler N/A
Type N/A
Language Solidity
Onboard date 2025/04/22
Revision date 2025/04/23

Summary and Final Words

No crucial issues found

The contract does not contain issues of high or medium criticality. This means that no known vulnerabilities were found in the source code.

Contract owner cannot mint

It is not possible to mint new tokens.

Contract owner cannot blacklist addresses.

It is not possible to lock user funds by blacklisting addresses.

Contract owner cannot set high fees

The fees, if applicable, can be a maximum of 25% or lower. The contract can therefore not be locked. Please take a look in the comment section for more details.

Contract cannot be locked

Owner cannot lock any user funds.

Token cannot be burned

There is no burning within the contract without any allowances

Ownership is not renounced

The owner retains significant control, which could potentially be used to modify key contract parameters.

Contract is upgradeable

The contract uses a proxy pattern or similar mechanism, enabling future upgrades. This can introduce risks if the upgrade mechanism is not securely managed.

Scope of Work

This audit encompasses the evaluation of the files listed below, each verified with a SHA-1 Hash. The team referenced above has provided the necessary files for assessment.

The auditing process consists of the following systematic steps:

  1. Specification Review: Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
  2. Manual Code Examination: Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
  3. Specification Alignment: Ensure that the code accurately implements the provided specifications and intended functionalities.
  4. Test Coverage Assessment: Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
  5. Symbolic Execution: Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
  6. Best Practices Evaluation: Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
  7. Actionable Recommendations: Provide detailed, specific, and actionable steps to secure and optimize the smart contracts.

A file with a different Hash has been intentionally or otherwise modified after the security review. A different Hash may indicate a changed condition or potential vulnerability that was not within the scope of this review.

Final Words

The following provides a concise summary of the audit report, accompanied by insightful comments from the auditor. This overview captures the key findings and observations, offering valuable context and clarity.


Ownership Privileges
  • The owner can toggle the emergency withdrawal setting.
  • The owner can pause/unpause the functionalities for not more than 12 days.
  • The owner can withdraw any token from the contract.
  • The owner initializes and sets the contract parameter.

Note - This Audit report consists of a security analysis of the OKZOO Staking smart contract. This analysis did not include functional testing (or unit testing) of the contract’s logic. Moreover, we only audited one token contract for the OKZOO team. Other contracts associated with the project were not audited by our team. We recommend investors do their own research before investing.

Files and details

Findings and Audit result

high Issues | 2 findings

Resolved

#1 high Issue
The owner can lock claim
Staking.sol
L207-248
L259-291
Description

The Staking contract's pausable functionality and claim lock mechanism create a significant centralization risk as the owner can unilaterally freeze all staking and claiming operations. This single-authority control allows the owner to indefinitely block users from retrieving their staked tokens, even after lock periods expire, effectively holding user funds hostage. Additionally, emergency withdrawals require both pausing the contract and enabling emergency mode, creating a two-step dependency on owner actions. To mitigate these risks, implement time-limited pauses with automatic unpause after a fixed period, separate stake and claim pause functions, require multi-signature approval for critical actions, add timelocks for pause operations, create a token-holder governance mechanism for unpause votes, and develop an emergency claim override that functions after extended pause periods.

Resolved

#2 high Issue
Unlimited Owner Withdrawal Authority
Staking.sol
L250-253
Description

The withdraw() function allows the contract owner to withdraw any token (including the staked tokens) in any amount without restrictions. There are no checks to ensure that sufficient tokens remain to cover user deposits. This creates a significant risk of contract insolvency where users' staked tokens could be withdrawn by the owner, leaving users unable to claim their stakes. To mitigate this, Implement balance validation to only allow withdrawal of excess tokens. For staking tokens, only permit withdrawals of token.balanceOf(address(this)) - totalStaked. For reward tokens, implement a similar accounting system to track available rewards vs allocated rewards.

low Issues | 3 findings

Resolved

#1 low Issue
No Validation for Lock Period Input
Staking.sol
L146-187
Description

The function allows any value for lockPeriod without verifying if it exists in the lockPeriods mapping. Later, when calculating rewards: uint256 bonusPeriod = lockPeriods[claimRequest.lockPeriod]; - a non-existent period will result in 0 bonus, silently reducing rewards.

Resolved

#2 low Issue
Unnecessary Duplicate Condition in Emergency Withdrawal
Staking.sol
L259-291
Description

The emergencyWithdraw() function contains an identical check for claimAmount == 0 that appears twice - once immediately after retrieving the value, and again after processing stake requests. Since claimAmount is never modified between these checks, the second verification is completely redundant, wasting gas and potentially indicating insufficient code review. To mitigate this, Remove the second redundant check before the token transfer. This simple change will reduce gas costs during emergency withdrawals without altering the function's behavior or security.

Pending

#3 low Issue
Integer Division Truncation in Reward Calculations.
Staking.sol
L349-390
Description

The reward calculation in _calculateReward suffers from precision loss due to Solidity's integer arithmetic. The formula (amount * (apr + bonusPeriod) * timePeriod) / 100 / 365 / ONE_DAY performs division operations after multiplication, causing decimal truncation. This disproportionately affects users with smaller stakes or shorter staking periods, who may receive zero rewards even when mathematically entitled to non-zero amounts. To mitigate this, Implement fixed-point arithmetic by using a precision factor (e.g., 1e18) to preserve decimal precision during calculations. Rearrange the formula to minimize division operations or use a decimal library for more accurate calculations.

informational Issues | 1 findings

Resolved

#1 informational Issue
Floating pragma solidity version
Staking.sol
L3
Description

Adding the constant version of solidity is recommended, as this prevents the unintentional deployment of a contract with an outdated compiler that contains unresolved bugs.