Loading...

Loading
WalletGuard Audit: EVMBench: 2024-05-munchables | Score: 1.0/10

high(12)

medium(15)

low(10)
Code Quality Observations(3)
Gas Optimizations(2)

Decentralization

2 centralization points identified

*
MockAccountManager.giveSchnibbles has no access control

The risk is entirely dependent on whether the mock contract is deployed to production. This is a deployment governance concern rather than a code-level vulnerability in the production contracts.

giveSchnibbles()
*
MockClaimManager.givePoints has no access control

Same as MockAccountManager: the exploit path requires the mock contract to be deployed to production, making this a deployment governance concern.

givePoints()

Attack Chain Analysis

Implementation Takeover via Missing disableInitializers + UUPS Upgradecritical

An attacker calls initialize() directly on the AccountManager or ClaimManager implementation contract (possible because no constructor calls _disableInitializers()). This grants the attacker the Admin role on the implementation. The attacker then calls upgradeToAndCall() on the implementation, pointing it to a malicious contract. Because all proxies delegatecall to the implementation and _authorizeUpgrade only checks the Admin role, the attacker gains full control over the proxy storage and all user funds managed by those contracts.

UUPS Implementation Contracts Missing disableInitializers() in ConstructorMissing disableInitializers() in UUPS implementation contractsBaseConfigStorageUpgradeable Inheritance Order Causes Storage Collision Between Proxy and Implementation
Free Migration via Zero discountFactor + Payment Bypasshigh

MigrationManager.migratePurchasedNFTs validates payment AFTER calling _migrateNFTs. If discountFactor is 0 (possible if the admin has not yet configured it or it is reset), the required payment computes to 0 via integer multiplication. An attacker calls migratePurchasedNFTs with msg.value=0, _migrateNFTs burns old NFTs and mints new ones, and the payment check passes because 0 == 0. The attacker obtains new NFTs for free. This is compounded by the 10e12 vs 1e12 calculation error which already makes migrations 10x cheaper than intended.

MigrationManager.migratePurchasedNFTs: Payment Validation After NFT MigrationMigration discount factor uses 10e12 instead of 1e12, causing 10x calculation error
Unbounded Schnibble Inflation via Double 1e18 Multiplier + Pet Interactionhigh

SnuggeryManager.pet multiplies schnibble amounts by 1e18 after already using a PET_TOTAL_SCHNIBBLES config value that is expressed at 1e18 scale. This produces schnibble grants 1e18 times larger than intended. These inflated schnibbles can be fed to NFTs via SnuggeryManager.feed, causing NFT chonk values to skyrocket. The corrupted globalTotalChonk tracked in _recalculateChonks then causes ClaimManager to distribute points using a denominator that no longer reflects real aggregate state, allowing early users to claim a disproportionate share of all available points.

SnuggeryManager.pet gives schnibbles multiplied by 1e18 twicetotalGlobalChonk incorrectly incremented instead of replaced in _recalculateChonksClaimManager._claimPoints Sets _lastClaimPeriod Unconditionally Outside Conditional Block Causing Double-Emit
Stale Harvest Oracle via CEI Violation in unlockhigh

LockManager.unlock calls accountManager.forceHarvest before decrementing lockedToken.quantity. forceHarvest reads the full pre-decrement locked balance via lockManager.getLockedWeightedValue to compute schnibbles. A user repeatedly calling unlock in small increments each time harvests schnibbles as if they still hold their full balance, systematically over-accumulating schnibbles beyond their rightful share. These excess schnibbles can then be converted to chonks and fed into the claims system.

CEI violation in LockManager.unlock: ETH/token transfer before state update for quantitySnuggeryManager.pet gives schnibbles multiplied by 1e18 twice

Agent Coverage

AgentStatusFindingsSeverityConfidenceDurationCoverage
reentrancysuccess7
2H1L
82%1.3mClassic reentrancy (external call before state update) in LockManager._lock and unlock, Cross-function reentrancy across LockManager functions, ERC-777 callback reentrancy via token transfer hooks, Read-only reentrancy in view functions called during external calls, CEI pattern compliance in all state-mutating functions, ReentrancyGuard usage and correct placement, Access control on privileged functions, Signature verification logic in SignatureVerifier library, ERC-4626/ERC-721 callback patterns, Flash loan callback patterns, Logic errors in migration, claim, and reward distribution flows, Cross-contract state sharing between LockManager, AccountManager, SnuggeryManager, UUPS upgrade authorization
access controlsuccess12
3H3M1L
82%1.6mAccess control on all public/external functions, Initializer protection in UUPS upgradeable contracts, Signature verification in SignatureVerifier library, ecrecover return value checking, Role-based authentication in BaseConfigStorage modifiers, Ownership and admin patterns in ConfigStorage, RewardsManager yield claim access control, MigrationManager fund locking and NFT migration logic, LockManager lock/unlock logic and duration management, SnuggeryManager array indexing in pagination, ClaimManager points distribution, Mock contracts deployed in production risk, Cross-function reentrancy (ReentrancyGuard usage checked), Delegatecall patterns (none found in production contracts), UUPS _authorizeUpgrade protection, Blast governor reassignment logic
economicsuccess14
4H3M3L
83%2.3mFlash loan attack vectors - no direct token balance pricing found, Oracle manipulation - no price feed reads found (custom multi-sig oracle for USD prices), LockManager USD price proposal mechanism for manipulation, SignatureVerifier library correctness, RewardsManager yield claiming logic and access control, MigrationManager discount factor calculations, SnuggeryManager chonk accounting and pet schnibble calculations, ClaimManager points distribution and period logic, AccountManager sub-account management and spray proposal logic, BonusManager migration bonus calculation edge cases, PrimordialManager level-up logic, UUPS upgrade authorization, Reentrancy guards on token-moving functions, Fee-on-transfer token handling in LockManager, Cross-contract trust and access control patterns, NFTOverlord reveal queue and RNG integration, Integer overflow/underflow risks (Solidity 0.8.25 with built-in checks)
logic validationsuccess13
1C2H3M3L
83%2.2mInput validation on all public/external functions, Arithmetic safety including unchecked blocks and type casts, Access control modifiers and role-based permissions, State machine integrity (lockdrop lifecycle, migration states, claim periods), Signature verification library correctness, ERC-4626-style rounding patterns (not applicable - no vault), abi.encodePacked collision risks in storage key derivation, Timestamp-based operations (harvest, lock durations, pet cooldowns), Unbounded loops and DoS vectors, Cross-contract call patterns and reentrancy (ReentrancyGuard used appropriately), UUPS upgrade authorization, Migration manager state transitions and fund handling, Schnibble spray proposal duplicate detection, NFT minting and reveal queue management, Yield/gas claiming logic in RewardsManager, Token transfer patterns in LockManager, Snuggery pagination logic, ClaimManager points distribution logic
code qualitysuccess15
82%1.9mERC-20 conformance (MunchToken), ERC-721 conformance (MunchNFT, OldMunchNFT), ERC-1967/UUPS proxy upgrade safety, Access control modifiers (onlyAdmin, onlyRole, onlyConfiguredContract), Integer overflow/underflow (Solidity 0.8.x protections), Reentrancy (ReentrancyGuard usage in LockManager, MigrationManager), Signature verification logic (SignatureVerifier library), CEI pattern violations (MunchNFT.transferFrom), Logic errors in yield/reward calculations (ClaimManager, BonusManager, RewardsManager), Migration flow correctness (MigrationManager), Schnibble spray proposal duplicate detection, Array bounds and pagination in getSnuggery, getSubAccounts, Discount factor arithmetic in MigrationManager, Access control on permissionless yield claim functions, WETH vs USDB token address in yield claiming, ConfigStorage role and address management
compiler bugssuccess6
1H1M
83%1.2mSignatureVerifier library logic correctness, RewardsManager yield claim token address correctness, Access control on all external functions (claimYieldForContracts, claimGasFeeForContracts), BaseConfigStorage modifier logic (onlyConfiguredContract, onlyConfiguredContract2, onlyOneOfRoles), MigrationManager fund flow: lockFundsForAllMigration vs _migrateNFTs discountFactor calculation, ClaimManager points logic and period accounting, LockManager reentrancy protection (ReentrancyGuard present), LockManager USD price proposal approval logic, SnuggeryManager chonk calculation and global chonk tracking, AccountManager spray proposal duplicate check (uses _tempSprayPlayerCheck mapping reset bug review), MunchNFT transferFrom munchadex update before transfer, UUPS upgrade authorization (onlyAdmin check present), Compiler bug patterns for solc 0.8.25 (no affected version range bugs apply)
assembly safetysuccess12
1C2M1L
82%2.5mFull codepoint scan for non-ASCII characters, RTLO, zero-width joiners, homoglyphs in all identifiers and strings, All inline assembly blocks - SignatureVerifier.recover assembly for signature splitting, Yul shift instruction argument ordering (no shl/shr/sar found in assembly blocks), assembly return() vs leave semantics (no return() in assembly found), sload/sstore with hardcoded slots (none found), delegatecall patterns in assembly (none found), Access control on all external/public functions across all contracts, Reentrancy: LockManager, MigrationManager, MunchNFT (ReentrancyGuard present), Logic errors in SignatureVerifier (always-reverting condition found), Logic errors in RewardsManager yield claiming (WETH/USDB address bug found), Logic errors in SnuggeryManager.getSnuggery pagination, Logic errors in ClaimManager._claimPoints period tracking, Logic errors in BonusManager._calculateMigrationBonus formula, Logic errors in AccountManager.spraySchnibblesPropose temp mapping cleanup, Logic errors in SnuggeryManager.feed negative bonus cast, MigrationManager access control for burnNFTs third-party invocation, UUPS upgrade authorization in BaseConfigStorageUpgradeable._authorizeUpgrade, ConfigStorage notify() function for DoS via unbounded loop, Integer overflow/underflow risks in Solidity 0.8.25 (checked arithmetic), ERC721 transferFrom override in MunchNFT and munchadex update ordering, Blast governor assignment logic in BaseBlastManager, RewardsManager.reassignBlastGovernor access control
l2 specificsuccess14
2M1L
80%2.1mSignatureVerifier library correctness, RewardsManager yield claim logic and access control, LockManager lock/unlock mechanics and USD price proposal system, ClaimManager period management and points accounting, SnuggeryManager pet/feed/import/export mechanics, AccountManager spray proposal and sub-account management, MigrationManager NFT burn and migration flows, BonusManager migration bonus calculation for division-by-zero, PrimordialManager feeding and hatching logic, BaseConfigStorage access control modifiers, MunchNFT transfer and minting mechanics, ConfigStorage notification pattern, Cross-function reentrancy patterns, Integer overflow/underflow in Solidity 0.8.25 (checked by default), UUPS upgrade authorization, Blast-specific predeploy integrations (IBlast, IBlastPoints, IERC20Rebasing), Cross-domain message patterns (none found - L2 Blast-specific only)
upgradesuccess15
1C1H1M
84%2.1mUUPS proxy pattern implementation and disableInitializers() in constructors, Storage layout and __gap arrays across upgradeable inheritance chain, Initialization functions and initializer modifier usage, Access control on admin and privileged functions, SignatureVerifier library correctness, RewardsManager yield claiming logic and access control, MigrationManager payment validation and NFT migration flow, BonusManager calculation edge cases (division by zero, overflow), LockManager locking and unlock time calculations, ClaimManager period management and points calculation, SnuggeryManager array indexing and pagination, AccountManager spray proposals and sub-account management, Cross-contract interaction patterns (delegatecall risks, reentrancy), ConfigStorage notification mechanism and re-entrancy via notify(), MunchNFT transferFrom ordering (munchadex update before transfer), Diamond/Beacon/Minimal proxy patterns - not present, selfdestruct usage - not found, Immutable variables in upgradeable contracts

Scope and Methodology

Target0x1b72e1bca3d0e8b8f329d2a5798ee851063d747f
ChainEthereum
Proxy Patternuups
Complexitycomplex
Standards DetectedERC20, ERC721, ERC721Enumerable, ERC721URIStorage, ERC721Pausable, ERC1967
Analysis ModelClaude Sonnet 4.6
Specialist Agents10
Agent Types
reentrancyaccess controleconomiclogic validationcode qualitycompiler bugsassembly safetyl2 specificupgrade
Scope TemplateNFT/Marketplace (auto-selected)
MethodologyAutomated multi-agent analysis. Each specialist agent independently reviews the contract source code for vulnerabilities in its domain. Findings are deduplicated, scored, and synthesized into this report.
Findings are gated by demonstrated exploit feasibility against the analyzed contract. Observations that describe accepted blockchain behavior, consensus-layer issues, or infeasible preconditions are excluded from scored findings. See scope policy.

Severity Classification

CriticalDirect loss of funds or complete protocol compromise. Exploitable with high likelihood. Requires immediate remediation.
HighSignificant risk to funds or protocol integrity. Conditionally exploitable or requires specific circumstances. Should be fixed before deployment.
MediumLimited or conditional impact. May require unlikely conditions to exploit. Should be addressed but not blocking.
LowMinor impact. Best practice deviations, minor inefficiencies. Fix when convenient.
InformationalNo direct security impact. Code quality observations, gas optimizations, style recommendations.

Limitations

This automated audit has inherent limitations. The following areas are not covered.

Disclaimer

This report is an automated point-in-time assessment and does not guarantee protection against all possible attacks. It does not cover off-chain components, economic modeling, or business logic correctness unless explicitly noted. Changes to the contract after the audit commit are not reviewed. This is not financial or legal advice. WalletGuard, powered by Gestalt Labs, provides this analysis as-is with no warranty of completeness.

Embed Badge
WalletGuard Audit Badge
Markdown
[![WalletGuard Audit](https://walletguard.ai/api/badge/b355950f-8e40-4893-b769-755c9ccf1feb)](https://walletguard.ai/audit/b355950f-8e40-4893-b769-755c9ccf1feb)
HTML
<a href="https://walletguard.ai/audit/b355950f-8e40-4893-b769-755c9ccf1feb">
  <img src="https://walletguard.ai/api/badge/b355950f-8e40-4893-b769-755c9ccf1feb" alt="WalletGuard Audit Badge" />
</a>
WalletGuardSecured by WalletGuard
How We AuditView all reports for this contractUID: 0x524d94c5...e4ac6dThis report was produced by generic vulnerability pattern matching.
Modelsonnet
Duration6.2m
CostN/A
Tokens- in / - out
Source verified via Etherscan