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.
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:
- 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
Contract Analysis
The Staking contract implements a staking contract with tiered gas-fee discounts for whitelisted standard tokens. Users lock tokens into tiered positions that grant a gas-fee discount rather than any token reward, and an early exit before the lock expires applies a per-tier penalty that is routed to the treasury. The contract is upgradeable and inherits the shared timelock base for access control, pausing, reentrancy protection and the upgrade timelock.
Ownership Privileges
The ownership of the contract has been assigned to role holders under the shared access-control base, with the root admin role held by a multisig in production. The owner retains full privileges including:
- Managing staking tiers, their discounts, lock durations, penalties and stake limits.
- Whitelisting or delisting the standard tokens that can be staked, and setting the treasury and stake caps.
- Rescuing a stuck position to an alternative recipient, applying the tier penalty when the position is still locked.
- Pausing the contract and proposing and executing an upgrade, subject to a forty-eight-hour timelock.
- The owner cannot create or distribute any token reward, since staking only grants gas-fee discounts.
- The owner cannot retroactively change a live position's discount, lock or penalty, which are snapshotted at stake time.
- The owner cannot configure a discount above the fixed maximum, nor a locked tier without a penalty.
- The root admin role can only be transferred subject to a forty-eight-hour delay.
Security Features
The contract implements several positive security features:
- Reentrancy guards and pause protection on all staking and unstaking paths, with safe-transfer token movements.
- Per-position snapshots of the discount, lock duration and penalty, so exit economics are fixed at commitment.
- A bounded per-user list of active positions that keeps the discount recalculation gas-bounded regardless of history.
- Configurable per-tier, per-position, per-user and per-token caps, plus invariants that reject a zero discount or a locked tier without a penalty.
Note - This Audit report consists of a security analysis of the Staking smart contract. This analysis did not include economic analysis of the contract's tokenomics. Moreover, we only audited the main contract for the Staking 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 | 1 findings
Pending
#1 high Issue
Admin can seize any staking position and send it to an arbitrary recipient
The previous cycle removed the admin rescue function and replaced it with a user-initiated emergency exit that always sends funds to the caller. In this cycle the user-initiated exit has been removed and an admin rescue function has been re-added. A holder of STAKING_ADMIN_ROLE can now move any active position's tokens to an arbitrary recipient address. If the position's lock has expired or its tier has no lock, no penalty applies and the full staked amount is sent to the admin-chosen recipient; if the position is still locked, the tier penalty is applied but the remaining payout still goes to the admin-chosen recipient rather than to the staker. This restores the single-key fund-seizure blast radius identified earlier and contradicts the contract's stated non-custodial design. Mitigations now present: the tier penalty is applied for locked positions (closing the earlier economic bypass), the function carries whenNotPaused and nonReentrant, and in production STAKING_ADMIN_ROLE is held by a 3-of-5 multisig. However, STAKING_ADMIN_ROLE is granted instantly (only the upgrader role is subject to the grant delay), so a single compromised or malicious admin still seizes user funds in one transaction.
medium Issues | 2 findings
Resolved
#1 medium Issue
Monotonic position counter caused a per-user lockout after repeated cycles
The per-user cap was previously checked against a counter that only ever increased, permanently locking users out after enough stake and unstake cycles even though they held zero active positions.
Resolved
#2 medium Issue
Positions could inherit live tier parameters instead of their own snapshot
Positions with zero snapshot fields previously fell back to the current tier configuration, allowing a tier manager to retroactively change discounts and lock durations for existing stakers.
low Issues | 3 findings
Resolved
#1 low Issue
Tier update did not re-check the penalty invariant when re-introducing a lock
The tier-update function previously accepted an arbitrary new lock duration without consulting the tier penalty, allowing a locked tier with no configured early-exit penalty, which would make an early exit revert for positions staked in it.
Resolved
#2 low Issue
Discount recalculation reverted on legitimate zero-discount tier configurations
A tier configured with a zero discount previously produced positions with a zero discount snapshot, which caused the discount recalculation to revert and created a latent per-user denial of service on subsequent exits.
Acknowledged
#3 low Issue
Initializer is publicly callable on the proxy
The initializer modifier prevents a second call but not the first. A proxy deployed without an atomic initialization call can be front-run to capture all roles.
optimization Issues | 1 findings
Pending
#1 optimization Issue
High cyclomatic complexity in the stake function
The stake function contains many sequential revert checks plus balance-delta logic and storage updates in a single body.
informational Issues | 4 findings
Pending
#1 informational Issue
Storage-layout comment mis-counts the storage variables
The layout header (lines 92-118) correctly enumerates 24 storage variables and states a gap of 26 slots for 50 reserved, and the declaration is a 26-slot gap (line 201), which is consistent. However, the inline comment on line 200 still reads '50 - 21 storage vars', a stale count from before the three most recent mappings were added. Documentation only; no storage impact.
Pending
#2 informational Issue
Penalty flush to treasury is not pause-gated
The penalty-flush function (line 627) is permissionless (pull-over-push to an admin-configured treasury) and is not gated by the pause guard. Cosmetic; no exploit path.
Pending
#3 informational Issue
State writes occur after the external transfer in the stake function (ordering style)
Both static analyzers report state changes after the external transfer-from in the stake function (lines 314-316). The function is protected by the reentrancy guard and the pause guard, so reentrancy is not exploitable; kept informational as a checks-effects-interactions ordering observation.
Resolved
#4 informational Issue
Per-position penalty snapshot fixes exit economics at stake time - verified sound
A new per-position penalty snapshot was added so exit economics are fixed at commitment. Reviewed for correctness and consistency with the existing lock-duration snapshot.