solana-labs / solana

Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.
https://solanalabs.com
Apache License 2.0
13.21k stars 4.29k forks source link

Too easy to burn tokens #7787

Closed garious closed 3 years ago

garious commented 4 years ago

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

cc: @rob-solana @aeyakovenko

aeyakovenko commented 4 years ago

Remove the automatic account creation feature.

This isn't super workable though. You can't automatically create spending addresses without pre-registration.

To solve 1, Bitcoin and other protocols use a checksum.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 3 years ago

This stale issue has been automatically closed. Thank you for your contributions.

vpontis commented 2 years ago

@aeyakovenko were checksums introduced into Solana? I Googled "Solana checksum" and this was the first relevant post.

What's the best way of confirming that an address is a valid Solana address?

vstoykovbg commented 2 years ago

A transfer to a public key with a typo will succeed, effectively burning all tokens by accident.

This is shocking. Solana addresses do not have a checksum (like other cryptocurrencies)?

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs.