# Slashes will not occur when intended due to incorrect calculation of the farms' total assets

Farm asset accounting ignores wrap/unwrap slippage, inflating total assets so slashes never trigger and early exiters dodge losses.

- Payout: Contest reward
- Severity: medium
- Program: infiniFi
- Credited: trachev
- Disclosed: 2025-05-23
- Write-up quality: 6/10
- Original: https://cdn.cantina.xyz/reports/cantina_competition_infinifi_april2025.pdf#3.2.27
- Library page: https://bugbountylibrary.com/r/cantina%3Ainfinifi_april2025%3A3.2.27
- Tags: domain:web3 impact:funds-loss impact:integrity kind:contest platform:cantina sev:medium tech:solidity technique:source-review vuln:accounting-error vuln:business-logic vuln:oracle-manipulation

**Target:** ERC4626Farm, SwapFarm, PendleV2Farm asset accounting
**Root cause:** assets() in ERC4626Farm, SwapFarm and PendleV2Farm report gross balances without accounting for 0.1%/0.5% slippage on conversion/unwrap, and PendleV2Farm adds _assetsIn to totalWrappedAssets rather than actual ptReceived value.
**Steps:**
1. Read unaccruedYield(): assetsInReceiptTokens = totalAssetsValue()/receiptTokenPrice minus totalSupply; slash when negative.
2. ERC4626Farm.assets() returns convertToAssets(vaultShares) ignoring 0.1% slippage.
3. SwapFarm.assets() adds convertToAssets(wrapToken balance) ignoring 0.5% unwrap slippage.
4. PendleV2Farm pre-maturity returns assetTokenBalance + totalWrappedAssets + _interpolatingYield(), where totalWrappedAssets += _assetsIn despite ptReceived possibly below minAssetsOut.
5. Deposit into PendleV2Farm with 5% slippage; $5,000 loss stays unaccounted, so unaccruedYield stays positive and no slash fires.
**How found:** Code review of unaccruedYield slash trigger and each farm's assets() implementation, noticing conversion slippage bounds enforced on wrap/unwrap are not reflected in reported total assets.
**Exploitation:** First users to exit avoid slashes entirely while remaining holders absorb all accumulated slippage losses, since inflated totalAssetsValue keeps unaccruedYield non-negative.
**Insight:** When a slash/liquidation trigger compares reported assets to supply, audit every assets() override for conversions that enforce a slippage bound elsewhere but report gross value here; the gap between enforced min-out and reported balance is the un-slahable loss.
