HCOW Info
HCOW is a GameFi ecosystem built around one idea: games should be provably fair, and the value they create should flow back to the people who play and hold.
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.
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
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.
Ownership is not renounced
The owner retains significant control, which could potentially be used to modify key contract parameters.
Contract is not upgradeable
The contract does not use proxy patterns or other mechanisms to allow future upgrades. Its behavior is locked in its current state.
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:
- Specification Review: Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
- Manual Code Examination: Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
- Specification Alignment: Ensure that the code accurately implements the provided specifications and intended functionalities.
- Test Coverage Assessment: Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
- Symbolic Execution: Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
- Best Practices Evaluation: Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
- 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.
Smart Contract Analysis Statement
Re-audit Scope
This statement replaces the one issued on 28 August 2026 and covers the staking contract as it stands at the pinned commit. The contract grew from eight hundred and three lines to eight hundred and sixty six, with ninety three lines changed, which is the smallest change among the four protocol contracts. All nine findings from the first round were re-verified against the new source. No new findings are recorded.
Contract Analysis
A holder delegates HCOW to exactly one representative. Rewards are funded in HCOW, never minted, and are released per second over a stated duration rather than in lumps, so every staked token earns for exactly the seconds it was staked. Each representative keeps a commission capped at ten percent, taken from its own delegators' share at the rate in force while it accrued. Unstaking has a seven day cooldown and the amount leaves the earning set the moment it is requested, so a leaving delegator neither earns nor blocks. Staked principal is never consumed here; that mechanism belongs to the profit sharing contract and mixing the two would make both harder to reason about.
Two changes since the first round account for most of the new code. A funding call of zero tokens is now valid when there is a carried balance to release, so rewards already committed no longer depend on new money arriving. And the count of active representatives is maintained on write rather than computed by walking storage on every read.
Ownership Privileges
No administrative action can move staked principal or reach accrued rewards. The owner can:
- Register a representative, up to a permanent ceiling of one hundred
- Update a representative's payout address, commission rate and active flag. Commission already earned is settled to the outgoing payout address before a repoint takes effect, so the owner cannot redirect a balance that accrued under the previous address
- Replace the reward funder, in one step, deliberately
- Nominate a successor owner, who must accept, and withdraw that nomination
The active flag gates new delegations only. It does not stop accrual, and cancelling a pending unstake is deliberately not gated on it, so the owner cannot convert a cancellable request into a forced exit by deactivating a representative mid-cooldown.
One power worth stating plainly, which the source now records: a compromised owner can consume all one hundred registry slots with junk identifiers and deactivate every genuine representative, permanently. That reaches up to a tenth of future emissions and freezes the registry. It cannot reach principal or accrued commission, because commission is accrued and frozen to the outgoing payout before any change is written. The mitigation is that the owner key is a multisig, and that belongs in the deployment checklist rather than only in a comment.
Security Features
- Rewards are funded, never minted. HCOW has a fixed supply and no mint function, so every reward paid was transferred in first
- Accrual is per second, which removes the moment a lump sum creates. A position staked for one block cannot be paid what a position staked all quarter is paid, and commission cannot be avoided by redelegating to a zero-commission representative for one block
- A funding call may add tokens or add time but may never lower the rate of a live period or pull its end date in. The two weaker forms of that guard the project records having tried are both genuinely exploitable, and the strict form is the right choice even though it refuses some honest top-ups in the tail of a fast period
- Commission is exact on every path. Every place that changes a representative's delegated weight is preceded by the accrual call, and a rate change freezes the net accumulator first so it cannot reach backwards into rewards already earned. That ordering is now pinned by mutation tests rather than by a comment
- A pool too small to move the accumulator has its released seconds carried rather than stranded or handed to whoever stakes next, and there is now a path to release the carry that does not depend on the funder choosing to fund again
- Solvency is maintained against the token balance rather than against the liability counter, which is deliberately a reserve rather than an exact sum; we re-derived the bound and the excess is at most one wei per harvest, in the safe direction
- Eight machine-searched invariant properties run at two hundred and fifty six runs and thirty two thousand seven hundred and sixty eight calls with zero reverts
Findings Summary
There were no medium or higher findings in either round, and none of the nine first-round findings has produced a new one. Seven are fixed, one is partially fixed with reasoning we accept, and one optimisation is declined with reasoning we also accept.
The registry ceiling is now protected by a test and by a mutation, which was the whole of what the finding asked for; slot reuse was correctly left unimplemented, because recreating a delegation outside the registry is what made the project's own earlier removal attempt unsafe. The carried reward balance now has a delivery path of its own, and the ordering detail that makes it work is right: the zero-amount guard sits after the accumulator has advanced, because the carried figure is written by that advance. The refusal of top-ups in the tail of a fast period is unchanged, correctly, and is now documented for whoever operates the funder role so a refusal reads as expected rather than as a fault.
On the question the response asks about this contract, our instruction is recorded in the findings: the reward funder setter should stay single step. The two risks are genuinely different. A mistyped funder address stops funding and is undone by the owner in one transaction, and the funder can do nothing else, because funding requires it to hold and approve the tokens itself. A mistyped owner address ends the ability to register or update a representative and to replace the funder, permanently. Ownership is now two step, which is where the asymmetry says the second step belongs.
The declined optimisation is the branch complexity of the funding function, and we would make the same call. A readability refactor of the densest arithmetic in the project, in the weeks before a re-audit, on a function where two of the project's own historical findings lived in the interaction between the two floors, is a real risk taken against a presentational gain. Doing it afterwards with this re-audit as the baseline is the right sequencing.
Note - This Audit report consists of a security analysis of the HCOWStaking smart contract. HCOW is a token on BNB Chain, not its own network, and nothing in this contract secures a chain or produces blocks; it records delegations, streams funded rewards and pays commission. Any external description should match that. We recommend investors do their own research before investing.
Files and details
Findings and Audit result
low Issues | 4 findings
Resolved
#1 low Issue
Representative registry ceiling is permanent and untested
The registry is capped at one hundred entries and there is no way to remove one. An entry can be marked inactive, which stops new delegations, but the slot is never reclaimed, so the hundredth registration is final for the life of the contract. The team attempted a removal function, found that it allowed a delegation to be recreated outside the registry and wiped accrued rewards, and correctly withdrew it, accepting the ceiling as a disclosed risk. The additional point from this review is that independent mutation testing raised the ceiling by a factor of a thousand and no suite in either repository failed, so the bound that exists is not protected against being changed by accident.
Resolved
#2 low Issue
Carried reward funds have no delivery path of their own
Reward seconds that elapse while too little is staked to move the accumulator are carried rather than stranded or handed to whoever stakes next, which is the right choice. The carried amount can only ever be released by the next ordinary funding call, so if the funder stops funding it stays in the contract indefinitely. The team considered a dedicated release path, withdrew it, and recorded the result as an operational requirement rather than a code path. Recording it here because it makes delivery of already-committed rewards depend on a role continuing to act.
Resolved
#3 low Issue
Top-ups in the tail of a fast period are refused
A funding call may add tokens or add time but may never lower the rate of a live period or pull its end date in. The floor is computed against the remaining time on the current period, which means that inside the tail of a fast period a top-up not large enough to sustain the current rate over the required minimum duration is rejected. The team measured two weaker forms of this guard and found both were exploitable, so the strict form is the right choice and the refusal is a deliberate accepted cost. It is a delay rather than a loss.
Resolved
#4 low Issue
Administrative changes take effect in a single step
Ownership transfer and the change of the reward funder both take effect immediately with no confirmation from the incoming address. A mistyped owner address permanently ends the ability to register or update representatives, and a mistyped funder address ends the ability to fund rewards. Neither can move staked principal, which bounds the damage, but neither is recoverable.
optimization Issues | 2 findings
Resolved
#1 optimization Issue
Active representative count is computed by iteration
The count of active representatives loops over the whole registry. The loop is bounded by the registry ceiling of one hundred and the array only grows through an owner-gated function, so it cannot be pushed past that bound by anyone else, and the function is a view. It is therefore not a denial-of-service concern, only avoidable work.
Acknowledged
#2 optimization Issue
Funding function has high branch complexity
The funding function carries a measured branch complexity of twelve across roughly eighty lines, combining the arrival measurement, two interacting duration floors, a rate floor, the carried-balance roll-in and the period bookkeeping.
informational Issues | 3 findings
Resolved
#1 informational Issue
Commission accounting verified exact on every path
The commission design uses a global per-second accumulator with per-representative net and commission anchors, and is exact only if commission is folded in before any change to a representative's delegated weight or rate. Every one of the five places that changes a representative's weight was checked and each is preceded by the accrual call, and the function that changes a commission rate accrues and then freezes the net accumulator before writing the new rate, so a rate change cannot reach backwards into rewards that already accrued. Rounding was checked in both directions: the delegator credit and the representative commission are both floored, so their sum can never exceed the gross released for that pool, and the residue stays in the contract rather than being over-paid.
Resolved
#2 informational Issue
Reward liability counter is a reserve rather than an exact sum
The reward liability counter reserves each release window in full rather than summing individual credits, because each credit is the difference of two independently floored figures and the sum can sit a fraction above the exact total. The decrements on the claim paths are clamped so that this can never cause a claim to revert, and solvency is enforced against the token balance rather than against the counter. The projected view mirrors the state machine exactly, including the case where a window is too small to move the accumulator. This is correct and deliberate, and it is documented in the source.
Resolved
#3 informational Issue
Static analysis findings on balance measurement and division order
Automated analysis flagged the balance measurement around each incoming transfer as a reentrancy concern and the rate calculation as performing a multiplication on the result of a division. Both are false positives in context. The balance measurement is the defence against a token that delivers less than requested, and every function containing it carries a reentrancy guard. The division before multiplication is deliberate: it computes the flooring remainder so that it can be carried forward rather than lost, and the intermediate is kept small on purpose to stay far from the top of the word in degenerate cases.