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.
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:
- 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 (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:
_enforceDailyLimitstill readsIERC20(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 inscripts/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 viaAccessControlDefaultAdminRulesUpgradeable; 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_ROLEcan pause / unpause bothexecuteWithdrawandexecuteWithdrawParams.UPGRADER_ROLEholds 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. nonReentrantonexecuteWithdraw; CEI order (clear proposal before transfer).WithdrawProposalnow records theproposeraddress for forensic accountability.- Constants exposed as
BPS_DENOMINATOR,MIN_LARGE_THRESHOLD_BPS,MIN_STANDARD_DELAY,MIN_LARGE_DELAYreplace the previous raw10000/5000/1000literals. - Storage layout: 15 slots +
__gap[35]= 50 reserved. A storage-layout regression test is recommended;scripts/storage-layout-check.tsis 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
_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
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
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
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
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
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
The implementation constructor was non-payable.
Resolved
#2 optimization Issue
Two nested conditions use && instead of sequential if statements
_calculateDelay and _validateParams used compound && conditions.
Resolved
#3 optimization Issue
Magic numbers for basis-point arithmetic
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
The storage gap comment under-counted the pendingParamsProposal struct slots.
Resolved
#2 informational Issue
executeWithdrawParams is not pause-gated
executeWithdraw carried whenNotPaused but executeWithdrawParams did not.
Resolved
#3 informational Issue
Withdrawal proposals do not record the proposer
WithdrawProposal did not include the proposer address.
Resolved
#4 informational Issue
Token balance used in _calculateDelay is readable by the token itself
_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)
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
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.