Emission rewards will keep accruing even the yield strategy is empty
The reward manager checks whether effective supply is below zero to stop emissions, but virtual shares keep effective supply at a minimum of 1e6, so rewards keep accruing even when the yield strategy has no depositors. This means emission rewards are allocated to rewardPerToken unnecessarily, breaking intended functionality.
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2025-06-notional-exponent-judging/issues/511
Found by
mstpr-brainbot
Summary
When there are no depositors in the yield strategy, emission rewards should stop accruing. However, the current implementation incorrectly assumes that effectiveSupply will never be zero its minimum value is hardcoded to 1e6 due to virtual shares. As a result, rewards continue to accrue even when the strategy is completely empty, which is unintended behavior.
Root Cause
As we can see here, when effectiveSupply < 0, reward emissions should not accrue—this is intended to ensure rewards are only distributed when there are actual depositors in the yield strategy.
However, this assumption is incorrect because effectiveSupply is never zero due to VIRTUAL_SHARES, even when there are no real depositors!
See:
https://github.com/sherlock-audit/2025-06-notional-exponent/blob/82c87105f6b32bb362d7523356f235b5b07509f9/notional-v4/src/AbstractYieldStrategy.sol#L149-L151
Internal Pre-conditions
None needed
External Pre-conditions
None needed
Attack Path
Happens naturally
Impact
All the emission rewards will accrue to rewardPerToken unnecessarily. Functionality broken whats intended is not prevented.
PoC
No response
Mitigation
instead of checking effective supply against "0" check against VIRTUAL_SHARES or use totalSupply.
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/notional-finance/notional-v4/pull/27
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The check for stopping rewards uses a supply value that is never zero because virtual shares enforce a minimum, so the condition for halting emissions is never met.
Impact
Emission rewards accrue unnecessarily to rewardPerToken, breaking the intended functionality of halting rewards when the strategy is empty.
What the attacker needed
None
The fix
The check should compare effective supply against VIRTUAL_SHARES or use totalSupply instead of zero; the protocol team fixed this issue in a pull request.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A yield strategy is a place where users deposit funds to earn rewards. The code is supposed to stop giving out extra rewards when nobody has deposited, but a technical detail called 'virtual shares' makes the system think there is always at least a tiny deposit, so rewards keep piling up for nobody.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.