Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(relayer): profitability changes #18124

Merged
merged 10 commits into from
Sep 17, 2024
Merged

fix(relayer): profitability changes #18124

merged 10 commits into from
Sep 17, 2024

Conversation

cyberhorsey
Copy link
Contributor

@cyberhorsey cyberhorsey commented Sep 17, 2024

used to have to multiply by 1.05 for padding, no longer necessary with previous bridge fee changes. Legacy code, now removed.

As well, the optimism txmgr defines it's fee calculation as:

// calcGasFeeCap deterministically computes the recommended gas fee cap given
// the base fee and gasTipCap. The resulting gasFeeCap is equal to:
//
//	gasTipCap + 2*baseFee.
func calcGasFeeCap(baseFee, gasTipCap *big.Int) *big.Int {
	return new(big.Int).Add(
		gasTipCap,
		new(big.Int).Mul(baseFee, two),
	)

So we should use baseFee * 2, not baseFee,when determining profitability.

@cyberhorsey cyberhorsey changed the title fix(relayer): no need to multiply by 1.05 anymore fix(relayer): profitability changes Sep 17, 2024
@cyberhorsey cyberhorsey added this pull request to the merge queue Sep 17, 2024
Merged via the queue into main with commit 10eb73c Sep 17, 2024
7 checks passed
@cyberhorsey cyberhorsey deleted the relayer_profitability branch September 17, 2024 23:55
dantaik pushed a commit that referenced this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants