Verifiable randomness,
delivered in seconds
A multi-provider commit-reveal oracle. Flat fee per request, callback to your contract in 1โ3 seconds, every reveal checked by keccak256 on-chain โ and refundable, permissionlessly, if one never arrives.
How it works
Neither the provider nor the requester can choose the outcome. Both are locked in before either sees anything.
Provider pre-commits
The provider registers the head of a hash chain on-chain before your request exists. Every future reveal is already fixed โ it just isn't public yet.
You add entropy
Your request carries your own 32-byte contribution. The word is keccak256(reveal, yours, provider, seq, you) โ the provider can't grind it, and neither can you.
Verified delivery
The reveal is checked on-chain by walking keccak256 back to the commitment, then delivered to your entropyCallback. Unrevealed? Anyone can trigger your refund.
Ways in
Four, depending on what you're building.
Solidity consumer
Inherit IDicedConsumer, override entropyCallback, call requestV2. About 30 lines โ see the snippet below.
Already on Pyth Entropy
Change one address. requestV2, getFeeV2, getProviderInfoV2, getRequestV2, refundRequest and the callback selector all match Pyth's ABI.
Agents, over HTTP
No wallet, no gas, no Solidity. Sign one $0.05 USDG permit and POST โ HTTP 402 returns the terms, and the reply carries the word plus the sequence number and reveal transaction, so it stays auditable.
Run a provider
Registration is permissionless. Commit a hash chain, set your own fee, keep your own fees. Consumers choose whom to request from, so no single operator can stall the oracle.
Addresses
Every contract is source-verified โ read the code you're trusting before you send it anything.
The testnet oracle runs the same source as mainnet with its own keeper, so you can exercise the full request-and-reveal path before spending real ETH.
Integration snippet
Pyth-Entropy-shaped: existing consumers port by changing one address. Full docs and TypeScript SDK in the integration guide.
contract CoinFlip is IDicedConsumer {
IDicedEntropy public immutable entropy;
function flip(bytes32 userRandom) external payable returns (uint64 seq) {
// send at least getFeeV2(); any surplus is credited back to you
seq = entropy.request{value: msg.value}(userRandom, 0);
}
function entropyCallback(uint64 seq, address, bytes32 randomNumber) internal override {
bool heads = uint256(randomNumber) & 1 == 0;
// ... your logic
}
}
Fees
Set per provider, escrowed per request, and only earned after a successful reveal.
| Pay with | Fee | Status |
|---|---|---|
| ETH (native) | โ | live |
| WETH | โ | live |
| USDG (over HTTP) | $0.05 | live |
Unrevealed requests refund in full, permissionlessly. Overpay and the surplus is credited back to you rather than kept โ a fee change can't strand a request in flight.
Honest about trust
Commit-reveal has one residual assumption: a provider can't change an outcome, but it could withhold one. Your recourse is an automatic, permissionless refund โ and because registration is open, you can route around a provider entirely. We document exactly what is and isn't guaranteed, with no hand-waving.