Symptom
When submitting two or more transactions in quick succession (approve → burn, or approve → deposit), the second transaction is rejected with:
replacement transaction underpriced
This happens even when each tx uses the same gas price returned by eth_gasPrice, because Arc Testnet's RPC returns a stale/cached baseline that the node's mempool considers already "used."
Root cause
Arc's eth_gasPrice endpoint returns a fixed or slowly-updating value. The mempool enforces a minimum increment between successive transactions from the same sender, but the RPC doesn't reflect this. Standard clients that trust eth_gasPrice will always underprice the second tx.
Workaround
Apply a 30% upward premium to the gas price returned by the RPC and reuse the same bumped price for all transactions in a batch:
const feeData = await provider.getFeeData();
const gasPrice = (feeData.gasPrice * 130n) / 100n; // +30%
const approveTx = await usdc.approve(spender, amount, { gasPrice });
await approveTx.wait();
const burnTx = await messenger.depositForBurn(...args, { gasPrice }); // same bumped price
References
- Tracked in arc-node#87
- Fix in this repo:
getBumpedGasPrice() helper in src/lib/bridge.ts
Symptom
When submitting two or more transactions in quick succession (approve → burn, or approve → deposit), the second transaction is rejected with:
This happens even when each tx uses the same gas price returned by
eth_gasPrice, because Arc Testnet's RPC returns a stale/cached baseline that the node's mempool considers already "used."Root cause
Arc's
eth_gasPriceendpoint returns a fixed or slowly-updating value. The mempool enforces a minimum increment between successive transactions from the same sender, but the RPC doesn't reflect this. Standard clients that trusteth_gasPricewill always underprice the second tx.Workaround
Apply a 30% upward premium to the gas price returned by the RPC and reuse the same bumped price for all transactions in a batch:
References
getBumpedGasPrice()helper insrc/lib/bridge.ts