WachAI

WachAI Smart Contract Audit Report

Share
Share
EthereumEthereum
Onchain Agents / AIDeFi StakingAirDrop & Token Lock
EthereumEthereum
Onchain Agents / AIDeFi Staking+1

QuillAudits audited the WachAI smart contracts on Ethereum between Sep 2, 2025 and Sep 15, 2025. The audit found 8 issues: 2 medium, 2 low, 4 informational, of which 3 resolved and 5 acknowledged.

Project Description

Staking: The staking contract allows users to lock tokens, earn rewards over defined periods, and withdraw with a cooldown. Issues mainly relate to reward accounting during cooldown, locked rewards if added before any stake, and missing robustness in recovery logic.

Airdrop: The airdrop contract distributes tokens via a Merkle tree with per-user percentage allocations. Issues include missing roundId in leaf construction, lack of total percentage validation, and an unused emergency event that may cause confusion.

Timeline

S1
Sep 2, 2025
IA
Sep 9, 2025
S2
Sep 15, 2025

Scope of Audit

The scope of this Audit was to analyze the Wach AI Smart Contracts for quality, security, and correctness.

Methodology: the QuillAudits smart contract audit process.

speedometer
0
50%
60%
70%
90%
100%
98.8%
AUDIT SCORE
icon

Critical

High

Medium

Low

Informational

open00000
acknowledged00122
partially resolved00000
resolved00102

Medium Severity Issues

Restake During Cooldown Leads to Stuck Withdrawal

Resolved
arrow-right
Description

The issue arises when a withdrawal has already been initiated for a given stake. At this point, the stake is marked as “in cooldown” and the corresponding principal amount is transferred into the pendingWithdrawals mapping while the stake entry itself is cleared (i.e., stake.amount = 0). This is intended to freeze the stake until the cooldown period expires. However, the restakeRewards function does not verify whether a withdrawal is already pending for the same stakeId. As a result, users are able to call restakeRewards(stakeId) during the cooldown period.

This creates an inconsistent state: the contract allows rewards to be added back to the stake struct, but that stake is no longer valid because the associated funds are already in pendingWithdrawals. At the end of the cooldown, when finalizeWithdrawal is executed, the logic only transfers back the principal stored in pendingWithdrawals and completely ignores the newly restaked rewards. This means the rewards remain in the contract without any accessible path for the user to withdraw them.

Contract

Staking.sol

Recommendation

Redesign the withdrawal flow so that finalizeWithdrawal accounts for both principal and any restaked rewards, ensuring no tokens remain stuck.

Merkle Leaf Construction Allows Cross-Round Replay Attacks

Acknowledged
arrow-right
Description

The Merkle leaf construction in claimAirdrop includes _index, msg.sender, round.startTime, round.endTime, and _percentageShare, but not the _roundId itself

If two rounds happen to share the same startTime and endTime (for example, standardized monthly rounds), a valid Merkle proof from one round could potentially be replayed in another round if the same user appears in both with the same index and percentage. This opens the possibility of unauthorized double-claims across rounds.

Contract

WACHAirdropDistributor.sol

Recommendation

Include _roundId in the Merkle leaf construction to enforce round-level uniqueness

Low Severity Issues

Informational Issues

Appendix

Disclaimer

WachAI

WachAI

Medium Severity Issues
Low Severity Issues
Informational Issues
Appendix
Disclaimer
View Report PDF

Get an Audit done today for your Smart Contract

Join 1500+ leaders who secured themselves from losing Billion Dollars

cta-banner
cta-banner-bgcta-banner-bg-mobile

Related audits

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits, QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance: secured end to end.

QuillAudits Logo


ISO 27001Circle Alliance Program
Uniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

All Rights Reserved. © 2026. QuillAudits - LLC