Migrate from Ronin VRF
Your consumer already works with Randoo. It is the same IRoninVRFCoordinatorForConsumers interface — requestRandomSeed, estimateRequestRandomFee, rawFulfillRandomSeed — so the migration is one address:
The whole migration
// before — native Ronin VRF
new LootBox(0x16a62a921e7fec5bf867ff5c805b662db757b778); // mainnet
new LootBox(0xa60c1e07fa030e4b49eb54950adb298ab94dd312); // Saigon
// after — Randoo (same address on mainnet AND Saigon)
new LootBox(0xC66eB2e7EE91145875000Ad46B55600000000001);No code changes, no re-audit of your consumer, no new SDK. Deploy your existing VRFConsumer with the Randoo coordinator address and requests flow the same way — for half the service fee ($0.005 vs $0.01), quoted by the same estimateRequestRandomFee call.
Consumer · unchanged
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {VRFConsumer} from "@ronin-chain/ronin-random-beacon/contracts/consumer/VRFConsumer.sol";
contract LootBox is VRFConsumer {
uint256 public lastSeed;
constructor(address _vrfCoordinator) VRFConsumer(_vrfCoordinator) {}
function roll() external payable returns (bytes32 reqHash) {
reqHash = _requestRandomness(
msg.value,
250_000,
20e9 + block.basefee * 2,
msg.sender
);
}
function _fulfillRandomSeed(
bytes32 /* reqHash */,
uint256 randomSeed
) internal override {
lastSeed = randomSeed;
}
}What stays the same
- The consumer base contract and callback signature.
- Pay-per-request in RON with msg.value; leftover refunded.
- Billing at your declared gasPrice (plus a 10% buffer applied at request time), never the fulfiller's actual tx fee. Recommended:
20e9 + block.basefee * 2. - Proofs verified on-chain by the same audited Chainlink VRF verifier.
What is different under the hood
- Half the service fee: $0.005 per request instead of $0.01.
- One coordinator address on both networks, so configs and scripts need no per-chain address table.
- Different seed derivation (bound to the request blockhash) — seeds are not comparable across the two coordinators, only their guarantees are.
- If your consumer is not payable, set
refundAddressto an EOA.