FIREPAN Security Review
Security Review · Yearn · 2026

Yearn smart contract security review

stYFI, yTranche and yv3 Tranche Strategy

Three reviews delivered to Yearn between August and November 2026, consolidated from the reports Yearn received. Ten rated findings: one High, five Medium, four Low. No Firepan test sent a transaction to Ethereum mainnet.

ClientYearn
ReviewsstYFI (2026-08-26) · yTranche (2026-11-11) · yv3 Tranche Strategy (2026-11-20)
TypeResearcher-led review supported by AI-assisted reviewer passes
RelatedCase study

Summary

Each review was pinned to a commit. Researchers compared source against deployed bytecode where a deployment existed and used isolated mainnet forks where applicable.

The August review covered vesting controls and staking-weight accounting. The November reviews covered the valuation and availability of tranche operations, including how gains and losses are allocated. The evidence ranges from source analysis to controlled executable tests and fork replays.

1
High
5
Medium
4
Low
7 / 10
With executable evidence or a reported fork result

Scope

Target and datesPinIn scopeDeployment at review
stYFI
Aug 25–26
1 high, 1 medium, 1 low
e377c6d 37 non-mock Vyper contracts, about 11.7k lines. Vyper 0.4.2. Live. The review recorded bytecode comparisons for 25 mapped deployments using an immutable-tail comparison. Governance contracts had no deployment at the pin.
yTranche
Nov 9–11
3 medium, 3 low
58182cf Core contracts plus the reachable parts of three pinned submodules. Deployment-only changes at 0197c85 were also reviewed. Live. Runtime matched the deployment build with immutables masked.
yv3 Tranche Strategy
Nov 17–20
1 medium, 3 informational
da8588a Strategy, factory, deployment tooling, and reachable dependencies. The reviewed strategy was not deployed as of Nov 18, 2026.

Findings at a Glance

FindingSeverityEvidenceFix verification
FP-STYFI-01
Vesting restriction enforcement
HighSource confirmation and a reported three-arm fork resultProposed change exercised in the reported result. Fork transcript absent from retained evidence.
FP-STYFI-02
Vesting recovery controls
MediumSource confirmation and a reported fork test with a control conditionRecommendation recorded. Fix verification unconfirmed.
FP-STYFI-03
Staking-weight accounting
LowSource arithmeticRegression recommended. No transaction-level verification recorded.
FP-YTRANCHE-01
Tranche exit valuation
MediumControlled executable test and historical mainnet observationProposed fix verified.
FP-YTRANCHE-02
Consistency of loss allocation
MediumExecutable test with control and mitigation casesMitigation tested. No verified code fix recorded.
FP-YTRANCHE-03
Valuation after accounting changes
MediumControlled executable testRegression recommended. No verified code fix recorded.
FP-YTRANCHE-04
Reserve transfer completion
LowControlled executable test. Unreachable in the reviewed live configuration.Proposed fix verified.
FP-YTRANCHE-05
Availability of tranche operations
LowSource analysisNo executable or fix verification recorded.
FP-YTRANCHE-06
Operational restrictions after a loss
LowSource analysisNo executable or fix verification recorded.
FP-YV3TRANCHE-01
Valuation during loss accounting
MediumControlled executable tests and fork replays at three blocksTwo proposed fixes verified.

Fix verification covers proposed changes and tested mitigations against the reviewed code. The reports do not confirm subsequent deployment or remediation status.

stYFI

Delivered August 26, 2026 at e377c6d. The review compared the pinned source with deployed components and checked earlier public work on stYFI. The two vesting findings cover overlapping exposure, which the review counted once.

HighFP-STYFI-01

Vesting restriction enforcement

The finding concerns whether restrictions on vesting grants remain effective. Source review confirmed the issue and the original report records a fork test with baseline, proposed change, and revert conditions. The retained bundle does not include the run transcript.

Recommendation. Preserve vesting restrictions across supported operations and add regressions for grant enforcement.

MediumFP-STYFI-02

Vesting recovery controls

The review identified incomplete enforcement of vesting recovery controls. The original report records source confirmation and a fork test with a control condition. The retained evidence has no captured transcript and does not establish fix verification.

Recommendation. Verify recovery controls across supported grant operations.

LowFP-STYFI-03

Staking-weight accounting

A member's own governance and reward weight could temporarily be lower than intended. The source analysis found no movement of funds or effect on other members.

Prior art. The May 2026 yAudit YBC report identified an earlier issue in staking-weight accounting, and Yearn replaced that design. This finding is a residual edge case in that remediation.

Recommendation. Define the intended accounting for staking-weight changes and assert the expected weights in a regression test. The review did not capture a transaction-level regression.

Informational. The review also recorded observations about reward synchronization, component configuration, and rounding in an integration.

yTranche

Delivered November 11, 2026 at 58182cf. The review considered the deployment build alongside the core source and its pinned dependencies. Of the six rated findings, two had proposed code fixes that Firepan tested.

MediumFP-YTRANCHE-01

Tranche exit valuation

Strengthening exit valuation would reduce the risk of gains or losses being allocated unevenly between departing and remaining holders. The review reproduced the valuation discrepancy with a control case and records a historical mainnet instance on the profit side.

Recommendation and verification. Keep the valuation used for exits aligned with the tranche's economic state. The proposed fix passed the review's checks and the repository tests.

MediumFP-YTRANCHE-02

Consistency of loss allocation

The review identified a separate inconsistency in how operations account for a loss. It reproduced the discrepancy in a controlled test and tested an operational mitigation.

Recommendation. Review the operational accounting safeguards together. The test covered a mitigation and the review does not record a verified code fix for this item.

MediumFP-YTRANCHE-03

Valuation after accounting changes

The review found that the value used by tranche operations could diverge from recorded accounting after a loss, shifting its allocation between holders. A controlled executable test supported the finding.

Recommendation. Add regression coverage for consistency between recorded losses and tranche valuation. No verified code fix is recorded for this item.

LowFP-YTRANCHE-04 · 05 · 06

Three lower-severity items

04 · Reserve transfer completion. The review found that a reserve operation could leave assets stranded if it could not finish. A controlled executable test reproduced the result and verified a proposed fix. The behavior was unreachable in the live configuration examined.

05 · Availability of tranche operations. The review identified a risk of temporary unavailability in tranche operations. The finding rests on source analysis. No executable or fix verification is recorded.

06 · Operational restrictions after a loss. The review identified a possible inconsistency in how post-loss operating restrictions were enforced. The finding rests on source analysis. No executable or fix verification is recorded.

Informational. The report also records deployment-role and dependency provenance, plus gaps in the invariant suite. Three economic mutations passed the existing invariants at 256 runs, leading to suggested assertions. The same checks found no protocol bug on the unmodified code.

yv3 Tranche Strategy

Delivered November 20, 2026 at da8588a. The reviewed strategy was not deployed at the scope check. Researchers verified the finding against the repository's test environment and used the existing vault in isolated fork replays.

MediumFP-YV3TRANCHE-01

Valuation during loss accounting

The review found a valuation discrepancy that could cause incoming, departing, and remaining holders to bear different shares of a loss. Controlled tests and replays at three separate mainnet blocks reproduced the result in isolated environments.

Recommendation and verification. Firepan tested two proposed fixes. One corrects the allocation while preserving operations. The other restricts operations as a protective measure. Both passed the relevant checks and the repository's existing tests.

Informational. The report also recorded observations on cooldown behavior, known edge cases already documented in the repository's tests, and factory ownership.

Reviewed and Ruled Out

yTranche. The review checked cooldown behavior, configuration bounds, withdrawal-limit arithmetic, and other accounting hypotheses. A 3,000-run differential fuzz comparison against Yearn's VaultV3 withdrawal-limit behavior found no mismatch. The repository invariants passed on unmodified code.

yv3 Tranche Strategy. Researchers investigated allocation order, premiums, dust, cover access, cooldown coverage, share inflation, fees, and transaction-ordering hypotheses. Two static-analysis leads were false positives. The review also identified behavior already characterized by the repository's own tests.

stYFI. Prior-art comparison covered four public review reports. The August 2026 yAudit governance report documents earlier governance findings that were already known at the time of this review.

Method and Limitations

Method. Source review at a pinned commit. Deployed-bytecode comparison where a deployment existed. Read-only state and event queries on historical chain data. Executable tests on isolated mainnet forks used controls. Proposed code changes were checked against baseline, patched, and reverted states under the same test. The yTranche matrix contains 44 checks, all of which returned the expected result.

Scope. Each review is bounded to its pin and the deployment state examined on the dates given. Exposure for live systems can change. The reviews do not constitute formal verification or a complete audit of every dependency. Dependency code was reviewed where the target reaches it.

Evidence retention. FP-STYFI-03, FP-YTRANCHE-05, and FP-YTRANCHE-06 have no executable proof. The retained stYFI evidence bundle lacks captured output for the fork runs and omits two bytecode comparison rows. The yTranche bytecode comparison matched runtime with immutables masked. Compiler metadata differed.

Prior work and subsequent changes. The four stYFI public reports reviewed do not establish exhaustive novelty. Private bounty submissions and unpublished reviews were outside that comparison. Fix verification covers the behavior tested against the reviewed revisions. Deployment status and later code revisions were outside the scope of verification.