xtruth

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.

Live on X Layer Testnet · chainId 1952
Stake
OKB
Earn
XTR
Chain
X Layer

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.

01
Post a claim

Any contract or user calls assertTruth() on X Layer with a statement, a liveness window, and a token bond.

02
Liveness window

During the window, anyone can dispute by posting an equal bond. Without a dispute, the claim resolves true automatically.

03
OKB stakers vote

Disputed claims escalate to OKB stakers, who commit and reveal their answer over a 24-hour round. Every voter earns XTR.

04
Settle

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.

1
Bond + assert

Your contract pulls bond from its treasury, calls assertTruth() with the claim text and the liveness you want.

2
Wait or be disputed

Optimistic resolution if no one challenges. If disputed, OKB voters decide within 24 hours.

3
Get the callback

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
MyMarket.sol
solidity
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
    }
}
Sequence: your contract ↔ OOv3 ↔ voters
Your contractxtruth OOv3OKB votersassertTruth(claim, bond)bond escrowedif disputed → votetruth returnedassertionResolvedCallback(id, truthful)Total time: minutes (no dispute) · < 24h (with dispute)

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.

OKB·OKB native
XTR·XTR rewards
OKB you already hold

No new token to buy and no awkward bridging. Stake the OKB sitting in your X Layer wallet — it stays under your control.

XTR every round

Every vote you cast earns XTR from the protocol. Showing up is the only requirement; correctness is the bonus.

Bonus for being right

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

ScenarioPer-vote earningsVote correctlyBest case+ XTR base reward+ OKB slash shareVote wrongNet loss+ XTR (still earned)− OKB stakeDon't voteMissedNo XTR · No slash · Idle stake
Vote correctly
+ XTR base reward
+ Share of slashed OKB pool
Vote wrong
+ XTR base reward (for showing up)
− Slice of your staked OKB
Don't vote
No XTR (you missed the round)
No slashing either, just dead capital

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.

Prediction markets on X Layer

Resolve YES/NO outcomes after liveness; disputes escalate to OKB voters. The pattern behind the largest prediction-market platforms — now native to X Layer.

Market closes → assertion → 2h liveness → resolved → payouts
Insurance & coverage

Claim that an event happened (flight delayed, smart-contract exploited, weather event), post a bond, get paid out automatically once nobody disputes.

Claimant asserts → liveness → no dispute → automatic payout
Cross-chain bridges

Assert state from one chain on another. Disputers slash bad assertions; honest assertions settle in hours without trusting a multisig.

Source state asserted → contested? → vote → bridge unlocks
Custom data feeds

Publish numerical answers, prices, or arbitrary truth claims with a token bond as economic security.

Publisher asserts value → liveness → consumer reads on chain
DAO governance

Use the same voting fabric for protocol upgrades, with higher slash rates that match the higher stakes.

Proposal → community vote → governor executes
Anything verifiable

If a human can decide whether a claim is true, the network can resolve it. No off-chain APIs required.

Question → assertion → community → answer on chain

Ready to ship?

Pull the OOv3 ABI, post your first assertion, settle your first dispute — all in one afternoon.