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.

72.87
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 2026/04/23
Revision date 2026/05/19

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.

Token transfer can be locked

Owner can lock user funds with owner functions.

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.


Smart Contract Analysis Statement (Tier 2 re-audit)

Contract Analysis

The Treasury contract collects early-unstake penalties from Staking and accepts direct ETH/ERC20 deposits, and routes all outflows through a propose/execute timelock with daily rate limiting and a longer delay for "large" withdrawals. In this re-audit cycle the file was materially rewritten: the legacy direct withdrawETH / withdrawERC20 functions are gone, the + amount inflation in the daily-cap math is fixed, the address(0)-as-token aliasing in proposeWithdrawERC20 is rejected with a dedicated InvalidToken() error, parameter changes always go through the 48-hour proposal flow, and an acceptedTreasuryTokens allow-list now defends the delay calculation against malicious balanceOf returns. The contract was also re-parented to TimelockUpgradeable (replacing Ownable2Step + AccessControl) so the privilege model is unified with the rest of the deployment. Remaining attention:

  • _enforceDailyLimit still reads IERC20(token).balanceOf(address(this)) for ERC20 tokens that are NOT on the allow-list. The delay-path hardening should be mirrored here.
  • Withdrawal proposals survive a DEFAULT_ADMIN rotation: an old proposal can execute under the new admin unless explicitly cancelled. Document this in the multi-sig runbook.
  • Daily cap is computed against the CURRENT balance at execution time. Mid-day inflows raise the effective cap. This is by-design after the daily-cap fix but easy to misread as a hard cap on the opening balance.
  • initialize() remains publicly callable on the proxy — mitigated by the Gnosis Safe handover in scripts/deploy.ts.

Privilege Model (Tier 2)

  • DEFAULT_ADMIN_ROLE — proposes withdrawals (ETH or ERC20) and parameter changes, and cancels pending proposals. Transfer requires a 48-hour delay via AccessControlDefaultAdminRulesUpgradeable; in production this slot is the 3-of-5 Gnosis Safe (M4).
  • Anyone (post-timelock) can execute a previously approved proposal via executeWithdraw; the daily-limit gate still applies.
  • PAUSER_ROLE can pause / unpause both executeWithdraw and executeWithdrawParams.
  • UPGRADER_ROLE holds the UUPS upgrade key, subject to the 48-hour upgrade timelock and the 365-day M5 auto-renouncement.

Security Features

  • Two independent rate-limit surfaces: per-call delay (standard 48h, large-withdrawal 7d) and daily cap (10% of balance by default).
  • Parameter floors (MIN_STANDARD_DELAY = 1 hour, MIN_LARGE_DELAY = 1 day, MIN_LARGE_THRESHOLD_BPS = 1000) prevent accidental disablement.
  • nonReentrant on executeWithdraw; CEI order (clear proposal before transfer).
  • WithdrawProposal now records the proposer address for forensic accountability.
  • Constants exposed as BPS_DENOMINATOR, MIN_LARGE_THRESHOLD_BPS, MIN_STANDARD_DELAY, MIN_LARGE_DELAY replace the previous raw 10000 / 5000 / 1000 literals.
  • Storage layout: 15 slots + __gap[35] = 50 reserved. A storage-layout regression test is recommended; scripts/storage-layout-check.ts is already in the repo.
  • Receive function emits FundsReceived(sender, amount) for tracking; ETH is not silently absorbed.

Note — This statement covers Treasury only at the audit target commit 9576ef4. Note that the team's verbal summary "Treasury.sol unchanged in this refactor" does not reflect the actual diff against the previous audit cycle — Treasury was substantially modified to (a) adopt the new TimelockUpgradeable parent and (b) land the audit-fix items above. Reviewers should examine Treasury.sol in this cycle as if it were a substantially new contract.

Files and details

Findings and Audit result

medium Issues | 2 findings

Resolved

#1 medium Issue
Daily withdrawal limit is computed over an inflated base - on-chain violation of the configured policy cap
Treasury.sol
L451
Description

_enforceDailyLimit previously inflated the denominator with `+ amount`, making the effective first-withdrawal ceiling exceed the configured cap.

Resolved

#2 medium Issue
Legacy direct withdrawals can be re-enabled by a timelocked parameter change
Treasury.sol
LN/A
Description

withdrawETH and withdrawERC20 were guarded by `if (standardWithdrawDelay > 0) revert`. A timelocked parameter change could disarm the guard and re-enable a single-tx drain.

low Issues | 4 findings

Acknowledged

#1 low Issue
Initializer is publicly callable on the proxy
Treasury.sol
L190
Description

initialize() was unrestricted. If the proxy is deployed without an atomic initialize() call bundled into the same transaction, an observer can front-run initialization and gain every admin role.

Resolved

#2 low Issue
proposeWithdrawERC20 silently accepts address(0) and executes as an ETH withdrawal
Treasury.sol
L219
Description

proposeWithdrawERC20 did not reject a zero token address, which was silently aliased to an ETH withdrawal at the execute step.

Resolved

#3 low Issue
Parameter setter skips the timelock when standardWithdrawDelay is currently zero
Treasury.sol
L280
Description

setWithdrawParams took an 'immediate execution' branch when standardWithdrawDelay was zero, which a future proposal could re-enable by setting the delay back to zero.

Resolved

#4 low Issue
Legacy withdrawETH emits WithdrawExecuted with proposalId = 0
Treasury.sol
LN/A
Description

The legacy direct-withdraw functions emitted WithdrawExecuted with proposalId = 0, colliding with the identifier of the first timelocked proposal.

optimization Issues | 3 findings

Resolved

#1 optimization Issue
Constructor is not marked payable
Treasury.sol
L179
Description

The implementation constructor was non-payable.

Resolved

#2 optimization Issue
Two nested conditions use && instead of sequential if statements
Treasury.sol
L424
Description

_calculateDelay and _validateParams used compound && conditions.

Resolved

#3 optimization Issue
Magic numbers for basis-point arithmetic
Treasury.sol
L22
Description

The values 10000, 5000 and 1000 appeared repeatedly throughout the contract as raw literals.

informational Issues | 6 findings

Resolved

#1 informational Issue
Storage gap under-counts the struct slot consumption
Treasury.sol
L78
Description

The storage gap comment under-counted the pendingParamsProposal struct slots.

Resolved

#2 informational Issue
executeWithdrawParams is not pause-gated
Treasury.sol
L308
Description

executeWithdraw carried whenNotPaused but executeWithdrawParams did not.

Resolved

#3 informational Issue
Withdrawal proposals do not record the proposer
Treasury.sol
L370
Description

WithdrawProposal did not include the proposer address.

Resolved

#4 informational Issue
Token balance used in _calculateDelay is readable by the token itself
Treasury.sol
L394
Description

_calculateDelay read IERC20(token).balanceOf(address(this)) to decide whether the large-withdrawal delay applies, which a malicious token could manipulate.

Resolved

#5 informational Issue
nonReentrant is not the first modifier on legacy withdraw functions (style hardening)
Treasury.sol
LN/A
Description

On legacy withdrawETH and withdrawERC20, nonReentrant appeared after onlyOwner.

Pending

#6 informational Issue
Daily cap is read from CURRENT balance, allowing inflows to raise the cap mid-day
Treasury.sol
L451
Description

After the T-M-001 fix, `_enforceDailyLimit` reads `address(this).balance` (or `IERC20(token).balanceOf(...)`) at the moment of execution. If the treasury receives an inflow during the day (e.g. via `flushERC20PenaltiesToTreasury`), the cap recomputes against the higher balance and additional same-day withdrawals become possible above the initially-intended ceiling. By-design behaviour, no exploit path under the current trust model, but easy to misread as a hard cap on the opening balance.