fhenix-review

Installation
SKILL.md

fhenix-review — audit confidential code

This skill is for review contexts. The companion skills fhenix-contracts and fhenix-sdk already activate when editing FHE code; this one layers an audit lens on top of (or instead of) them when the task is review rather than authoring.

What to look for, in order

  1. ACL bugs — missing FHE.allowThis after a stored encrypted write; mismatched ACL pairing (e.g., decryptForTx().withoutPermit() without allowPublic); allowSender granted to an attacker-controlled msg.sender for someone else's handle.
  2. Decrypt-flow mismatches — decryptForView used where decryptForTx is needed (or vice versa); legacy FHE.decrypt(...) / getDecryptResultSafe(...) references that should have been migrated to the SDK-mediated flow.
  3. Plaintext leaks — trivialEncrypt(literal) for secret values; plaintext values stored / emitted alongside their encrypted twins; revert paths that branch on what should be private.
  4. Branching on ebool — if (FHE.gt(...)), require(FHE.gt(...)), while (...) — must be FHE.select.
  5. Confidentiality ≠ anonymity — the dApp claims privacy but leaks via gas patterns, event-fact, or tx graph.
  6. Encrypted approval / allowance — anywhere code tries to use ERC-20 approve/transferFrom semantics for ciphertexts.
  7. Randomness sourcing — FHE.randomEuintXX used where user-contributed entropy is required (auctions, gifts, fair shuffles).
  8. Input validation — InEuintXX accepted without "Proof of Plaintext Input" where the protocol's invariants depend on the cleartext meeting bounds.
  9. Permit hygiene — expiration in milliseconds not seconds; stale per-cycle permits; sharing-permit JSONs leaked publicly.
  10. Standards mixing — ERC20Confidential + FHERC20 + ERC-7984 interoperating in one app without an explicit wrapper.

Full catalog: references/gotchas.md.

Installs
3
GitHub Stars
1
First Seen
Oct 26, 2026