# Zero-address placeholder skews selection

Zero or placeholder entries from bond/unbond or opt-in skew operator or account selection

_Area: Smart contract access control and control flow. Seen in 3 disclosed reports; latest 2026-08-20. Updated 2026-11-17._

## How it works
A zero value is overloaded: it is both a legitimate state and a sentinel for "empty" or "uninitialized". Code that writes or reads that value cannot tell the two apart, so a caller can plant zero/placeholder entries that later get treated as real selections, or a deliberate zero gets silently replaced by a default. The broken assumption is that "zero means absent" holds everywhere the value is consumed.

## Where it shows up
- Bitmaps or arrays where a public entrypoint sets a flag without checking the caller holds a nonzero balance or that a documented cap is enforced [E1](https://bugbountylibrary.com/r/c4%3A2026-04-k2%3AH-12.md).
- Bond/unbond loops that push zero-address placeholders for intermediate tiers and leave them behind after unbond [E2](https://bugbountylibrary.com/r/c4%3A2022-10-holograph%3AM-07.md).
- Uniform selection over a collection that can be inflated cheaply with sentinels [E2](https://bugbountylibrary.com/r/c4%3A2022-10-holograph%3AM-07.md).
- Setters that treat `x == 0` as uninitialized and overwrite it with a default on re-init/relist [E3](https://bugbountylibrary.com/r/c4%3A2024-12-secondswap%3AM-12.md).
- Documented caps (e.g. MAX_USER_RESERVES) claimed as anti-DoS guarantees but not enforced at every writer [E1](https://bugbountylibrary.com/r/c4%3A2026-04-k2%3AH-12.md).

## How to review
For each value, ask: can zero be both valid and absent? If so, every writer and reader must agree on which. Check the exact invariant: a state write that marks a slot active must require a nonzero backing balance and must enforce the documented cap at the entrypoint, not just in docs [E1](https://bugbountylibrary.com/r/c4%3A2026-04-k2%3AH-12.md). Selection over a collection must not treat placeholder entries as eligible operators [E2](https://bugbountylibrary.com/r/c4%3A2022-10-holograph%3AM-07.md). A setter must distinguish a deliberate zero from a missing value, e.g. via a separate initialized flag [E3](https://bugbountylibrary.com/r/c4%3A2024-12-secondswap%3AM-12.md). Trace every consumer of the bitmap/array and confirm the loop bound matches the enforced cap.

## How finders spotted it
- Read docs claiming a reserve cap bounds health-factor loops, then checked the opt-in entrypoint and found it only validated reserve existence/active/oracle price, not user balance or the cap; traced account-data iterating every bitmap bit and being called by liquidation before repayment [E1](https://bugbountylibrary.com/r/c4%3A2026-04-k2%3AH-12.md).
- Code review of the pod-filling loop and uniform scheduler selection, noticing zero-address placeholders persist after unbond and are treated as "open season" [E2](https://bugbountylibrary.com/r/c4%3A2022-10-holograph%3AM-07.md).
- Code reading of the setter interaction, noticing 0 is overloaded as both a valid setting and an uninitialized sentinel [E3](https://bugbountylibrary.com/r/c4%3A2024-12-secondswap%3AM-12.md).

## Variants seen
- Phantom collateral bits bloating account-data loops until liquidation exceeds compute budget [E1](https://bugbountylibrary.com/r/c4%3A2026-04-k2%3AH-12.md).
- Zero-address placeholder pods skewing uniform operator selection [E2](https://bugbountylibrary.com/r/c4%3A2022-10-holograph%3AM-07.md).
- Deliberate zero overwritten by a default on re-init [E3](https://bugbountylibrary.com/r/c4%3A2024-12-secondswap%3AM-12.md).

## Impact and severity
Unhealthy positions become unliquidatable, defeating the documented 15-reserve cap; direct liquidation fails at 26 active slots and account-data at 34, well below the 64-bit bitmap max [E1](https://bugbountylibrary.com/r/c4%3A2026-04-k2%3AH-12.md). Operator selection can be griefed into picking empty pods [E2](https://bugbountylibrary.com/r/c4%3A2022-10-holograph%3AM-07.md). Issuer-intended locks are bypassed, letting users sell locked tokens [E3](https://bugbountylibrary.com/r/c4%3A2024-12-secondswap%3AM-12.md). Severity rises when the zero write is cheap, repeatable, and feeds a loop or selection that scales with attacker-controlled entries.

## Evidence
- E1: https://bugbountylibrary.com/r/c4%3A2026-04-k2%3AH-12.md
- E2: https://bugbountylibrary.com/r/c4%3A2022-10-holograph%3AM-07.md
- E3: https://bugbountylibrary.com/r/c4%3A2024-12-secondswap%3AM-12.md
