fix: F-2026-18815 | SVM Client Omits Relayer-Paid Recipient ATA Rent From GasFeeUsed - #338
Merged
Conversation
0xNilesh
added a commit
that referenced
this pull request
Aug 26, 2026
Keeps both sides: #338's removal of the recipient-ATA create and its NoRecipientATACreate test, plus this branch's parked-recipient sentinel resolution and tests.
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.
Blocked on the gateway change. Do not merge until the gateway creates the recipient ATA.
The UV prepended
CreateAssociatedTokenAccountIdempotentwith the relayer as payer for legacy SPL withdraw / revert / rescue. That rent (2,039,280 lamports) sits outside the gateway instruction, sogas_usednever counts it andtransfer_gas_fee_to_callernever reimburses it. The relayer is out of pocket per fresh recipient, and the recipient can close the ATA afterwards to reclaim the rent.Per the auditor: the gateway creates the ATA and meters the rent into
gas_used, reusing theata_createdpattern already used for the CEA ATA. The quote already reserves the headroom, so no fee change is needed.!isNative && false).buildCreateATAIdempotentInstruction, now unused, and its misleading comment about reimbursement viagas_fee.GasFeeUsedalready comes from the event'sgas_used, so the rent is picked up once the gateway includes it.Ordering. Gateway first, this second. The reverse breaks fresh-recipient withdrawals. Merging the gateway before this is safe: the UV's idempotent create simply runs first and the gateway's becomes a no-op.
Tests. Offline regression asserting an SPL withdraw and revert build to exactly
[computeLimit, gatewayIx]with no instruction targeting the ATA program. Mutation checked by reinstating the prepend.