Gas Configurations
Now that you understand how dVRF works and have created your subscription, it’s time to configure gas settings properly. Gas configuration is crucial because it determines both your callback performance and minimum balance requirements. Getting this right ensures reliable random number delivery while managing costs effectively.
Why Gas Configuration Matters
- Performance: Higher gas settings = faster callback execution during network congestion
- Cost Control: Optimized settings prevent overpaying while ensuring reliability
- Fee Awareness: Each request is charged the higher of a USD-denominated baseline fee or a premium applied to the estimated network cost. Factor this into your deposit planning and alert thresholds.
- Minimum Balance: Your gas settings directly calculate the required minimum balance
- Request Success: Insufficient gas settings can cause callback failures
Chain Specific Gas Configuration
EVM Chains
Supra dVRF in EVM chains has four gas parameters configured at two levels. If per contract configurations not set, it will inherit values from subscription level limits.
Subscription Level (Required)
- Max Gas Price: Highest gas price you’ll pay for any callback
- Max Gas Limit: Maximum gas limit for any callback execution
Per-Contract Level (Optional )
- Callback Gas Price: Gas price for specific contract (≤ maxGasPrice)
- Callback Gas Limit: Gas limit for specific contract (≤ maxGasLimit)
Change via UI
You are prompted to set these value at the subscription creation stage. You can also modify them later from the menu.
Change via On chain functions
// Setting subscription-level at the time of subscription creation
addClientToWhitelist(maxGasPrice, maxGasLimit);
// Setting per-contract customization at contract addition
addContractToWhitelist(contractAddress, callbackGasPrice, callbackGasLimit);
// Update maximum gas price
updateMaxGasPrice(newMaxGasPrice);
// Update maximum gas limit
updateMaxGasLimit(newMaxGasLimit);
// Update specific contract's gas price
updateCallbackGasPrice(contractAddress, newGasPrice);
// Update specific contract's gas limit
updateCallbackGasLimit(contractAddress, newGasLimit);Verification Gas: Additional gas consumed by BLS signature verification and random number generation on-chain. This is automatically added to your callback gas limit during minimum balance calculation.
How fees are calculated
The effective fee charged per dVRF request on each chain is the maximum of two components:
- Baseline — a USD-denominated floor of $0.01 per request, converted to the chain’s native token. The native-token equivalent is recalibrated periodically as the token’s price moves, so the USD floor is maintained across market conditions.
- Premium — the percentage shown in the table below, applied on top of the estimated network cost for fulfilling the request. The premium covers callback gas, infrastructure, and operational overhead.
The fee at request time is whichever of the two is higher.
Premium by chain
https://docs.supra.com/dvrf/learn-supra-dvrf/networks
💡 Effective fee per request =
max( Baseline_USD_in_native, estimatedNetworkCost × (1 + Premium %) )
💡 To retrieve the current effective fee, always call the on-chain fee function before submitting a request.
Deposit Balance Alerts
The system automatically sends email notifications when your deposit balance drops to critical levels:
- 300% of minimum balance: Early warning - good time to plan your next deposit
- 100% of minimum balance: Critical alert - new requests will be blocked soon
- 25% of minimum balance: Final warning - immediate action required
💡 Good news: These alert thresholds can be changed via UI to match your operational needs.
Dev tips for better experience
- Start Conservative: Begin with higher limits, optimize down over time
- Test Thoroughly: Always test your callback gas usage before production
- Monitor Actively: Set up alerts for deposit balance warnings at matching threshold levels via UI
- Update Regularly: Adjust settings based on network conditions and usage patterns
- Plan for Peaks: Account for network congestion during high-demand periods