▐ homomorph ▌

rules / HM002

HM002 missing-allow-this HIGH

Encrypted value stored in state without FHE.allowThis

Why it matters

Ciphertext handles are gated by the on-chain ACL. When a contract stores a new handle without granting itself access via `FHE.allowThis(handle)`, every later operation on that value reverts (`SenderNotAllowed`). Balances, votes or positions written this way become permanently unusable: the contract holds data it can never compute on again.

Fix

After writing a new handle to storage, call `FHE.allowThis(handle);` (or `FHE.allow(handle, address(this))`). Do this for every code path that updates the value, including internal helpers.

Check locally

homomorph scan . --rules HM002