Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Too easy to burn tokens #7787

Closed
Closed
@garious

Description

Problem

If a transaction references a system account that doesn't yet exist, the runtime creates one automatically. The "feature" introduces two problems:

  1. A transfer to a public key with a typo will succeed, effectively burning all tokens by accident.
  2. It's not available to arbitrary programs, which require a space parameter. Consequently, we see CreateAccount being used with an unused from key and zero lamports, suggesting CreateAccount is doing too much. It's an Allocate and a Transfer, when only an Allocate is needed.

Proposed Solution

  • Remove the automatic account creation feature.
  • Add new instruction Allocate, which should be the same as CreateAccount, but with no from or lamports parameters. Consider removing CreateAccount.

cc: @rob-solana @aeyakovenko

Metadata

Assignees

No one assigned

    Labels

    locked issuestale[bot only] Added to stale content; results in auto-close after a week.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions