X Layer's optimistic oracle · Stake OKB · Earn XTR
An on-chain truth machine for X Layer.
xtruth is a decentralized truth machine native to X Layer. Builders post claims for any verifiable statement. OKB holders stake to vote on disputed claims and earn XTR every round. The economic flywheel is open to everyone.
Principle
Optimism first, voting only when needed.
Most claims never need a vote — they sit through a short liveness window and resolve true automatically. The economic security comes from the threat of being challenged: anyone can dispute, and OKB stakers decide.
Any contract or user calls assertTruth() on X Layer with a statement, a liveness window, and a token bond.
During the window, anyone can dispute by posting an equal bond. Without a dispute, the claim resolves true automatically.
Disputed claims escalate to OKB stakers, who commit and reveal their answer over a 24-hour round. Every voter earns XTR.
Winner takes the loser's bond. Wrong voters give up part of their staked OKB to correct voters. Settled assertions are immutable.
For builders
One contract call away from on-chain truth.
Your contract bonds, posts a claim, and gets a callback when the answer settles. No oracle gateway to negotiate with, no API key, no off-chain consensus to wire up. Drop the OOv3 interface into your project and ship.
Your contract pulls bond from its treasury, calls assertTruth() with the claim text and the liveness you want.
Optimistic resolution if no one challenges. If disputed, OKB voters decide within 24 hours.
OOv3 calls assertionResolvedCallback(id, truthful) on your contract. You settle markets / pay claims / unlock funds programmatically.
- Pure on-chain — no service to authenticate against
- Inherit X Layer's economic security
- Audited reference contracts you can fork
import { OptimisticOracleV3Interface } from "./OOv3.sol";
contract MyMarket {
OptimisticOracleV3Interface public immutable oo;
IERC20 public immutable bondToken;
function resolve(bytes32 marketId, string calldata claim) external {
uint256 bond = oo.getMinimumBond(address(bondToken));
bondToken.transferFrom(msg.sender, address(this), bond);
bondToken.approve(address(oo), bond);
bytes32 assertionId = oo.assertTruth(
bytes(claim),
msg.sender, // asserter
address(this), // callback target
address(0), // default escalation
7200, // 2h liveness
bondToken,
bond,
"ASSERT_TRUTH",
bytes32(0)
);
markets[marketId] = assertionId;
}
function assertionResolvedCallback(
bytes32 assertionId,
bool truthful
) external {
require(msg.sender == address(oo));
// settle market based on truthful
}
}For OKB holders
Stake OKB. Vote on truth. Earn XTR every round.
OKB holders are the truth layer. Stake what's already in your wallet, vote on disputed claims, and earn XTR the protocol mints to you for participating. Be honest, and you also pocket a share of the OKB slashed from misinformers.
No new token to buy and no awkward bridging. Stake the OKB sitting in your X Layer wallet — it stays under your control.
Every vote you cast earns XTR from the protocol. Showing up is the only requirement; correctness is the bonus.
Vote correctly and you also receive a share of the OKB slashed from voters who got it wrong. Honest stakers earn the most.
How rewards stack
Use cases
What you can build on xtruth.
Anything that needs a verifiable answer can be settled by xtruth. Same OOv3 contract, same OKB voter pool — different question.
Resolve YES/NO outcomes after liveness; disputes escalate to OKB voters. The pattern behind the largest prediction-market platforms — now native to X Layer.
Claim that an event happened (flight delayed, smart-contract exploited, weather event), post a bond, get paid out automatically once nobody disputes.
Assert state from one chain on another. Disputers slash bad assertions; honest assertions settle in hours without trusting a multisig.
Publish numerical answers, prices, or arbitrary truth claims with a token bond as economic security.
Use the same voting fabric for protocol upgrades, with higher slash rates that match the higher stakes.
If a human can decide whether a claim is true, the network can resolve it. No off-chain APIs required.
Ready to ship?
Pull the OOv3 ABI, post your first assertion, settle your first dispute — all in one afternoon.