# The calculation of totalAssets() could be wrong if operatorFeeAmount > 0, this can cause potential loss for the new depositors

LiquidRon's totalAssets() counted the operator's accrued fee as user assets, so deposits made before fee withdrawal were diluted and redeemers lost funds.

- Payout: Contest reward
- Severity: high
- Program: Liquid Ron
- Credited: 0x04bytes
- Disclosed: 2025-03-18
- Write-up quality: 6/10
- Original: https://code4rena.com/reports/2025-01-liquid-ron#h-01
- Library page: https://bugbountylibrary.com/r/c4%3A2025-01-liquid-ron%3AH-01
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:share-inflation

**Target:** EIP-4626 vault totalAssets() accounting (LiquidRon.sol)
**Root cause:** operatorFeeAmount is held as WRON balance inside the vault and included in totalAssets(), so it is treated as user-owned assets even though it is owed to the operator.
**Steps:**
1. Operator calls `harvest()`, increasing WRON balance and operatorFeeAmount (e.g. 10).
2. New user deposits 100; shares minted = 100*totalShares/totalBalance, priced against inflated totalAssets.
3. Operator calls `fetchOperatorFee()`, removing 10 from vault balance and dropping totalAssets.
4. New user calls `redeem()`; receives 99.9 instead of 100 because share price fell after fee withdrawal.
**How found:** Code reading of totalAssets() composition (super.totalAssets() + staked + rewards) versus operatorFeeAmount being stored as vault WRON balance; noticed fee withdrawal reduces totalAssets after deposits are priced.
**Exploitation:** Operator fee accrual inflates share price at deposit time; when the operator later claims the fee, totalAssets drops and late redeemers absorb the loss while earlier redeemers/operator gain.
**Insight:** In vault share-price accounting, any balance held in the vault but owed to a third party (fees, pending payouts) must be subtracted from totalAssets(), otherwise deposits are mispriced and later fee claims dilute redeemers.
