Fees and failures
Fee
Each request prepays this amount in the network's native token:
fee = quoteServiceFee() + bufferedGasPrice × (callbackGasLimit + ADDITIONAL_GAS) + L1 data feeestimateRequestRandomFee(callbackGasLimit, gasPrice) returns it. The Chainlink wrapper's calculateRequestPriceNative and estimateRequestPriceNative return the same amount; the requestRandomWordsInNative reference shows how to call them. Sending less reverts with InsufficientFee. Sending more is fine, because the excess comes back with the refund.
quoteServiceFee()is the service fee. It is a USD amount converted at the network's price feed, RON/USD on Ronin and ETH/USD on Base and Robinhood. If the feed's last price is more than 7 days old, requests revert. The coordinator fixes the fee at request time. Pricing lists the fee on each network.bufferedGasPriceis your declared gas price plusgasPriceBufferBps(), which is 10% on Ronin and Saigon and 25% on Base and Robinhood. If it is belowminRequestGasPrice(), the request reverts withInvalidGasPrice. The owner can change both values, so read them live.ADDITIONAL_GAS()is 500000. It covers proof verification and payment, which run outside your callback.- The L1 data fee covers posting the fulfill transaction to L1 on Base and Robinhood. It is zero on Ronin.
Which gas price to declare
| Network | Declare |
|---|---|
| Ronin, Saigon | 23 gwei |
| Base, Base Sepolia, Robinhood, Robinhood Testnet | tx.gasprice in the requesting transaction, or the network gas price when you quote off chain |
On every network the coordinator bills the fulfillment's gas at the lower of the buffered declared price and the price the oracle's transaction pays, and refunds the rest. On Base and Robinhood it adds the fulfill's L1 data fee. Declaring more than needed only prepays more until the refund arrives.
On Ronin and Saigon the oracle's transaction pays about 22 gwei. On Ronin that is the 20 gwei base fee plus a 2 gwei tip. On Saigon it is the 1 gwei base fee plus the 20 gwei minimum tip. 23 gwei is 25.3 gwei after the 10% buffer, so it covers that and clears the 21 gwei floor (minRequestGasPrice()).
The oracle caps its own transaction at (2 × base fee + 20 gwei) × 1.15, and waits while that cap is more than 3 times the buffered declared price. At 23 gwei the cap stays under that line until Ronin's base fee passes 23 gwei; it has been 20 gwei for millions of blocks. If cast gas-price ever reports more than 22 gwei, declare that price plus 1 gwei. The oracle replaces a stuck transaction at most 3 times, raising the price 1.25 times each time.
Native Ronin VRF's convention, 20e9 + block.basefee * 2, also works on Randoo. It declares 60 gwei on Ronin and prepays about 3 times the gas the fulfillment needs; the coordinator refunds the difference after the fulfillment.
On Base and Robinhood a request declared below the chain's current gas price waits until the price falls. A Ronin-style declaration of 20 gwei still works there, but it prepays thousands of times the gas the fulfillment needs until the refund arrives. Chainlink wrapper requests always price at tx.gasprice.
Refunds
After the callback, the coordinator returns the part of the prepayment that the service fee and the oracle's gas did not use.
- A Ronin-interface refund goes to the request's refund address. If that transfer fails, the coordinator credits the amount to the refund address, which pulls it with
withdraw(to). - A Chainlink wrapper refund goes to the consumer if it accepts ETH, and to the network's treasury otherwise.
Callbacks
- The coordinator calls your callback once, with exactly
callbackGasLimitgas (50,000 to 2,500,000). Outside that range the request reverts withGasLimit. How to set a VRF callback gas limit has a Foundry test that finds the least gas your callback needs. - If your callback reverts or runs out of gas, the fulfillment still succeeds. The coordinator keeps the service fee, refunds the unused prepayment, and stores the seed. For a Ronin-interface request,
seedOf(reqHash)returns(seed, fulfilled, callbackOk); for any request,requests(requestId)holds the same fields. Finish the outcome from that seed in a separate function, likesettlein Loot box with VRF. The coordinator never replaces it, and only a D20DAO request can have it delivered again, through D20DAO'sretryCallback. When a VRF callback reverts compares this with Chainlink VRF, native Ronin VRF, Pyth Entropy and D20DAO. - If the oracle's transaction has too little gas to forward
callbackGasLimit, the fulfill reverts withNotEnoughGasand the request stays open. The oracle then retries with more gas.
Timing
- Ronin-interface and D20DAO requests wait 1 confirmation, so the oracle can fulfill from the block after the request. Chainlink wrapper requests choose 1 to 200 confirmations (how many to use).
- Requests never expire and cannot be canceled. Oracles take turns until one fulfills (what other providers do with an unanswered request).
- A blockhash store (
storeBlockhashandstoreVerifyHeader, callable by anyone) keeps each request's block hash available after the EVM's 256-block limit. A late fulfillment produces the same seed as a prompt one, so waiting cannot re-roll a result.
Updated 2026-11-28.