Architecture

Torinox Protocol has two runtime parts: an immutable Solidity contract (TorinoxEntropy) on Robinhood Chain, and an offchain keeper that reveals the next preimage after a request. The contract, not the keeper, is the verification authority.

Live parameters
NetworkRobinhood Chain mainnet
Chain ID4663
Oracle (TorinoxEntropy v10)0xd8a0680e7699526b57140ed4eafdcc7219dc0a0c
Provider / keeper0x8741b8a825644D9Ef18Faf2DAB5e9b47B900F2b6
Feeexact 0.000025 ETH via getFeeV2()
Refund delay6 L1 blocks (~60-90s)
Hash chain length500,000 registered
SDK@diceprotocol/sdk
Agent paid path$0.05 USDG fixed over x402

Commit-reveal hash chain

The provider builds a Keccak256 chain from a secret seed and registers the commitment (live registered length: 500,000). Reveals walk the chain in reverse. Anyone can hash a reveal and check it against the stored commitment. Future values stay unknown while the seed stays private.

seed → h1 = Keccak256(seed) → h2 = Keccak256(h1) → ... → h500000 = commitment
Reveal order: h500000 first, then h499999, ...

Request, reveal, callback

  1. Consumer calls requestV2(provider, userRandom, gasLimit) with msg.value exactly equal to getFeeV2().
  2. Contract emits a request event and stores the request.
  3. Keeper submits the next preimage via revealWithCallback.
  4. Contract verifies the preimage, combines user and provider contributions, and calls entropyCallback(seq, provider, random).
  5. If no reveal arrives, the requester can call refundRequest after refundDelayBlocks = 6 L1 blocks (~60-90s).

Final random word

Torinox returns a full bytes32. Apps map that word in deterministic code. There is no onchain min/max parameter.

randomNumber = Keccak256(userRandomness ‖ providerContribution)

Under the stated model, neither side unilaterally picks the word when the commitment holds and the provider seed stays secret. A provider can still withhold service; that is a liveness issue handled by refund, not by inventing a result.

What is not in the contract

  • No proxy and no upgrade path on TorinoxEntropy v10.
  • Single designated provider on the live deployment.
  • Keeper liveness is operational, not cryptographically enforced.
  • Latency of ~1-3 seconds is observed operations language, not an SLA.

Addresses

Oracle 0xd8a0680e7699526b57140ed4eafdcc7219dc0a0c

Provider 0x8741b8a825644D9Ef18Faf2DAB5e9b47B900F2b6

Integration samples: /docs/quickstart/. Verification steps: /docs/verification/.

Home · RNG for Robinhood Chain · Docs · Architecture · Security · SDK · x402 · GitHub