steemit / steem

The blockchain for Smart Media Tokens (SMTs) and decentralized applications.
https://steem.com
Other
1.95k stars 790 forks source link

Require irreversible registration for certain transactions involving newly created accounts #1144

Open theoreticalbts opened 7 years ago

theoreticalbts commented 7 years ago

Suppose we have the following situation:

Then suppose Eve performs the following attack:

Basically anything that involves an account but doesn't require the account's signature (for example the to account in transfer_operation) needs to TaPoS on a block in which the account was registered. So for example Alice needs to TaPoS on block 100.

But the wallet shouldn't blindly accept whatever registration exists in the chain at the moment it's broadcast, it could be that the fork happened between the point in time Alice decided to transfer the STEEM to Bob and the time Alice clicked the "submit" button or pressed Enter to finalize the transfer.

The safest thing to do is for Alice to wait until Bob's been irreversibly created. It also wouldn't hurt for Alice to wait for a fixed amount of wall-clock time as well (i.e. Alice won't transfer to any account younger than 15 minutes old).

The proper place to add this check is in the wallet.

theoreticalbts commented 7 years ago

This check should be disabled for operations in the same transaction as the one that creates the account.