What determines verification gas cost for vrf v2? I understand from the documentation that the gas limit is hardcoded at 200,000 but how is the actual cost calculated?

1 Answer 1


For Chainlink VRFv2, there are two cost considerations when it comes to the oracle gas cost (the LINK paid):

  1. The premium
  2. A calculation based on the price of the L1's gas costs at the moment. See a link to the Chainlink contracts here.

The premium you can find in the Chainlink docs, and it's just some flat value added to requests so that node operators have an incentive to have uptime.

The calculation is so that when gas prices get volatile, node operators are still able to cover the costs of returning data to contracts, since the nodes are paying the gas costs themselves.

A note on gas limit, the callbackGasLimit is actually a value that the user can select. However, there are "gas lanes" for calls, where a call will not be created if the gas price is higher than the threshold of the lane. You can specify the lane using that lane's keyhash.

ETH Mainnet example (as of writing)

200 gwei Key Hash   0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef

500 gwei Key Hash   0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92

1000 gwei Key Hash  0x9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded86805
  • Will the "Premium" ever go down/up based on the current LINK price? e.g today the .25 LINK premium roughly equals $1.8, but if LINK goes back to its all time high price of around $50 that same call would cost $12.5 (just for the premium). I am working on a project that is estimating a total need of 4,000 LINK for 10k VRFv2 calls -- would we be better off buying all the LINK now that the price is low or does Chainlink constantly update the LINK premium to account for price movement?
    – luxo
    May 20 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.