Fee Bump Transaction
Represents a Fee Bump Transaction in the Stellar network.
Fee bump transactions allow you to increase the fee of a previously submitted transaction that may be stuck in the queue due to insufficient fees. This is useful when network fees spike unexpectedly or when you need to prioritize a transaction.
How Fee Bumps Work
A fee bump transaction wraps an existing transaction (the "inner transaction") and specifies a new, higher fee. The fee bump transaction has its own source account (the "fee source") which pays the additional fee. This allows a different account to sponsor the fee increase.
Important Rules
The inner transaction must NOT already be a fee bump transaction
The new fee must be higher than the inner transaction's fee
The inner transaction can have any number of operations (1-100)
The fee bump adds one additional "operation" for fee calculation purposes
Both the inner transaction and fee bump transaction require signatures
Fee Calculation
When using base fee (recommended):
maxFee = (baseFee × (numInnerOperations + 1)) + sorobanResourceFeeThe "+1" accounts for the fee bump operation itself.
Usage Example
// Original transaction stuck due to low fee
val originalTx = TransactionBuilder(sourceAccount, Network.PUBLIC)
.addOperation(PaymentOperation(...))
.setBaseFee(100)
.build()
originalTx.sign(sourceKeypair)
// Create fee bump to increase priority
val feeBump = FeeBumpTransaction.createWithBaseFee(
feeSource = "GFEE...", // Account paying the additional fee
baseFee = 1000, // New base fee (must be higher)
innerTransaction = originalTx
)
// Sign with fee source account
feeBump.sign(feeSourceKeypair)
// Submit the fee bump transaction
horizonServer.submitTransaction(feeBump)Network Behavior
If the inner transaction has already been applied, the fee bump will fail
If the inner transaction is in the queue, it will be replaced by the fee bump
The fee source account must have sufficient balance to cover the fee increase