Skip to content
Business logic Write-up Advanced

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.

Talfao Follow

Published on medium.com

A deep dive into a stale balanceOf Read that enabled value theft across a rebasing ERC4626 vault integration.

Talfao, on medium.com

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

  1. The gauge holds LT shares and its balance should rebase after strategy losses.
  2. No interaction occurs, so the LT balance remains stale and overstates assets.
  3. A user redeems gauge shares, and the gauge calculates the payout using the stale balance.
  4. During transfer, the LT vault applies the pending loss and updates its balance.
  5. 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.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.