Skip to content

[evm] Allow Token transferOut to Burst Over Max Gas

Ursa (9R) requested to merge ursa/evm-gas-limits into develop

Resolves #1867 (closed). Requirements are:

  1. Continue to prevent Bifrost from lowering the gas rate to accommodate higher gas usage transactions (!3333 (merged))
  2. Avoid token transactions (SNX/XRUNE/AAVE) that use over 100k gas units from being stuck unable to sign since the total fee exceeds max gas
  3. Avoid increasing the outbound fee by 3x for all users via the naive solution of increasing the MaxGasLimit

Thornode has no awareness of the extra gas units required for aggregator and swap out transactions and extending it to do so would be significant complexity and lift. Since aggregator swap outs already ignore max gas, this extends that behavior to also ignore max gas for swaps to tokens (up to a configured factor).

This also has a minor change to use the 2/3 of the outbound rate as the lower bound instead of the raw outbound rate (1.5x what Bifrost reported). This way the 1.5x multiplier is just used as a buffer when the on chain rate increases between the consensus rate at time of outbound creation and current rate at the time of signing. This will slightly offset the recent fee increase when we updated the gas limit 80k -> 100k in the network fee.

Publishing this for review now, but have yet to audit myself to have high confidence this will not cause any matching issues on the outbound matching in thornode - this should be considered with care.

Edited by Ursa (9R)

Merge request reports