Skip to content

fix: F-2026-18815 | SVM Client Omits Relayer-Paid Recipient ATA Rent From GasFeeUsed - #338

Merged
0xNilesh merged 1 commit into
audit-fixesfrom
F-2026-18815
Aug 26, 2026
Merged

fix: F-2026-18815 | SVM Client Omits Relayer-Paid Recipient ATA Rent From GasFeeUsed#338
0xNilesh merged 1 commit into
audit-fixesfrom
F-2026-18815

Conversation

@Aman035

@Aman035 Aman035 commented Aug 26, 2026

Copy link
Copy Markdown
Member

Blocked on the gateway change. Do not merge until the gateway creates the recipient ATA.

The UV prepended CreateAssociatedTokenAccountIdempotent with the relayer as payer for legacy SPL withdraw / revert / rescue. That rent (2,039,280 lamports) sits outside the gateway instruction, so gas_used never counts it and transfer_gas_fee_to_caller never 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 the ata_created pattern already used for the CEA ATA. The quote already reserves the headroom, so no fee change is needed.

  • Removes the prepend for legacy SPL paths.
  • Removes the execute-mode block, which was already dead (!isNative && false).
  • Removes buildCreateATAIdempotentInstruction, now unused, and its misleading comment about reimbursement via gas_fee.
  • No gas accounting change here: GasFeeUsed already comes from the event's gas_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.

@0xNilesh
0xNilesh merged commit 5b50e76 into audit-fixes Aug 26, 2026
7 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants