Documentation
The written record
Hearth is confidential no-loss prize savings on the Zama Protocol. You deposit a confidential token, your balance stays encrypted on chain, the yield the pool earns is handed out as prizes in a periodic draw, and your principal is withdrawable at any time. Nobody, including us, can read what you saved or what you won.
Seven pools run on Sepolia, one per confidential token Zama publishes there, each with its own contracts and its own keeper. Most pages below use USDC in their worked examples, because that is the pool with the longest history; every one of them describes all seven.
These pages are the full written record of how it works and what it does not hide.
ARCHITECTURE.md in the repository root is the implementation specification; this tree
is the same design explained for the people who use it and the people who audit it.
20 pages. Every one of them is a file in the repository under docs/, rendered here.
Getting started
Concepts
Pools and tokens
→The seven pools and their addresses, why six of them draw every six hours, the seeded stakes per token, the token Hearth refuses, and the per-pool routes.
How a draw works
→Periods, the two-period window and the close deadline, the five steps of a draw, and what the vault publishes instead of the pool's total.
Time-weighted balance
→Why odds use your average balance over the period, what a late deposit is worth, and why three saved observations are enough.
Winner selection
→The winner test, PoolTogether's per-prize rule, the nested thresholds against the published bracket, and a worked example with three savers.
Prizes and tiers
→How yield becomes prize liquidity, the encrypted carry and the reconcile cadence, the three Sepolia tiers, over-subscription, and where we deviate from PoolTogether V5.
Where the prize money comes from
→The sponsored source on Sepolia, why the harvest is verified rather than reported, and how Zama's Confidential Vault plugs in on mainnet.
Why this needs Zama
→The delete test: take fully homomorphic encryption out and there is no product. Every Zama piece we use, named.
Security
What stays private
→Seven rules: the bracket and the leak it replaced, what a pinned balance costs, the wrap seam in both directions, what the prize counts measure, the token layer, why evaluation is not a tell, and the behavioural residual.
Threat model
→Nine attackers, what each wants, what stops them, and what does not. Plus the executed failures of our previous design.
Randomness and verification
→Where the seed comes from, why nobody can re-roll it or resize what it wins, and how anyone recomputes a threshold after the fact.
Static analysis
→The slither and solhint runs, the one reason behind each of the five families of findings, and the dependency audit with the two axios findings it still reports.
Operations
The keeper
→The keeper's job step by step, the ordering rule, one process per pool, where the live seven are hosted, what happens when it is down, and the gas budget.
Deploying
→Deploying one pool per token, constructor signatures and parameters, verification, and the two Sepolia parameter sets against a mainnet one.
Reference
Attack logs
Self-audit on localhost
→Every row below is one line of the table "What is checked, and how" in docs/security/threat-model.md, in order.
Self-audit on sepolia
→Every row below is one line of the table "What is checked, and how" in docs/security/threat-model.md, in order.
Self-audit on sepolia
→Every row below is one line of the table "What is checked, and how" in docs/security/threat-model.md, in order.