Skip to content

Deduct ATA creation cost from client fee when payment address ATA is missing #377

@dev-jodee

Description

@dev-jodee

When a Kora node operator's payment address does not have an ATA for an accepted fee token (e.g., USDC), the client currently cannot safely use createAssociatedTokenIdempotent because the ATA creation cost would be borne entirely by the client.

Proposal: If the payment address ATA does not exist at transaction time, Kora should:

Allow the client to include a createAssociatedTokenIdempotent instruction for the destination ATA

Deduct the ATA creation rent cost from the client's fee payment amount

This makes createAssociatedTokenIdempotent safe to use in the SDK's paymaster flow without unfairly charging the client for the operator's missing ATA. The operator is still responsible for maintaining ATAs via kora rpc initialize-atas, but this provides a graceful fallback.

  • This should be a config the node operator can decide to enable or disable

Acceptance criteria:

Kora detects when the payment address ATA does not exist for the fee token

ATA creation rent cost is subtracted from the client's fee amount

Existing flow (ATA already exists) is unaffected

SDK can safely use createAssociatedTokenIdempotent without extra client cost

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions