# Unbounded claim and approval drain

Claim/refund paths reading burnable or drifting state, leaving surplus or approvals anyone can take

_Area: Smart contract access control and control flow. Seen in 2 disclosed reports; latest 2024-10-31. Updated 2026-11-17._

## How it works
A claim, refund or withdraw path assumes the state it reads at claim time still matches the state at deposit or quote time. That assumption breaks two ways. First, the referenced object can be destroyed before the claim runs: an ERC721 receipt the claim reads via `ownerOf` is burned when its new owner withdraws the underlying token, so the read reverts and the claim can never pay out. Second, a rate or amount can drift between submission and execution, so the ETH the user sent no longer equals the amount actually deposited; the surplus stays in the contract with no binding to the sender. In the first case funds lock; in the second, whoever calls the sweep first takes the remainder.

## Where it shows up
- Claim functions that call `ownerOf(tokenId)` or similar ERC721 metadata reads on tokens that can be burned or transferred before the claim executes.
- Anchor `seeds()` helpers used for `invoke_signed` that omit the stored canonical bump.
- Router/deposit functions where the user-supplied ETH amount is not the actual deposited amount, and surplus stays in the contract.
- A `refundETH`/sweep path with no caller binding, reachable by any observer after a deposit [E3](https://bugbountylibrary.com/r/c4%3A2021-09-sushitrident%3AM-10.md).
- Accounting that derives amounts from an elastic/rebasing rate between quote and execution.

## How to review
For each claim path, ask: can the object or value this reads change or disappear before the claim runs? The invariant: a claim must either pay the recorded beneficiary or revert safely without locking funds, and no surplus may be claimable by an arbitrary caller. Check that ERC721 reads are wrapped in try/catch or use cached data; that every `seeds()` includes the bump; that surplus ETH is refunded to the sender, not left sweepable.

## How finders spotted it
- Read `getDataByReceipt`'s `ownerOf` call against OpenZeppelin's `_requireOwned` revert on burned tokens, then traced that `veNFTVault::withdraw` burns the receipt; confirmed with a fork test expecting revert [E1](https://bugbountylibrary.com/r/sherlock%3A2024-10-debita%3AH-1.md).
- Compared the `seeds()` helper against Solana PDA signing requirements and noticed the bump was absent from the seed array [E2](https://bugbountylibrary.com/r/sherlock%3A2024-08-woofi-solana-deployment%3AH-1.md).
- Read the ETH deposit path and noticed the input param is not the actual deposit amount, and surplus ETH is left claimable in the router [E3](https://bugbountylibrary.com/r/c4%3A2021-09-sushitrident%3AM-10.md).

## Variants seen
- Burned ERC721 receipt makes claim revert, locking liquidation tokens [E1](https://bugbountylibrary.com/r/sherlock%3A2024-10-debita%3AH-1.md).
- Missing PDA bump breaks CPI signing, locking rebate/withdraw funds [E2](https://bugbountylibrary.com/r/sherlock%3A2024-08-woofi-solana-deployment%3AH-1.md).
- Rate drift leaves surplus ETH claimable by any back-runner via `refundETH` [E3](https://bugbountylibrary.com/r/c4%3A2021-09-sushitrident%3AM-10.md).

## Impact and severity
Locked funds for legitimate claimants [E1](https://bugbountylibrary.com/r/sherlock%3A2024-10-debita%3AH-1.md)[E2](https://bugbountylibrary.com/r/sherlock%3A2024-08-woofi-solana-deployment%3AH-1.md); theft of surplus by any observer for [E3](https://bugbountylibrary.com/r/c4%3A2021-09-sushitrident%3AM-10.md). Severity rises when the stranded value is large or the claim is the only exit path.

## Evidence
- E1: https://bugbountylibrary.com/r/sherlock%3A2024-10-debita%3AH-1.md
- E2: https://bugbountylibrary.com/r/sherlock%3A2024-08-woofi-solana-deployment%3AH-1.md
- E3: https://bugbountylibrary.com/r/c4%3A2021-09-sushitrident%3AM-10.md
