Updated Adapter - Boba Transaction Fees v2.0.1

Fixes a major bug that causes Boba transaction fees to appear much lower than they actually are Boba Network Transaction Fees Adapter - CryptoStats

Thanks for the fix!

Can you explain what the bug is? I see you’ve added gasPrice: 1 to the estimateGas calls, what does that change add?

By the way, I’m previewing the change with our fancy new diff viewer:

https://cryptostats.community/discover/diff/QmT4chc2YLBGPqoGPespsU6L516qHbzvJCCuVzsQ9azjZP/QmQ23WSZ5iJyvf5sEWUATYwtxnu1JzYZTeBBUeijSWp4xU

Boba recently changed their fee model (moving away from Optimism’s original fee model). Part of the fee model is that additional gas is added to the transaction to account for the L1 fee. This additional gas is dynamic and depends on the current L1 gas price. However, this additional gas is not added if the gasPrice is zero (which it is by default when estimating gas). See here: boba/state_transition.go at e4cac483c5ae9f1ad45200df333e730a1b18054f · bobanetwork/boba · GitHub

As a result, the cost of a Boba transaction was being significantly under-estimated. Adding gasPrice: 1 forces the additional gas to be added and makes the estimate accurate again.

Thanks for the explanation, makes sense.

I’ve gone ahead and verified it!