The Bug That Slipped: Stale Balance Accounting in YieldBasis (She
The gauge's total assets calculation read a stale balance from the LT vault because negative rebases were only applied on interaction. An attacker could redeem gauge shares against this stale balance and receive more LT shares than deserved, stealing value from other shareholders.
A deep dive into a stale balanceOf Read that enabled value theft across a rebasing ERC4626 vault integration.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the gauge read the LT vault's balance without forcing the lazy rebase calculation to run first, so the exchange rate used stale data.
Impact
A user could extract extra LT shares from other gauge shareholders, causing a loss of funds for the remaining holders.
What the attacker needed
Gauge holds LT shares; strategy incurs losses; no interaction before redemption
The fix
The system should force a state synchronisation before reading the balance, or redesign accounting so rebases are not lazily applied.
How it was found
- The gauge holds LT shares and its balance should rebase after strategy losses.
- No interaction occurs, so the LT balance remains stale and overstates assets.
- A user redeems gauge shares, and the gauge calculates the payout using the stale balance.
- During transfer, the LT vault applies the pending loss and updates its balance.
- The redeeming user receives more LT shares than correct, and remaining holders absorb the loss.
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 write-up has not been written yet. The Original tab links to the source.
A vault's share price was calculated using an old balance that had not yet been updated after losses. By redeeming at the wrong moment, one user could take more than their fair share, leaving others with less.
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.