Increase Gas
Speeds up a pending blockchain transaction by sending a replacement with the same data but higher gas price.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Client ID - The client ID from the Create Client node.
- Hash - The transaction hash to speed up (must start with "0x").
- Gas Price - The new gas price in hexadecimal format (must be higher than the original).
- Gas Limit - The gas limit for the replacement transaction.
Output
- Hash - The transaction hash of the replacement transaction with higher gas price.
How It Works
The Increase Gas node creates a replacement transaction to speed up confirmation. When executed, the node:
- Retrieves the original pending transaction
- Creates a new transaction with:
- Same nonce (replaces original)
- Same destination address
- Same value (amount being sent)
- Same input data (same operation)
- Higher gas price (to prioritize)
- Signs the replacement transaction
- Broadcasts it to the network
- Returns the new transaction hash
Requirements
- The original transaction must still be pending (not confirmed)
- Gas price must be higher than the original (typically 10-30% higher)
- Sufficient wallet balance to cover gas fees
- Same wallet that sent the original transaction
Error Handling
The node will return errors for:
- Invalid or missing Client ID
- Client not found
- Invalid hash format (must start with "0x")
- Transaction not found or already confirmed
- Gas price not in hex format or not higher than original
- Insufficient balance for gas fees
- Network connection issues
How Gas Replacement Works
Nonce Replacement:
- Uses the same nonce as the original transaction
- Higher gas price makes it more attractive to miners
- Only one transaction with a given nonce can confirm
- The transaction with higher gas price typically confirms first
- Original transaction is dropped when replacement confirms
Usage Notes
- Only works for pending transactions (not yet mined)
- New gas price should be meaningfully higher (10-30% recommended)
- Both transactions have the same effect if confirmed
- Only one will confirm (miners choose the higher paying one)
- The replacement costs gas based on new gas price
- Original transaction becomes invalid after replacement confirms
Example
Speeding up a slow transaction:
Inputs:
- Client ID:
7e8f9a0b-1c2d-3e4f-5a6b-7c8d9e0f1a2b - Hash:
0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef - Gas Price:
0x00000000000000000000000000000000000000000000000000000f2b9ec5200(65 GWEI, up from 50 GWEI) - Gas Limit:
65000
Output:
- Hash:
0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890
Gas price calculation:
originalGasPrice = 50 GWEI
increasedGasPrice = 65 GWEI // 30% increase
gasPriceHex = toWEI(65) // Convert to hex
Common Use Cases
Accelerating Transfers: Speed up pending ETH or token transfers.
Urgent Contract Calls: Prioritize important smart contract interactions.
Time-Sensitive Operations: Ensure transactions confirm before deadlines.
Gas Price Corrections: Fix transactions sent with too-low gas prices.
Market Opportunities: Speed up trades or swaps to catch price movements.
Competitive Transactions: Increase priority in high-competition scenarios (NFT mints, etc.).
Gas Price Strategies
Recommended increases:
- Modest speedup: 10-15% higher
- Normal speedup: 20-30% higher
- Fast speedup: 50-100% higher
- Urgent speedup: 100-200% higher
Examples:
original = 50 GWEI
modest = 50 * 1.12 = 56 GWEI // 12% increase
normal = 50 * 1.25 = 62.5 GWEI // 25% increase
fast = 50 * 1.75 = 87.5 GWEI // 75% increase
urgent = 50 * 2.0 = 100 GWEI // 100% increase
Complete Speed-Up Flow
- Check Status - Verify transaction is pending
- Get Transaction - Retrieve original details
- Estimate Gas Price - Get current network gas price
- Calculate Increase - Add 20-30% to original or use current price
- To WEI - Convert to hex format
- Increase Gas - Send replacement
- Monitor - Track both transaction hashes
- Verify - Confirm replacement succeeded
Monitoring After Increase
Track both transactions:
originalHash = "0x1234..."
replacementHash = "0xabcd..."
// Monitor which confirms
while (true) {
originalReceipt = getTransactionReceipt(originalHash)
replacementReceipt = getTransactionReceipt(replacementHash)
if (replacementReceipt) {
// Replacement confirmed - success!
processResult(replacementReceipt)
break
} else if (originalReceipt) {
// Original confirmed first - same effect
processResult(originalReceipt)
break
}
wait(5000)
}
When Speed-Up Succeeds
If replacement confirms first:
- Original transaction is dropped
- Desired operation completes
- Paid higher gas price
- Effect is the same as original
If original confirms first:
- Replacement transaction is dropped
- Desired operation still completes
- Paid original gas price
- Speed-up attempt unnecessary but harmless
Cost Analysis
Additional cost:
originalCost = originalGas * originalPrice
replacementCost = replacementGas * newPrice
additionalCost = replacementCost - originalCost
// Example:
// Original: 65000 gas * 50 GWEI = 3,250,000 GWEI = 0.00325 ETH
// Replacement: 65000 gas * 65 GWEI = 4,225,000 GWEI = 0.004225 ETH
// Additional: 0.000975 ETH (~30% more)
When worth it:
- Time-sensitive operations
- Value of quick confirmation > additional cost
- Preventing missed opportunities
- Business-critical transactions
Increase Gas vs Cancel Transaction
Use Increase Gas when:
- You still want the transaction to execute
- Just need it faster
- Same operation is still needed
- Willing to pay more for speed
Use Cancel Transaction when:
- Don't want transaction anymore
- Parameters were wrong
- Situation changed
- Want to save on failed operation
Best Practices
Before increasing gas:
- Verify transaction is still pending
- Check current network gas prices
- Calculate total cost with new gas
- Ensure sufficient wallet balance
- Confirm operation is still needed
Choosing gas increase:
- Check current network congestion
- Consider urgency level
- Balance speed vs cost
- Use 20-30% increase as baseline
- Go higher for urgent situations
After sending:
- Store both transaction hashes
- Monitor confirmation status
- Don't send multiple replacements rapidly
- Wait for one to confirm
Multiple Speed-Ups
If first attempt doesn't work:
- Can send another replacement with even higher gas
- Each replacement uses same nonce
- Highest gas price likely confirms
- Each attempt costs gas if it confirms
Recommended approach:
- Wait 30-60 seconds between attempts
- Increase gas price significantly each time (50-100%)
- Limit to 2-3 attempts
- After that, wait for confirmation or use Cancel Transaction
Network Considerations
Ethereum Mainnet:
- High competition for block space
- Gas prices vary significantly
- May need substantial increases (50-100%)
- Check gas trackers for current prices
Layer 2 / Sidechains:
- Lower competition
- Smaller increases usually sufficient (10-20%)
- Faster confirmation times
- Lower overall costs
Error Recovery
"Transaction not found"
- Already confirmed
- Invalid hash
- Dropped from mempool
"Cannot increase gas"
- Insufficient balance
- Gas price too low
- Transaction already mined
Replacement didn't confirm
- Gas increase wasn't enough
- Original confirmed first (acceptable)
- Try again with higher gas
For time-sensitive transactions, monitor network gas prices and add at least 30% to ensure quick confirmation. Check current network conditions at ethgasstation.info or similar services.
Both the original and replacement transactions cost gas if they confirm. In practice, only one confirms, but budget for the higher gas price.
Increasing gas maintains the same transaction effect while prioritizing execution. Both the original and replacement do the same thing if confirmed.
Optimal Gas Pricing
Formula for competitive gas price:
currentNetworkPrice = estimateGasPrice()
yourOriginalPrice = getTransaction(hash).gasPrice
minimumIncrease = yourOriginalPrice * 1.1 // 10% minimum
optimalPrice = Math.max(
minimumIncrease,
currentNetworkPrice * 1.2 // 20% above current
)
This ensures your replacement is competitive with both your original and current network conditions.