Yearn V3 reported gain is the increase in the vault's strategy position over its recorded debt. The accountant separately returns fees and refunds; the vault mints fee shares, pulls available refunds and adjusts profit locking. The protocol fee splits the accountant fee. A holder's result therefore requires the post-report assets, effective share supply and unlock state, rather than subtracting a fee percentage from reported profit.
Identify the vault and its accountant separately
An allocator vault holds shares in strategies and issues its own shares to depositors. Each strategy has its own valuation and reporting behavior. Yearn's V3 overview distinguishes these allocator vaults from the stand-alone TokenizedStrategy implementation. A strategy's internal fee calculation and the allocator's accountant are separate layers.
This article follows VaultV3 API 3.1.1, pinned to commit 89ab996, together with the reference Accountant at commit a2ab8ec. The examples select hypothetical configurations for those contracts. They do not identify the fees of a live vault.
The accountant is optional and replaceable. Yearn's periphery documentation explains that it can implement customized fees, refunds and health checks. The core vault does not impose one annual management fee or performance-fee schedule across every deployment.
Keep the underlying token and vault shares in separate columns. The ERC-4626 shares-versus-assets guide explains the units; the receipt-token accounting guide explains why a fixed share balance can represent a changing asset claim. Neither general model supplies Yearn's specific report rules.
Read the report before calling the gain net profit
For an external strategy, the allocator values the strategy shares it owns using that strategy's convertToAssets. It compares that position value with the strategy's recorded current_debt. A higher value produces a gain; a lower value produces a loss. It does not compare the strategy's entire assets with the vault's debt, and processing this comparison is separate from running the strategy's own harvest.
The pinned report implementation then calls accountant.report(strategy, gain, loss). The two returned amounts name fees and refunds in underlying asset units. Their settlement differs:
| Report quantity | What to reconcile |
|---|---|
| Gain or loss | Change in the strategy's recorded debt |
| Accountant fee quote | Input to the vault's fee-share calculation |
| Refund | Underlying tokens actually pulled from the accountant |
| Protocol fee | The configured share of total fees |
| Holder conversion | Assets represented by held shares after supply adjustments |
Fees create additional claims through minted vault shares. Refunds add underlying tokens to accounted idle assets. The totalIdle versus totalDebt ledger follows those asset categories through allocations and reports. A fee share mint does not itself transfer that many underlying tokens out of idle cash.
Set up two independent, reproducible cases
Both hypothetical cases start with 1,000 underlying tokens, called U, backing 1,000 vault shares. Idle assets are 200 U and strategy debt is 800 U. The vault owns no locked profit shares. One holder owns 100 shares. Both tokens use six decimals, and all calculations below use integer base units before formatting.
Select a 1% annual management fee, a 10% performance fee and a 50% loss refund ratio. Set maxFee to zero, which disables this reference accountant's fee cap. Allow the report through its health checks, add the vault to the accountant's permitted vaults, and choose a hypothetical 25% protocol split. A positive profit-unlock period applies.
The elapsed report interval is 7,889,238 seconds, exactly one quarter of the accountant's 31,556,952-second year. Management fees are therefore 2 U: 800 multiplied by 1%, multiplied by one quarter. There are no deposits, withdrawals or intervening reports within either case. These are separate branches from the same starting state.
A 100 U gain creates 12 fee shares
In the gain branch, the vault's strategy position now converts to 900 U. Against debt of 800 U, that is a 100 U gain. The accountant calculates 10 U in performance fees plus 2 U in management fees, returning a 12 U fee quote and no refund.
The protocol share is 25% of those 12 U, or 3 U at the reporting conversion. The accountant's remainder is 9 U. Adding another 3 U charge to the 12 U would double-count the protocol split. Yearn's protocol-fee documentation defines this revenue-share relationship, and the pinned protocol-fee tests exercise it.
At the opening rate of one U per share, the vault calculates 100 shares for gross profit locking and 12 shares for the fee offset. It ends with 88 shares locked in the vault, nine new shares held by the accountant and three new shares held by the protocol recipient. Original holders still own their original 1,000 shares.
Strategy debt rises to 900 U. Idle assets remain 200 U, so total assets become 1,100 U. Immediately after the report, effective supply is also 1,100 shares. The holder's 100 shares still convert to 100 U. The report event records gain of 100 U, total fees of 12 U and protocol fees of 3 U.
| Observation | Total assets, U | Effective supply, shares | Still-locked shares | Holder's 100-share conversion, U |
|---|---|---|---|---|
| Before report | 1,000 | 1,000 | 0 | 100 |
| Immediately after report | 1,100 | 1,100 | 88 | 100 |
| Fully unlocked, otherwise unchanged | 1,100 | 1,012 | 0 | 108.695652 |
As the 88 vault-owned shares unlock, they cease to count in effective supply. The later conversion is 1,100 divided by 1,012, approximately 1.086956522 U per share. The table rounds the holder's conversion down to six decimals.
The nominal gain after the initial fee quote is 88 U. After full unlocking, the original 1,000 shares collectively convert to 1,086.956521 U after rounding down. Their increase is 86.956521 U. The 12 fee shares also participate in the unlocking and collectively convert to 13.043478 U. Rounding the two separate conversions puts their sum one base unit below total assets. Treating the original 12 U fee quote as the fee shares' permanent asset value misses that participation.
These later values assume the fee shares remain outstanding and all other state stays fixed. They are accounting conversions, with exit liquidity still requiring its own check.
An 80 U loss can coexist with a fee and a refund
Reset to the independent opening state. The strategy position is now worth 720 U, producing an 80 U loss. Performance fees are zero. Management fees initially remain 2 U under the selected uncapped configuration.
The 50% refund ratio suggests 40 U. Give the accountant only 30 U of underlying tokens. Its reference implementation limits the refund to that balance and arranges allowance; the vault also checks available balance and allowance before pulling. Thus the completed refund is 30 U. Holding valuable vault shares alone would not fund this underlying-token transfer.
Debt falls from 800 to 720 U. Idle assets rise from 200 to 230 U. Total assets close at 950 U: 1,000 minus 80 plus 30.
The prior conversion makes the desired loss-and-fee offset 82 shares, while the refund corresponds to 30 shares. That leaves a desired supply reduction of 52 shares before fee issuance. The vault owns no profit shares to burn, so this reduction cannot be absorbed by its profit buffer. It issues two fee shares, leaving effective supply at 1,002.
| Loss-branch result | Checked amount |
|---|---|
| Recorded loss | 80 U |
| Refund requested by ratio | 40 U |
| Refund actually funded | 30 U |
| Nominal accountant fee quote | 2 U |
| Accountant share mint | 1.5 shares |
| Protocol share mint | 0.5 shares |
| Holder's 100-share conversion | 94.810379 U |
The holder's conversion is 100 multiplied by 950, divided by 1,002, rounded down. Subtracting only the net 50 U asset loss from the opening assets would overlook the two newly issued shares.
There is another reconciliation point in the vault's final event calculation. In this overall-loss case, it revalues the fee shares after accounting. Two shares convert to 1.896207 U, so StrategyReported.total_fees records that amount, despite the accountant's initial 2 U quote. The event's protocol-fee amount is 0.474051 U after integer rounding. Fee shares and event asset amounts need separate fields.
A positive fee cap changes the loss branch
The reference Accountant's maxFee check runs after initial fee assessment. When positive, it caps total fees by a percentage of gain. With zero gain, a positive cap reduces the 2 U management quote to zero. In that counterfactual, the same 30 U refund leaves 950 U backing 1,000 shares, and the holder converts to 95 U.
Consequently, “management fees accrue on debt and time” is insufficient to predict the final charge. Read the cap's value and its zero-value meaning. A different accountant can implement another rule.
Reproduce a real report in this order
Start with the chain, vault address, implementation version, asset and accountant address. For this reference accountant, read getVaultConfig(vault_address) to include overrides. The role-manager versus report-keeper guide separates permission assignment from report execution. In the pinned vault, changing the accountant requires ACCOUNTANT_MANAGER; processing a report requires REPORTING_MANAGER. A report can revert on authorization or accountant health checks; a submitted transaction establishes no completed accounting change.
Preserve the preceding state and transaction order. Record strategy debt, last-report time, strategy shares owned by the vault and their conversion. Also retain total assets, effective supply, vault-owned shares and unlocked shares. Combining these reads from unrelated blocks can manufacture a discrepancy.
Read protocol_fee_config(vault_address) on the corresponding factory. In the pinned factory implementation, an omitted vault argument defaults to the caller. An outside reader using the no-argument method can therefore inspect the wrong account's configuration when a vault override exists.
Recompute the nominal fees and fundable refund, then reconcile the actual share mints and underlying transfer. Compare those with the event's asset-denominated fee fields. Finally, request convertToAssets for the holder's actual share balance at the resulting state. The VaultV3 method reference recommends conversion methods where pricePerShare offers insufficient precision.
If a loss-branch event shows 1.896207 U in fees while the accountant calculation produced 2 U, preserve both observations. Check the two-share mint and its post-report conversion before inventing a balancing cash transfer.
