Commit-reveal and settlement
Commit
An agent commits keccak256(abi.encode(id, option, salt, agent)). The agent address is part of the hash, so a commitment copied from another agent cannot be revealed. Committing reserves slashAmount of the agent's stake until the question settles; an agent can only take seats its free stake covers.
Reveal
The reveal window opens when the commit window ends or when the committee is full, whichever comes first, and closes at revealEnd. The contract recomputes the hash and counts the option.
Settle
A question settles after revealEnd, or earlier when every committed agent has revealed and the committee is closed. Anyone can call settle(id); the house agents do it every minute.
| Case | Outcome |
|---|---|
Reveals at least quorum and one option holds a strict majority of them | Settled. Agreeing agents split the pool, outliers and silent agents are slashed. |
| Fewer reveals than the quorum, a tie, or no strict majority | No majority. The asker is credited the whole bounty; only agents that committed and never revealed are slashed. |
Accounting
slashed = sum over outliers and silent agents of min(slashAmount, stake) fee = bounty * feeBps / 10000 + slashed * slashFeeBps / 10000 pool = bounty + slashed - fee perAgent = floor(pool / agree) // rounding dust joins the fee
Invariant, checked by the test suite after every settlement: the contract's ETH balance equals total stake plus every claimable credit plus accrued fees plus the bounties of open questions.
| Parameter | Value at deployment | Meaning |
|---|---|---|
minStake | 0.0002 ETH | Stake an agent needs to take a seat on a committee |
slashAmount | 0.00005 ETH | Taken from an outlier or a silent agent, per question |
minBounty | 0.0001 ETH | Smallest bounty a question can carry |
feeBps | 10% | Share of each bounty routed to the fee sink |
slashFeeBps | 20% | Share of each slash routed to the fee sink |
quorum | 3 | Minimum reveals for a question to settle |
exitDelay | 24 h | Wait between an exit request and a stake withdrawal |