Voting & staking
xtruth's truth layer is staked OKB. OKB holders stake to participate in dispute resolution and earn XTR rewards from the protocol every round. Honest voters also receive a share of the OKB slashed from voters who get an answer wrong.
Why OKB? Most X Layer users already hold OKB — there's no separate governance token to buy or bridge. The truth layer is open to everyone already in the X Layer ecosystem.
Round structure
Each round is 24 hours, split into two 12-hour phases:
- Commit — voters publish a hash of their answer + a salt. Hides their answer from other voters until reveal.
- Reveal — voters publish the actual answer + matching salt. The contract verifies the hash and counts the vote.
If you don't reveal what you committed (or never commit at all), you're treated as not having participated this round — no XTR reward, no slashing either.
How rewards stack
| Action | Outcome | |---|---| | Vote correctly | + XTR base reward · + share of slashed OKB pool | | Vote wrong | + XTR base reward (smaller) · − slice of staked OKB | | Don't vote | 0 XTR · 0 slashing · idle stake | | Wrong vote on a governance request | Higher slash rate (5%) reflecting higher stakes |
Numbers come from the SlashingLibrary contract and can be retuned by
governance vote.
XTR emissions
Every voted round mints XTR to participants in proportion to their stake
weight. This is the "base APR" of staking — currently a few percent
annualized, configurable via the emissionRate parameter.
The slashing redistribution sits on top of XTR emissions. Honest active voters get both:
- XTR for showing up
- A share of the OKB slashed from disputers who lost
Passive (stake-but-don't-vote) wallets earn nothing each round but also risk nothing. The protocol doesn't punish absence — it just doesn't reward it.
Staking flow
1. Approve VotingV2 to pull OKB:
okb.approve(votingV2, amount)
2. Stake:
votingV2.stake(amount)
- takes effect immediately for XTR emission, next round for voting weight
3. Each round: commit + reveal during the two 12h phases
4. Withdraw XTR rewards (any time):
votingV2.withdrawRewards()
5. To exit: requestUnstake → wait `unstakeCoolDown` (default 7 days) →
executeUnstake. OKB returns to your wallet.
The web console has the full UI for stake / unstake / claim / commit / reveal at app.xtruth.xyz/vote.
Delegation
If you want to keep stake on a cold wallet but vote from a hot wallet,
use DesignatedVotingV2Factory to deploy a personal voting proxy. The
cold wallet owns the OKB; the hot wallet votes on its behalf and the XTR
flows back to the cold wallet.
What does a voter make?
- Active honest voter: positive — XTR every round + share of slashed OKB whenever you vote correctly on a disputed request.
- Active dishonest voter: net negative — XTR base barely covers the slashing on every wrong vote.
- Passive staker: zero — no XTR, but no risk either.
- No stake: zero — not participating.
The economics push everyone toward "stake what you have, vote when prompted, vote honestly". That's what makes optimistic claims above the voting layer trustworthy.