Skip to content

Conversation

@JoeGruffins
Copy link
Member

@JoeGruffins JoeGruffins commented Jan 6, 2026

closes #3468, closes #3467, closes #3404

Unsure why we are using the server's max fee regardless atm but maybe there is a good reason. But, it is making trades fail for me on mainnet and I am unable to do anything about it atm.

@JoeGruffins JoeGruffins changed the title eth: Use use set gas limit. eth: Use user set gas limit. Jan 6, 2026
@JoeGruffins JoeGruffins force-pushed the maxgas branch 2 times, most recently from 88277ba to 95f0e8a Compare January 6, 2026 08:47
@JoeGruffins JoeGruffins marked this pull request as draft January 6, 2026 08:55
@JoeGruffins
Copy link
Member Author

It's still not using the max gas I set...

@JoeGruffins
Copy link
Member Author

I guess I only changed values before the swap actually happens. It is still using the server suggested fee for max gas fee.

@JoeGruffins JoeGruffins force-pushed the maxgas branch 2 times, most recently from 0b19332 to 3ca4c04 Compare January 7, 2026 08:36
@JoeGruffins
Copy link
Member Author

JoeGruffins commented Jan 7, 2026

Gas can go over 2000.

image

@JoeGruffins JoeGruffins force-pushed the maxgas branch 3 times, most recently from 9ed4fe2 to 010c688 Compare January 8, 2026 02:17
@JoeGruffins JoeGruffins marked this pull request as ready for review January 8, 2026 02:38
@JoeGruffins JoeGruffins force-pushed the maxgas branch 2 times, most recently from 508bcae to e508c00 Compare January 9, 2026 02:14
@JoeGruffins
Copy link
Member Author

@JoeGruffins JoeGruffins force-pushed the maxgas branch 2 times, most recently from 628a21d to 30e58b0 Compare January 9, 2026 08:57
@JoeGruffins
Copy link
Member Author

I'm just realizing that core is already asking the node for a fee if not a swap initialization. I think what I'm doing is correct but probably the code can be cleaned up with some things changed in core. Will think about it some more.

@JoeGruffins JoeGruffins force-pushed the maxgas branch 2 times, most recently from c1dc204 to c3d9d66 Compare January 12, 2026 06:45
@JoeGruffins
Copy link
Member Author

JoeGruffins commented Jan 12, 2026

I think it makes the most sense now. Just ask wallet what the user max is and use that. Error if it's lower than the server.

The more important change is actually erroring for all assets if fee at trading time is more than what the max was when the order was made. I don't think it is correct to try and create transactions we expect to fail because of the current fee.

The user set max fee was only used to compare with the server suggested
fee and did not apply to trades. Use the user set max fee when funding
starts. Also error in core if current fees are higher than the set max.
We should not created swaps that are not expected to be mined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

USDT: Cannot increase max fee. trading: USDT fee too low Failing gas estimates on polygon and rbf

1 participant