Migrate from Pyth Entropy
On Base, a Pyth Entropy request costs 0.000015 ETH, about $0.029, at any callback gas limit up to 500,000. Randoo's ten latest Base requests cost about $0.0057 each, service fee and gas together, and each was fulfilled within 2 seconds. Pyth's median on Base was 8 blocks, about 16 seconds.
Randoo does not take Pyth's IEntropyV2 calls, so a Pyth consumer changes its request and its callback, about ten lines, shown in Port a Pyth Entropy consumer. Pyth Entropy runs on 13 mainnets and Randoo on Ronin, Base and Robinhood, so Base is the network both serve.
Randoo vs Pyth Entropy on Base
The prices come from Base mainnet on 2026-11-13 at block 56,814,657, at a network gas price of 0.006 gwei, with ETH at $1,937 from Chainlink's ETH/USD feed. Pyth's price is its contract's getFeeV2(gasLimit). Randoo's is what the coordinator charged for its ten latest Base fulfillments (blocks 56,158,163 to 56,567,133, callback limits of 100,000 and 250,000, light callbacks), converted at the same ETH price. Pyth's timing comes from its contract's Requested and Revealed events for the 49 requests between blocks 56,540,093 and 56,808,595, at Base's 2-second blocks.
| Pyth Entropy | Randoo | |
|---|---|---|
| Contract on Base | 0x6E7D74FA7d5c90FEF9F0512987605a6d546181Bb | 0xC66eB2e7EE91145875000Ad46B55600000000001 |
| Price at 100,000 to 500,000 callback gas | 0.000015 ETH (about $0.029) at every limit | About 0.000003 ETH ($0.0057) charged |
| Price at 1,000,000 callback gas | 0.00002 ETH (about $0.039) | Grows only with the gas your callback uses |
| Paying more than the price | Not refunded | The unused prepayment goes back to your refund address at fulfillment |
| Time to fulfill | Median 8 blocks (16 s); 2 to 66 blocks across the 49 requests | 0 to 2 s across the ten requests |
| What the number comes from | The provider's next hash-chain value, committed in advance, hashed with a contribution from the caller | A VRF proof from the oracle's key over the request block hash, request ID, consumer and key hash |
| What the contract checks | That the revealed value hashes to the provider's previous one | The VRF proof, with Chainlink's VRF.sol verifier |
| Callback gas | Provider default 500,000 on Base; custom limits round up to a multiple of 10,000 | 50,000 to 2,500,000 |
| Networks | 13 mainnets, including Base, Arbitrum, Optimism and Monad | Ronin, Base, Robinhood |
On Randoo, each 100,000 gas your callback uses adds about 0.0000006 ETH (about $0.0012) at 0.006 gwei, so a callback that uses 500,000 gas still costs less than Pyth's flat price. Pyth's IEntropyV2 interface says value sent above getFeeV2 is not refunded.
Where Pyth Entropy is the better pick
- Your game runs on a chain Randoo does not serve. Pyth's Fortuna chain config lists Kraken Ink, Arbitrum, Base, Soneium, Sonic, HyperEVM, Abstract, Optimism, Etherlink, ApeChain, Berachain, Kaia and Monad.
- You want the caller to contribute to the number. With
requestV2(provider, userRandomNumber, gasLimit), the result depends on a value your contract supplies as well as on the provider's. A Randoo seed depends on the oracle's key and the request block hash, which the oracle does not control. - Your callback needs more than 2,500,000 gas. Pyth accepts custom limits far above that.
Neither design stops a provider from seeing the result before it publishes it. Pyth's protocol design page says a provider can compute the number off chain before it reveals, and a Randoo oracle knows the seed before it fulfills. Neither can deliver a different number. Pyth's provider committed to its hash chain in advance, and a VRF proof admits one output per input. Randoo requests never expire, and its oracles take turns until one fulfills (Fees and failures).
Port a Pyth Entropy consumer
| Pyth Entropy | Randoo |
|---|---|
IEntropyConsumer | RandooConsumerRonin, the base contract in the quickstart |
getEntropy() returns the Entropy address | The constructor takes 0xC66eB2e7EE91145875000Ad46B55600000000001 |
getFeeV2(gasLimit) | estimateRequestRandomFee(gasLimit, tx.gasprice) |
requestV2{value: fee}(gasLimit) returns a uint64 sequence number | _requestRandomness(fee, gasLimit, tx.gasprice, refundAddress) returns a bytes32 request hash |
entropyCallback(uint64 sequenceNumber, address provider, bytes32 randomNumber) | _fulfillRandomSeed(bytes32 reqHash, uint256 randomSeed) |
A coin flip on Pyth Entropy, with the request and callback from Pyth's docs:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {IEntropyConsumer} from "@pythnetwork/entropy-sdk-solidity/IEntropyConsumer.sol";
import {IEntropyV2} from "@pythnetwork/entropy-sdk-solidity/IEntropyV2.sol";
contract CoinFlip is IEntropyConsumer {
uint32 private constant CALLBACK_GAS = 100_000;
IEntropyV2 private immutable entropy;
mapping(uint64 => address) public player;
mapping(uint64 => bool) public heads;
constructor(address entropy_) {
entropy = IEntropyV2(entropy_);
}
function flip() external payable returns (uint64 id) {
uint256 fee = entropy.getFeeV2(CALLBACK_GAS);
require(msg.value >= fee, "fee");
id = entropy.requestV2{value: fee}(CALLBACK_GAS);
player[id] = msg.sender;
}
function entropyCallback(uint64 id, address, bytes32 randomNumber) internal override {
heads[id] = uint256(randomNumber) % 2 == 0;
}
function getEntropy() internal view override returns (address) {
return address(entropy);
}
}The same game on Randoo. Deploy it with 0xC66eB2e7EE91145875000Ad46B55600000000001 as the constructor argument:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {RandooConsumerRonin} from "./RandooConsumerRonin.sol";
import {IRoninVRFCoordinatorForConsumers} from "./interfaces/IRoninVRFCoordinatorForConsumers.sol";
contract CoinFlip is RandooConsumerRonin {
uint256 private constant CALLBACK_GAS = 100_000;
mapping(bytes32 => address) public player;
mapping(bytes32 => bool) public heads;
constructor(address coordinator) RandooConsumerRonin(coordinator) {}
function flip() external payable returns (bytes32 id) {
uint256 fee = IRoninVRFCoordinatorForConsumers(vrfCoordinator).estimateRequestRandomFee(CALLBACK_GAS, tx.gasprice);
require(msg.value >= fee, "fee");
id = _requestRandomness(fee, CALLBACK_GAS, tx.gasprice, msg.sender);
player[id] = msg.sender;
}
function _fulfillRandomSeed(bytes32 id, uint256 seed) internal override {
heads[id] = seed % 2 == 0;
}
}- Request IDs become
bytes32request hashes, so mappings keyed byuint64change their key type. - On Base, declare
tx.gasprice, the requesting transaction's own gas price. Fees and failures has the rule for each network. - The fourth argument is the refund address. Here the player gets back what the fulfillment does not use.
- Both versions keep any value sent above the fee. Return it to the player if that matters to your game.
- If the callback reverts or runs out of gas, the request still counts as fulfilled and the coordinator stores the seed.
seedOf(reqHash)returns it, so finish the outcome in a separate function. Pyth records a failed callback in itsRevealedevent and lets anyone run it again withrevealWithCallback(when a VRF callback reverts).
Both contracts compile with Solidity 0.8.38, and the Randoo version passes a request-and-fulfill test against the mock coordinator in the integration playbook.
Try it on Base Sepolia
Roll a free seed on Base Sepolia (chain ID 84532) in the playground without a wallet, then check it on /verify. VRF on Base compares Randoo with Chainlink VRF v2.5 on the same network.
Updated 2026-11-22.