# Lock.sol: claimGovFees function can cause assets to be stuck in the Lock contract

Lock.claimGovFees transfers gov fees into Lock, but BondNFT.distribute silently returns when an asset has zero shares or is disallowed, stranding funds permanently.

- Payout: Contest reward
- Severity: medium
- Program: Tigris Trade
- Credited: HollaDieWaldfee
- Disclosed: 2023-02-17
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2022-12-tigris-findings/issues/73
- Library page: https://bugbountylibrary.com/r/c4%3A2022-12-tigris%3AM-01
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** Solidity Lock/BondNFT/GovNFT contracts
**Root cause:** BondNFT.distribute returns early (no revert) when totalShares[_tigAsset]==0 or !allowedAsset[_tigAsset], but Lock.claimGovFees has already pulled the asset balance delta from GovNFT into Lock, leaving it there with no recovery path.
**Steps:**
1. Call `BondNFT.addAsset` to register an asset with no bonds yet (totalShares == 0).
2. Call `Lock.claimGovFees`, which transfers the asset balance from GovNFT to Lock (`Lock.sol#L115`).
3. `BondNFT.distribute` hits `if (totalShares[_tigAsset] == 0 || !allowedAsset[_tigAsset]) return;` and no-ops without reverting.
4. Funds remain in Lock contract with no rescue function; unrecoverable.
**How found:** Code reading of claimGovFees delta-balance transfer versus the early-return guard in BondNFT.distribute; judge initially thought invalid (transferFrom after check) until team confirmed funds land in Lock, not BondNFT.
**Exploitation:** No attacker action required; occurs on normal claimGovFees invocation whenever a registered asset has zero shares or is disallowed, permanently stranding the transferred gov fees in Lock.
**Insight:** When a caller measures a balance delta to decide how much to forward, any downstream callee that can silently no-op (early return instead of revert) turns that delta into stranded funds; check the callee's guard conditions against the caller's transfer ordering.
