Accelerate Transactions
Overview
During periods of high transaction volume, transactions with lower fees might get stuck waiting for confirmation in the mempool. If this happens, you can accelerate the transaction by creating a new transaction with a higher fee. The new transaction replaces the original in the mempool and has a higher probability of being mined more quickly, since miners and validators are economically incentivized.
Transaction acceleration differs between UTXO and account-based assets.
Ethereum, and other EVM blockchains, allow for only one transaction per nonce from a single address. A nonce is a sequential counter for transactions sent from an account. Therefore, you can accelerate a stuck transaction by rebroadcasting the same transaction with the same nonce but with a higher fee.
Prerequisites
- Get Started
- Initiate a withdrawal (see Withdraw Overview).
Build Acceleration Transaction
Endpoints:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
export COIN="<ASSET_ID>" export WALLET_ID="<YOUR_WALLET_ID>" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" export NONCE="<NONCE_OF_STUCK_TRANSACTION>" export MAX_FEE_PER_GAS="<HIGHER_MAX_FEE_PER_GAS>" export MAX_PRIORITY_FEE_PER_GASE="<HIGHER_MAX_PRIORITY_FEE_PER_GAS>" export WALLET_PASSPHRASE="<YOUR_WALLET_PASSPHRASE>" curl -X POST \ https://app.bitgo-test.com/api/v2/$COIN/wallet/$WALLET_ID/tx/initiate \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -d '{ "type": "acceleration", "nonce": "'"$NONCE"'", "eip1559": { "maxFeePerGas": "'"$MAX_FEE_PER_GAS"'", "maxPriorityFeePerGas": "'"$MAX_PRIORITY_FEE_PER_GASE"'" }, "walletPassphrase": "'"$WALLET_PASSPHRASE"'", "recipients": [...] # Use the exact recipients array from the original transaction }'
Step Result
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
{ "txRequestId": "string", "version": 0, "latest": true, "walletId": "string", "walletType": "cold", "enterpriseId": "string", "state": "initialized", "date": {}, "createdDate": {}, "userId": "string", "initiatedBy": "string", "updatedBy": "string", "intent": { "feeOptions": { "unit": "baseUnit", "formula": "fixed", "feeType": "base", "gasLimit": 0, "gasPrice": 0 }, "intentType": "acceleration", "txid": "string", "sequenceId": "string", "comment": "string", "nonce": "string", "hopParams": { "gasPriceMax": 0, "paymentId": "string", "userReqSig": "string" }, "receiveAddress": "string", "senderAddressIndex": 0 }, "intents": [ { "intentType": "stake", "sequenceId": "abc123", "comment": "string", "nonce": "string", "memo": "string", "stakingRequestId": "string", "poolKeyHash": "string" } ], "pendingApprovalId": "string", "isCanceled": true, "unsignedTxs": [ { "serializedTxHex": "string", "signableHex": "string", "derivationPath": "string", "feeInfo": { "feeString": "string", "fee": 0 }, "coinSpecific": {}, "parsedTx": { "minerFee": "string", "spendAmount": "string", "spendAmounts": [ { "coinName": "string", "amountString": "string" } ], "payGoFee": "string", "outputs": [ { "address": "string", "isPayGo": true, "value": 0, "wallet": "string", "walletV1": "string", "baseAddress": "string", "enterprise": "string", "valueString": "string", "data": "string", "change": true, "coinName": "string" } ], "inputs": [ { "derivationIndex": 0, "value": 0, "address": "string", "valueString": "string", "chain": 0, "index": 0 } ], "type": "string", "memo": "string" } } ], "signatureShares": [ { "from": "user", "to": "user", "share": "string" } ], "commitmentShares": [ { "from": "user", "to": "user", "share": "string", "type": "commitment" } ], "txHashes": [ "string" ] }
Next
Acceleration transactions follow the transaction flow of their wallet type, and must receive all required signatures and approvals before before broadcasting to the blockchain. To learn more, see Withdraw Overview
After receiving all required signatures and approvals, BitGo broadcasts the transaction to the blockchain. You can view your completed transaction in BitGo or on a blockchain explorer. For UTXO assets, the blockchain explorer may also identify the transaction with an RBF or CPFP flag. Once your accelerated transaction is confirmed on chain, BitGo updates the status of the original transaction to Replaced
.