Gelato's Fee Oracle
How to get a quote for your relay fee before sending the request
After reading this page:
You'll understand how to query the fee oracle using either the SDK or the API directly and which methods/endpoints are available.
You'll learn the difference between different fee modalities and trade offs: for example, allowing your user to sign off on a maximum fee they are willing to pay helping account for gas volatility, or allowing them to sign off on the exact fee but with a higher risk of non-execution.
You can query our fee oracle before the relay request to get an overall estimated fee (gas costs + Gelato fee) for your relay request.
Querying via the SDK
SDK method: isOracleActive
Arguments:
chainId
: the chain ID of the network on which to check if the fee oracle is active.
Return Object:
true/false
: depending on the status of the fee oracle on the requested network.
SDK method: getPaymentTokens
Arguments:
chainId
: the chain ID of the network where you want to check if the fee oracle is active there.
Return Object:
An array of strings listing all accepted payment tokens on the requested network.
SDK method: getEstimatedFee
Arguments:
chainId
: the chain ID of the network where you want to check if the fee oracle is active there.paymentToken
: the address of the token you would like to pay in.gasLimit
: a custom gas limit for your transaction, please remember to add an overhead for Gelato Relay's contract calls and security checks.
Return Object
The value of your estimated fee, including gas costs + gelato fee on top.
Querying via the API
Last updated