Skip to content

perf(erc20spl-cached): gate recipient-ATA create in _transfer (~17K CU)#238

Merged
anil-rome merged 1 commit into
masterfrom
perf-ata-gate
Jun 15, 2026
Merged

perf(erc20spl-cached): gate recipient-ATA create in _transfer (~17K CU)#238
anil-rome merged 1 commit into
masterfrom
perf-ata-gate

Conversation

@anil-rome

Copy link
Copy Markdown
Contributor

Summary

Measured saving

  • 17,387 CU per transfer-to-existing-holder (~6% of a ~290K wrapper transfer) — isolated A/B on Hadrian (ungated 212,458 → gated 195,071).

Composition safety

Test plan

…A exists

Gates ensure_token_account(to) behind an overlay-aware try SplCached.account
check (same pattern as approve), skipping the redundant idempotent create_ata
round-trip on transfer-to-existing. ~17,387 CU saved per transfer (~6%);
fresh-recipient auto-create preserved via the catch branch. Scoped to _transfer.
Composition verified against the M0 balance-delta pattern; real-V3 mint/swap
smoke is the pre-merge gate.
@anil-rome anil-rome merged commit a6c147c into master Jun 15, 2026
9 checks passed
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.

1 participant