DeepYield / AUDIT
← BACK TO VAULTS
On-Chain · Audited · Public

Security & Audit Protocol

Two independent static analyzers, a full forge test-suite on a live BSC mainnet fork, a full manual deep-review on every contract, and a symbolic-verification pass with Halmos. All findings curated; raw reports linked below. Audit date 14 Jun 2026.

0
CONFIRMED HIGH
9 raised by scanners · all triaged false-positive
5
CONFIRMED MEDIUM
Business-logic, from deep AI review
332 / 333
FORGE TESTS
live BSC fork via Ankr
10 / 10
CONTRACTS REVIEWED
4 282 lines src/ · 2 497 nSLOC
Stage 01 · Static Analysis

Two independent scanners

Aderyn (Cyfrin) and Slither (Trail of Bits) ran to completion against the full contract set. Every High finding was manually triaged against the actual code path.

Aderynv0.6.8
14 Jun 2026
High
2 raised · 0 actionable
Medium
0 raised
Low
12 categories
Both Highs traced: caret-as-XOR in Uniswap's FullMath.mulDiv (the most-audited Solidity on mainnet), and state-change-after-external on 64 spots — all under nonReentrant + trusted-role modifiers. Manually verified per callsite.
FULL ADERYN REPORT · 70 KB →
Slitherv0.11.4
14 Jun 2026
High
7 raised · 0 actionable
Medium
91 raised
Low + Info
16 + 11 info
7 Highs: 1× incorrect-exp (same Uniswap caret) + 6× arbitrary-send-erc20 — every callsite is the canonical ERC-4626 strategy / venue-controller pattern guarded by onlyVault / onlyController + nonReentrant. 91 Mediums: ~33 divide-before-multiply in Uniswap math libs, 27 unused-return on _grantRole, 19 incorrect-equality stylistic. All triaged.
FULL SLITHER OUTPUT · 43 KB →
Stage 02 · Functional Tests

Forge suite on live BSC fork

25 test suites · 333 concrete tests · 13 fork tests against live BSC contracts (Beefy CLM strategy 0xD9ee…eCE7, Pancake V3 NFPM, Masterchef V3) via Ankr archive.

Suite Result

332 pass 0 fail 1 skip

Ran 25 test suites in 48.37s (184.54s CPU time).
The single skip is test_StakedPositionReadable — requires a historical fork block where the venue holds a staked NFT; logic is independently proven via mock-test VaultBVenueReadLogic.t.sol.

FULL TEST OUTPUT · 25 KB →

Coverage

64.72% lines 78.42% functions 26.61% branches

Per-file branch coverage on partner contracts is the known gap: PartnerAttributedSplitter 6.7%, WrapperFactory 0%. BeefyCLMAdapter + DedicatedVaultMain excluded by --ir-minimum tooling limit (require via_ir for stack-depth). Pre-mainnet TODO: invariant tests (invariant_*) — none in current suite.

COVERAGE REPORT · 10 KB →

Stage 03 · Deep Review

Manual + symbolic verification

Static analyzers and concrete tests can't reason about adversarial multi-step attack sequences. We read every contract end-to-end and ran Halmos symbolic verification on the ERC-4626 vault to formally check inflation-attack safety.

Claude 4.7 Manual Deep Review

All 10 src/ contracts read end-to-end. Function-by-function trace of state transitions, MEV / sandwich / flash-loan exposure, trust-boundary checks, operational bricking risk, slippage / deadline consistency.

0 High confirmed 5 Medium 2 Retracted

M-4 (NAV TWAP) and an early P1 (notify reentrancy) both retracted on Stage 2 re-read after following cross-contract paths — kept in the protocol for honesty.

Halmos Symbolic Verification

96 symbolic paths explored over 1 h 03 min. Concrete counterexample found for the ERC-4626 first-depositor inflation attack at the current _decimalsOffset = 3.

Counterexample: attacker=101, donate=1e6, victim=6 wei → victim receives 0 shares (integer-division floor). Mitigation queued: raise offset to 8+ and add MIN_DEPOSIT. Bait cost > reward at any sane deposit size, but proven.

HALMOS TEST · 3 KB →

Confirmed action items (after full triage)

ID Severity Finding Source
AI-M-1MediumTighten closePosition slippage: require BOTH mins nonzero (matches openPosition)Claude deep review
AI-M-2MediumGate setBeefyClm / setRouter / setUnderlyingVault on active balance — currently swappable mid-positionClaude deep review
AI-M-5MediumAdd guardian-only force-skip-harvest fallback for Masterchef-broken caseClaude deep review
AI-M-6MediumApply Task 1.32 fee-crystallization to DeepYieldStrategyAdapter.panic() (mirror BeefyCLMAdapter pattern)Claude deep review
AI-M-7MediumRaise _decimalsOffset from 3 → 8 and/or add MIN_DEPOSIT — Halmos counterexample for inflation attackHalmos symbolic
AI-L-1LowDocument closeIfStale zero-min MEV trade-off in user docsClaude deep review
AI-L-2LowRemove or clarify setTreasury single-arg semantics (silent reset of fee-sink flag)Claude deep review
AI-L-4LowRemove dead treasury state variable in DeepYieldVault (never read, ~22k gas waste)Claude deep review
AI-L-5LowPass minShares to beefyClm.deposit() for V2 (Beefy calm-gate is current proxy)Downgraded M3
AI-T1-3CoveragePartner contract branch coverage: PartnerAttributedSplitter 6.7%, WrapperFactory 0%, VaultFeesLib 20%forge coverage
AI-T5GapAdd forge invariant_* tests for ERC-4626 invariants — currently zeroPre-mainnet TODO
~AI-M-4RETRACTEDNAV TWAP-resistance concern — Router does use TWAP with circuit-breaker. False alarm, kept for honesty.Stage 2 re-read

Methodology & Scope

FULL AUDIT PROTOCOL · 68 KB →
Full Audit Protocol
Markdown · 68 KB · 1 320 lines
OPEN →
Aderyn Full Report
Markdown · 70 KB
OPEN →
Slither Output
Text · 43 KB
OPEN →
Forge Test Results
Text · 25 KB · 332 pass
OPEN →
Forge Coverage
Text · 10 KB
OPEN →
Proposed Fixes
Markdown · 10 KB
OPEN →
Halmos Symbolic Test
Solidity · 3 KB
OPEN →

⚠ Caveats & Honest Gaps

© 2026 DeepYield · re-run on every contract patch