Loading...

Loading
WalletGuard Audit: EVMBench: 2024-04-noya | Score: 3.1/10
low(11)
Code Quality Observations(1)
Gas Optimizations(3)

Decentralization

4 centralization points identified

*
Missing two-step ownership transfer in Ownable-based contracts

Single-step ownership transfer in NoyaFeeReceiver can result in permanent loss of administrative control if the new owner address is incorrect; this is a property the buyer should know.

constructor()
*
UniswapValueOracle TWAP Window Default of 1800 Seconds May Be Too Short

The period is maintainer-configurable with no lower bound, making it a privileged parameter that could be set to near-zero, effectively converting the TWAP to a spot price read.

setPeriod()
*
setDepositLimits allows setting zero limits which would brick all deposits

Setting deposit limits to zero requires a trusted maintainer action; this is an admin capability the buyer should be aware of, not an externally exploitable vulnerability.

setDepositLimits()
*
AccountingManager overrides standard ERC4626 functions with unconditional reverts

The ERC4626 non-compliance is intentional by design and does not create an exploit path, but it is a property integrators must know as it breaks composability with ERC4626-assuming protocols.

mint()

Attack Chain Analysis

Flash Loan Oracle Manipulation to Vault Draincritical

An attacker uses a flash loan (via BalancerFlashLoan, which has no access control on makeFlashLoan) to perform a large swap in a Uniswap V3 pool that the UNIv3Connector uses for TVL via slot0. The manipulated slot0 price inflates the reported TVL. In the same transaction window, the inflated TVL causes AccountingManager to issue more shares per unit of baseToken deposited. The attacker then deposits baseToken at the inflated share price, reverses the price manipulation, and withdraws shares at the true higher per-share value, extracting value from existing depositors. The deposit ordering bug (safeTransferFrom before limit checks) further reduces friction for large deposits.

Uniswap V3 slot0 Used for TVL in UNIv3Connector (_getPositionTVL)BalancerFlashLoan.receiveFlashLoan allows arbitrary connector calls with user-controlled calldataDeposit Occurs Before Limit Checks Allow Attacker to Lock Funds
MorphoBlue TVL Inflation to Share Price Arbitragecritical

The MorphoBlue connector adds borrow amounts as assets rather than liabilities, permanently inflating TVL for any vault with active MorphoBlue borrows. Combined with the Chainlink stale price issue (missing answeredInRound check), an attacker can time a deposit during a stale price period when the Chainlink oracle has not yet updated a round, causing the vault to use the inflated MorphoBlue TVL alongside a stale favorable price to compute share issuance. The attacker receives excess shares relative to contributed value, then redeems after prices normalize.

MorphoBlue _getPositionTVL Double-Counts Borrow Amount as CollateralChainlink latestRoundData() Missing answeredInRound >= roundId Check
Compromised Keeper Flash Loan Arbitrary Executioncritical

makeFlashLoan has no access control, allowing any caller to initiate a flash loan and set themselves as the caller state variable. The security of receiveFlashLoan rests entirely on the caller matching keeperContract. If the keeperContract address is updated through governance (which is accessible via the broken onlyVaultMaintainer modifier allowing emergency role bypass), a malicious keeper can call makeFlashLoan, and receiveFlashLoan will execute arbitrary calls on any destinationConnector addresses with borrowed funds and user-supplied calldata, draining connector assets.

BalancerFlashLoan.receiveFlashLoan allows arbitrary connector calls with user-controlled calldataBalancerFlashLoan.receiveFlashLoan only validates caller is vault but doesn't verify caller is the legitimate keeperContractonlyVaultMaintainer modifier uses AND logic instead of OR, making it always revert
Performance Fee Griefing via Oracle-Triggered TVL Resethigh

checkIfTVLHasDroped is publicly callable and resets performance fee state if current TVL is below stored profit. An attacker who can temporarily reduce TVL (e.g., via slot0 price manipulation on a Uniswap V3 connector position, or by exploiting the MorphoBlue borrow double-count being corrected by a market move) can call checkIfTVLHasDroped immediately before the 12-48 hour collection window closes, zeroing out preformanceFeeSharesWaitingForDistribution. This can be repeated indefinitely to permanently block fee collection.

checkIfTVLHasDroped is public and can be called by anyone to reset performance fee sharesUniswap V3 slot0 Used for TVL in UNIv3Connector (_getPositionTVL)collectPerformanceFees has a 12-48 hour collection window that can be missed, permanently losing performance fees

Agent Coverage

AgentStatusFindingsSeverityConfidenceDurationCoverage
reentrancysuccess6
1H2M1L
69%1.3mClassic reentrancy in deposit/withdraw/executeDeposit/executeWithdraw functions, Cross-function reentrancy between deposit queue and withdraw queue shared state, ERC-4626 deposit/withdraw ordering (shares minted before/after token transfer), Flash loan callback in BalancerFlashLoan.receiveFlashLoan, ReentrancyGuard usage and placement across all contracts, CEI pattern compliance in AccountingManager, sendTokensToTrustedAddress external calls, Registry modifier logic correctness, Fee collection functions (collectManagementFees, collectPerformanceFees, recordProfitForFee), retrieveTokensForWithdraw external calls to connectors, Read-only reentrancy via TVL()/totalAssets() view functions, Connector addLiquidity callback chain, Token transfer ordering in executeWithdraw loop
access controlsuccess7
1H2M1L
80%1.3mAccess control modifiers in PositionRegistry (onlyVaultMaintainer, onlyVaultGoverner, onlyVaultMaintainerWithoutTimeLock), AccountingManager deposit/withdraw flow and limit checks ordering, Fee collection functions and authorization checks, BalancerFlashLoan receiveFlashLoan arbitrary call execution, sendTokensToTrustedAddress access control patterns, burnShares unrestricted access, ERC4626 standard override functions, Signature-based operations in Keepers multisig (nonce, deadline, replay protection), Initializer protection (no proxy pattern detected), Registry role administration and self-granting risks, Ownership patterns in NoyaFeeReceiver and Keepers, Flash loan guard patterns in BalancerFlashLoan, OmnichainLogic bridge transaction approval flow, Connector delegatecall patterns (none found), Withdraw queue state machine correctness, Event emission correctness in fulfillCurrentWithdrawGroup, TVL calculation ordering in deposit, Cross-function reentrancy with nonReentrant guards
economicsuccess10
3H1M1L
87%1.6mFlash loan attack vectors in deposit/withdraw flow, Oracle manipulation - Chainlink staleness checks in ChainlinkOracleConnector, Oracle manipulation - Uniswap V3 slot0 usage in UNIv3Connector TVL, Oracle manipulation - spot reserve usage in Aerodrome/Camelot LP TVL, Oracle manipulation - UniswapValueOracle TWAP window, MEV/sandwich exposure in share calculation timing, Governance access control modifiers in PositionRegistry, Accounting logic in deposit() - ordering of checks vs transfers, Withdraw group lifecycle - calculateWithdrawShares accumulation, MorphoBlue TVL calculation correctness, Fee calculation precision in BalancerConnector, BalancerFlashLoan - caller authentication, ReentrancyGuard usage across accounting flows, Chainlink answeredInRound completeness check, WETH_Oracle mock - hardcoded values not relevant to production security, PrismaConnector, FraxConnector, SiloConnector TVL calculations, DolomiteConnector debt/collateral accounting, PendleConnector SY/PT/YT pricing via static router
logic validationsuccess10
3L
76%1.9mInput validation and parameter bounds in AccountingManager deposit/withdraw/fee functions, Arithmetic safety in fee calculations, share price calculations, and TVL computations, State machine integrity for deposit/withdraw queue state transitions, Access control modifiers in Registry (onlyVaultMaintainer logic bug), Reentrancy protection via ReentrancyGuard usage, Flash loan security in BalancerFlashLoan, MorphoBlue TVL calculation correctness, Downcast safety in UniswapValueOracle, Unbounded loop analysis in TVLHelper, Deposit limit ordering and validation, fulfillCurrentWithdrawGroup event emission ordering, calculateWithdrawShares accumulation logic, retrieveTokensForWithdraw validation ordering, ERC4626 overrides to prevent standard deposit/withdraw/mint/redeem, abi.encodePacked usage for hash collision risks, Keepers multisig signature validation
code qualitysuccess18
86%2.5mERC4626 compliance - deposit/withdraw/mint/redeem override behavior, Deposit queue ordering and fund transfer logic, Withdraw queue state machine correctness, Fee calculation logic (management, performance, withdrawal), TVL calculation across all connectors for underflow/overflow, Access control modifiers in Registry (onlyVaultMaintainer AND vs OR bug), Flash loan callback security in BalancerFlashLoan, Oracle price manipulation resistance, uint128 downcast safety in UniswapValueOracle, Reentrancy protection (nonReentrant guards present), Cross-connector TVL aggregation correctness, MorphoBlue TVL calculation (borrow+supply+collateral instead of supply-borrow+collateral), Deposit limit checks ordering relative to token transfer, Withdraw group state machine (calculateWithdrawShares, startCurrentWithdrawGroup, fulfillCurrentWithdrawGroup, executeWithdraw), Event emission correctness (WithdrawGroupFulfilled totalCBAmount = 0 bug), burnShares access control, retrieveTokensForWithdraw cumulative amount validation, Bridge transaction approval mechanism in OmnichainLogic, Keepers multisig signature validation, ChainlinkOracleConnector staleness check
compiler bugssuccess4
86%49.4sAccountingManager deposit/withdraw/execute flow and queue state management, Fee collection logic (management, performance, withdrawal fees), Access control modifiers in Registry and NoyaGovernanceBase, Registry.onlyVaultMaintainer modifier logic, fulfillCurrentWithdrawGroup event emission ordering, retrieveTokensForWithdraw validation logic, BalancerFlashLoan access control and callback validation, BaseConnector sendTokensToTrustedAddress trust model, Deposit limit checks ordering relative to token transfer, Compiler version (0.8.20 fixed - no legacy compiler bugs applicable), Reentrancy guards on state-modifying functions, ERC4626 standard compliance overrides
assembly safetysuccess10
2H3M
84%1.9mFull codepoint-by-codepoint scan for non-ASCII characters, homoglyphs, zero-width characters, and RTLO characters - none found, All assembly{} blocks scanned - none found in this codebase (FullMath, TickMath, and library code contain assembly but none of the anti-patterns), AccountingManager deposit/withdraw queue logic and arithmetic, PositionRegistry access control modifiers (onlyVaultMaintainer bug identified), Fee calculation and collection logic (performance, management, withdrawal fees), Flash loan BalancerFlashLoan security model, fulfillCurrentWithdrawGroup state mutation ordering and event emission, retrieveTokensForWithdraw balance validation logic, executeDeposit control flow and error conditions, TVL calculation across connectors (Morpho, Compound, Aave), burnShares access control and pause bypass, Keepers multisig signature verification, Registry vault and position management, ERC4626 override functions, SwapAndBridgeHandler route verification
l2 specificsuccess11
3M3L
82%2.1mAccountingManager deposit/withdraw queue logic and ordering, Fee calculation and distribution (management, performance, withdrawal), PositionRegistry access control modifiers, BalancerFlashLoan access control and flash loan flow, Keepers multi-sig signature verification, MorphoBlue TVL calculation, Chainlink oracle freshness checks, executeDeposit connector validation logic, calculateWithdrawShares accumulation logic, fulfillCurrentWithdrawGroup fulfillment conditions, Cross-chain L2 patterns (no L2-specific imports found in core contracts), ERC4626 override functions (correctly revert with NOT_ALLOWED), ReentrancyGuard usage across all state-changing functions, Token transfer safety (SafeERC20 used throughout), Registry vault maintainer/governance modifier logic, Performance fee time window constraints, Deposit limit checks ordering relative to token transfers
upgradesuccess9
3M2L
77%2.0mAccountingManager deposit/withdraw queue ordering and limit checks, Registry modifier logic (onlyVaultMaintainer AND vs OR condition), Fee collection mechanics (management fee, performance fee, withdraw fee), Flash loan implementation security in BalancerFlashLoan, Access control on sendTokensToTrustedAddress, WithdrawGroup state machine transitions, Event emission ordering relative to state changes, retrieveTokensForWithdraw cumulative over-retrieval, checkIfTVLHasDroped public access griefing vector, ERC4626 standard override correctness (mint/withdraw/redeem/deposit all revert), NoyaFeeReceiver withdrawal flow, PositionRegistry holding position management, BaseConnector token registry and liquidity management, Cross-connector token transfer security in sendTokensToTrustedAddress, Proxy pattern - no proxy pattern detected, not applicable, Storage collision - no proxy pattern, not applicable, Initialization risks - no upgradeable pattern, not applicable

Scope and Methodology

Target0xa7bf65ebbc8d5450deed9e5e18529f6822321918
ChainEthereum
Complexitymoderate
Analysis ModelClaude Sonnet 4.6
Specialist Agents10
Agent Types
reentrancyaccess controleconomiclogic validationcode qualitycompiler bugsassembly safetyl2 specificupgrade
Scope TemplateGeneral Smart Contract (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/c28b2392-8ab8-4d7e-8f20-1c9bfe0b4e9c)](https://walletguard.ai/audit/c28b2392-8ab8-4d7e-8f20-1c9bfe0b4e9c)
HTML
<a href="https://walletguard.ai/audit/c28b2392-8ab8-4d7e-8f20-1c9bfe0b4e9c">
  <img src="https://walletguard.ai/api/badge/c28b2392-8ab8-4d7e-8f20-1c9bfe0b4e9c" alt="WalletGuard Audit Badge" />
</a>
WalletGuardSecured by WalletGuard
How We AuditView all reports for this contractUID: 0x55135fa8...0d022dThis report was produced by generic vulnerability pattern matching.
Modelsonnet
Duration6.0m
CostN/A
Tokens- in / - out
Source verified via Etherscan