Usage for DApps
This guide walks you through integrating and using the FAST RPC into your DApp to obtain preconfirmations for Ethereum transactions.
Point your application to the FAST RPC
To start using the FAST RPC, configure your application or wallet to use the following RPC endpoint:
This replaces your standard Ethereum RPC URL (e.g., from Infura or Alchemy).
Deposit funds in the gas tank
Before submitting transactions through the FAST RPC, you must fund your gas tank. This is an internal balance used to pay for preconfirmation bids. Use the following RPC method to initiate the deposit process: mevcommit_estimateDeposit
. This call returns:
- A deposit address (Ethereum address owned by the FAST RPC service),
- A bid amount, representing the cost of confirming your initial deposit. Once you receive these details, fund the deposit address by sending a regular EOA transfer as described in the next step to the deposit address. The deposited amount will be the amount you send minus the bid amount.
The deposit transaction will already be preconfirmed in the same way as all future transactions via the RPC.
Submit transactions
You can send transactions via the FAST RPC as usual using eth_sendRawTransaction
.
Since fees are handled via mev-commit using the gas tank, the priority fee of the transaction should always be set to 0. To reflect this, the method eth_maxPriorityFeePerGas
of the RPC therefore always returns 0.
Monitor preconf status
To monitor the transaction status, you can as usual use the method eth_getTransactionReceipt
. The FAST RPC will already return a receipt once a preconfirmation is obtained from all providers and if the next block proposer is opted in.
For more detailed information, you can also call mevcommit_getTransactionCommitments
. This method takes the transaction hash as input and returns the commitments received for that transactions on the mev-commit network. This can be useful for advanced decision making in case eth_getTransactionReceipt
does not return a receipt, e.g., if the block proposer is not opted in or if some, but not all, providers have committed to a transaction.
Additional Features
Checking current deposit balance
The balance available in the deposit for future transactions can be checked using mevcommit_getBalance
. Once this balance runs low, it should be topped up as in the initial deposit described above.
Checking for opted in validators
The RPC only issues preconfs via eth_getTransactionReceipt
if the next block proposer is opted into mev-commit. The DApp may therefore want to adjust its strategy based on whether the next proposers are opted in or not. To enable this, the FAST RPC provides the endpoint mevcommit_optedInBlock
, which returns the time in seconds until the next block with a mev-commit opted-in proposer.