This content applies to WaaS 1.0 only. We highly recommend that you upgrade to WaaS 2.0.
Value | Status | Description |
---|---|---|
401 | BROADCASTING | Broadcasting a transaction |
402 | BROADCAST_FAILED | Transaction failed to be broadcast on chain |
403 | PENDING_CONFIRMATION | Transaction has been broadcast but not yet confirmed |
- The fee for an RBF transaction needs to be 15% higher than the original transaction fee.
- If you have already created an RBF transaction and wish to further increase the transaction fee, we highly recommend creating a new RBF transaction based on the latest transaction, rather than directly applying RBF to the original transaction. This ensures a higher transaction fee for your new transaction, increasing its likelihood of acceptance by miners.
- We also support reapplying RBF to the original transaction. In this case, please note that the fee for the latest RBF transaction must be at least 15% higher than that for the previous RBF transaction.
Code Samples
Speeding up MPC transactions with RBF
If your transaction is experiencing delays in being confirmed on the blockchain, you can use RBF to accelerate the process. This allows you to resend the same transaction with a higher fee to replace the original one.Canceling MPC transactions with RBF
You can use RBF to cancel an original transaction by setting the transaction amount in the new RBF transaction to zero, ensuring that the receiving address matches the sending address, and simultaneously increasing the transaction fee. This will render the new RBF transaction invalid while providing sufficient information to cancel the original transaction.Locating a transaction to apply RBF when there are multiple unconfirmed transactions for a single address
- Retrieve all unconfirmed transactions under the given address that have a status of 402 or 403 (Note: RBF can also be applied to transactions with a status of 401, but as transactions with a 401 status will transition to 402 or 403 shortly, there is no need to filter transactions with a 401 status).
- Locate all unconfirmed transactions with statuses 501 and 900, identify the transaction among these that has the largest nonce. The nonce of the transaction you are trying to locate should then be this nonce + 1.
- Apply RBF to the identified transaction using a higher transaction fee.
- Verify whether the RBF transaction has been broadcast on the blockchain and confirmed by miners. If not, reapply RBF to the identified transaction.
Feel free to share your feedback to improve our documentation!