posl docs
poslSecurity

Security overview

How posl is checked today, what an outside audit still has to do, and the limits we know about. Every number here comes from a test run recorded in docs/VERIF.md.

No outside audit

The checks below are our own. No outside firm has audited the program or the circuits. Read Risks before you deposit.

What is tested#

LayerHowResult
Circuitscircomspect (Trail of Bits) on the four PoSL circuits; constraint tests with a cheating input per rule; a check that every verifying key in the program matches its proving key32/32; every circomspect warning checked by hand
Programcargo test, cargo clippy, cargo audit; a randomized test over 200,000 epochs13 + 90 tests; 0 clippy errors; 0 vulnerable dependency
End to endLocal validator, real Groth16 proofs, a dishonest signer that rewrites instructions after the proof53/53
Keeper11 missed epochs, one pass5/5
FrontThe full path in a real browser against the live local stack; passkey with a virtual authenticator; accessibility (axe-core)28/28; 0 accessibility violations

Attacks that are refused#

AttackRefused by
A relayer swaps the recipient of a withdrawalInvalidProof: the ext data hash binds the recipient
A relayer swaps the fee recipientInvalidProof
A fake account in place of the pool vaultAnchor seed constraint
One byte of the proof changedInvalidProof
A non-admin changes the parametersUnauthorized
Opening an epoch out of orderWrongEpoch
Closing the current epochEpochNotOver
Locking beyond the longest lock, or until the current epochInvalidLockEpoch
A relayer fee above the maximumRelayerFeeTooHigh
A volume claim of four empty creditsThe circuit (reward must be above 0)
A self-relaying staker farming volumeCredit value = volume part of the fee (details)
Instructions placed before a claim to cut its logsUnsafeTransaction: tree-changing instructions run at the top level, after compute-budget instructions only

Findings fixed so far#

  • Volume farming by a self-relaying staker (economic): fixed by the credit value rule.
  • Empty volume claims made the relayer pay rent for nothing: fixed in the circuit.
  • Keeper only looked at the last 8 epochs: it now catches up on any number.
  • Admin fee rates could be raised to 100 %: now capped at 1 % in code and delayed (details).
  • Sign-in message was fixed text a phishing site could ask for: it is now bound to the app domain (details).

TBD The full audit report of the current pass (severity, scenario, fix and test for each finding) is written to docs/AUDIT.md; this page will list it once merged.

Known limits#

  • The four PoSL circuits use the keys of our own ceremony: three contributions, all from the team, so their safety rests on us having destroyed our randomness.
  • The exit to Zcash lands on a transparent address first (a bridge limit).
  • A young pool has a small anonymity set (Staying private).
  • The relayer and the indexer can censor or delay, not steal (Privacy model). Anyone can run their own.

Report a problem#

If you find a way to lose, steal or freeze ZEC, or to link private actions, please report it privately to the team before telling anyone else. A public bug bounty comes later.