Repository navigation
Reserve high fee when computing ramp sell max - #6260
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
peachbits
previously requested changes
Oct 15, 2026
Sell providers lock the deposit amount when the quote is created, and the user sends it minutes later at the standard fee. The max was priced at the standard fee, so any fee refresh in between left the locked amount plus the new fee above the balance, and the locked amount could not be lowered. Price the max at the high fee to keep a cushion; the send itself still pays the standard fee.
j0ntz
force-pushed
the
jon/paybis-max-sell-v2
branch
from
October 16, 2026 08:33
cf44c8a to
576b80e
Compare
j0ntz
dismissed
peachbits’s stale review
October 16, 2026 16:05
The requested change (limit the high fee reserve to native sends) was answered on the resolved thread: token sells hit the same gap between the quoted fee and the fee at send time, so the reserve applies to them too. The land is approved through the task's Force Land field.
j0ntz
enabled auto-merge
October 16, 2026 16:05
Contributor
Author
|
Landing this without a review.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Selling the max ETH balance through a ramp could fail at the final send with "Insufficient ETH". Paybis, MoonPay and Banxa lock the deposit amount when the order is created, and the user sends it minutes later. The max was priced at the standard fee, leaving room for exactly one standard fee. A QA device log showed the base fee rising 9% across one 10 minute fee poll; when that happens between the quote and the send, the send cannot be paid for and the locked amount cannot be lowered.
getMaxSpendExchangeAmountprices the max at thehighfee option. The send itself still pays the standard fee, so the difference stays in the wallet as dust. Token sells are unaffected, since their max is the token balance.Asana: Max Sell v2 fix with real Paybis account
Testing: a second test account with Paybis KYC was funded with 0.0062 ETH. Sell ETH MAX quoted 0.00619671 ETH against a 0.00620017 ETH balance, reserving 3.46e-6 ETH (gas up to about 0.165 gwei, with the base fee at 0.116). The send scene charged the standard fee of 2.57e-6 ETH and the slide reached Transaction Success (tx
0xbdef0139222b83f512eee9283bd34d4cd613e585dce2b0197091824dba1fe3e2). Frames 1-6 are the pre-fix repro run; 7-12 are the fixed build.CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Test evidence
cf44c8aReserve high fee when computing ramp sell max
2026-10-14
1. fund send armed
2. fund send success
3. paybis review max
5. repro send calculating fee
6. repro send armed
7. repro after slide
8. fund2 send armed
9. fund2 send success
10. fixed max quote
11. fixed paybis review
13. fixed send armed
14. fixed send success
Note
Low Risk
Small change to ramp sell max calculation only; slightly lower max quotes on native-coin sells with no impact on the actual send fee tier.
Overview
Fixes max sell on Paybis, MoonPay, and Banxa failing with insufficient funds when the network fee increases between quote and send.
Ramp sell orders lock the deposit amount at creation while the actual send happens later at the standard fee.
getMaxSpendExchangeAmountinRampCreateScenenow callsgetMaxSpendablewithnetworkFeeOption: 'high'so the quoted max reserves extra native balance for fee drift; the send still pays the standard fee and any difference stays as dust. Token max sells are unchanged.Reviewed by Cursor Bugbot for commit 576b80e. Bugbot is set up for automated code reviews on this repo. Configure here.