# Claiming liquidationAccountant will reduce vault y-intercept by more than the correct amount

LiquidationAccountant.claim() computes y-intercept decrease from post-distribution balance (always 0), over-decreasing the vault y-intercept and diluting all user shares.

- Payout: Contest reward
- Severity: high
- Program: Astaria
- Credited: obront
- Disclosed: 2022-11-07
- Write-up quality: 7/10
- Original: https://github.com/sherlock-audit/2022-10-astaria-judging/issues/48
- Library page: https://bugbountylibrary.com/r/sherlock%3A2022-10-astaria%3AH-33
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:high tech:solidity technique:source-review vuln:accounting-error vuln:share-inflation

**Target:** LiquidationAccountant.sol claim() / PublicVault accounting
**Root cause:** claim() reads ERC20(underlying()).balanceOf(address(this)) after funds are already transferred out, so the balance is 0 and the y-intercept is decreased by the full expected amount instead of the actual shortfall.
**Steps:**
1. Call LiquidationAccountant.claim() with expected=1 ether, withdrawRatio=0, auction proceeds=1 ether
2. Observe funds transferred to vault before decreaseYIntercept is computed
3. decreaseYIntercept((expected - balanceOf(this)) * (1e18-withdrawRatio)/1e18) evaluates to expected since balance is 0
4. Vault y-intercept drops by full expected despite matching outcome
5. Subsequent withdraw()/totalAssets() math yields artificially low asset values per share
**How found:** Code reading of claim() ordering: noticed balanceOf is queried after transfers, making the term always zero and the decrease equal to full expected.
**Exploitation:** Any liquidation flow triggers the misaccounting; repeated liquidations progressively over-decrease the y-intercept, falsely diluting all vault shareholders' share value.
**Insight:** In accounting code, check whether balance reads used in share/y-intercept math occur before or after the transfers they are meant to measure; post-transfer reads silently zero out the shortfall term.
