Zero Balance Account #402
Replies: 4 comments 2 replies
-
So then the faucet could still be drained by creating a ton of accounts, and the only difference is that at least there is no incentive for the attackers to do this.
Do you mean that it will suddenly count the account storage and the first access key into the storage cost and refund it on deletion? If so, it will negate the whole effort that malicious actors will just add a couple of extra steps of deploying an empty contract and then deleting the account. |
Beta Was this translation helpful? Give feedback.
-
What would be the incentive to delete implicit accounts that are no longer needed? If there is none, and because deleting costs gas, an app that needs single-use implicit accounts for one or another reason would be rational to create but never delete implicit accounts. Thereby increasing the chain state potentially forever.
Detail: I think we would be better off burning tokens rather than gas, in order to not reduce max throughput. |
Beta Was this translation helpful? Give feedback.
-
Today in order for an account to exist onchain, it must maintain a minimum balance due to storage staking. For an account with one key, the minimum balance is 0.0182N. This makes it difficult for applications or wallets to create account for their users because there is an upside to be had by attacking the faucet that does the account creation: by creating and deleting accounts, a malicious attacker can siphon 0.0182N per account off of the faucet. This was why the NEAR wallet (now MyNEARWallet) stopped creating accounts for new users, which made the onboarding experience much less pleasant for new users.
We can fix this problem by allowing zero balance accounts to exist on chain. More specifically, creating an account with one key does not require storage staking and instead the cost is merged into the transaction cost (~182Tgas and can potentially be lowered since this amount is fully burnt). If the account deploys a contract later and start to accrue data on the smart contract, the storage staking mechanism would kick in the same way as how it works today.
One open question is whether adding additional keys triggers storage staking.
Beta Was this translation helpful? Give feedback.
All reactions