In a recent post we summarized the changes coming in the Velocity Hardfork, including a section on how new accounts will be created on the blockchain level. Internally, we have been preparing to transition our account creation services over to the new system which will be based on discounted account creation tokens as soon as the hardfork takes place. In today’s post, we want to share our technical notes with the community so that other parties who are interested in creating accounts after the Velocity Hardfork will know how to best use the new system.
On September 25th, pending a supermajority vote of the Steem witnesses, the Steem protocol will receive an upgrade we are referring to as Hardfork 20 and which has the codename: Velocity. That upgrade will include fundamental changes in how new accounts get created—in how we enable people to gain their initial stake and become Steemians. While what is included below is mostly important for developers and technically sophisticated users who are interested in creating accounts for other people, we believe there is also value for the average Steemian to gain some insight into the mechanics of how things are done at the blockchain level.
This post is fairly technical and it is not at all necessary for the average Steemian to completely understand the details. That being said, we also understand that Steemians are not the average internet user. Most importantly they have a stake in the very protocol that powers the applications they love so much, as they have STEEM that is powered up into Steem Power.
The Steem blockchain has rules hardcoded into it which dictate on the protocol level the relationship between the amount of Steem Power an account has and the amount of influence that account has over the distribution of funds in the ecosystem. While the new user may have a very small stake, they still have some stake, which is far more than anyone can say about the vast majority of Facebook, Twitter, or Instagram users.
Who is admitted into our special community, and how they are admitted, is relevant information for every Steemian, small stakeholder or large. Designing and building systems like these represents the majority of what we spend our time doing at Steemit. While you don’t have to understand what all of it means, we invite you to at least get a sense of how it all functions.
Updates to the Account Creation Fee
Currently, the blockchain is taking the
account_creation_fee that is set by the witnesses and multiplying it by 30x to get the cost of creating a non-delegated account. After the Velocity Hardfork, the
account_creation_fee value will no longer be multiplied by 30x to get the cost of creating an account. The cost of creating an account will simply be the
account_creation_fee value set by the witnesses.
As soon as the Velocity Hardfork takes place, there will be a one-time update made to each of the
account_creation_fee values set by the witnesses, multiplying them each by 30x. This one-time update is to prevent the fee from dropping by 30x as soon as the Hardfork takes place, since they will no longer be multiplied by 30x when calculating the cost of an account.
To illustrate with an example, if the account creation fee just prior to the hardfork is 0.1 STEEM, then the cost of creating an account prior to the Hardfork would be 3.0 STEEM. As soon as the Hardfork takes place, the account creation fee would be updated to 3.0 STEEM, making the cost of creating a new account after the Hardfork still 3.0 STEEM.
Discontinued Use of Delegated Account Creation
As part of the Velocity Hardfork, the
account_create_with_delegation operation will no longer be supported. Account creation services should no longer use this method to create accounts after the Hardfork takes place.
If an account creation service would still like to provide a delegation of Steem Power to the accounts they create, they can still follow the account creation operation with an additional call to
delegate_vesting_shares to add a delegation of SP to the account.
Non-Discounted Account Creation
After the Velocity Hardfork, the
account_create operation will support the creation of non-discounted accounts. Non-discounted accounts will be created by paying the entire
account_creation_fee in STEEM.
When a non-discounted account is created, the
account_creation_fee will be deducted from the account creator’s STEEM balance and burned.
The fee that is paid when calling the
account_create operation must match the
account_creation_fee exactly. Attempts to call
account_create with more or less than the exact amount of
account_creation_fee will be rejected.
The creation of non-discounted accounts will also be supported using the same two-step process that will be described below for creating discounted accounts. It may be beneficial for account creation services to begin using the new two-step process for non-discounted accounts, even though it is technically more steps and will use slightly more RCs compared to calling just the one
account_create operation. The reason is that the new methods that are being added are more flexible than the
account_create operation, which means that if we decide to make any additional enhancements to the account creation system in the future - they may only be supported via the new methods.
Discounted Account Creation
After the Velocity Hardfork, account creation services will have the option to create discounted accounts. A discounted account is one where the fee is paid using Resource Credits (RCs) instead of burning STEEM.
The number of discounted accounts that are available, as well as the rate at which they replenish, will both be set by the witnesses.
Creating a discounted account is done in two steps. The first step is to claim a discounted account. The second step is to use the claimed account to create a new account.
Claiming Discounted Accounts
A discounted account can be claimed using the
claim_account operation. When an account calls
claim_account, the blockchain will deduct the cost of the claimed account (in RCs) from the caller’s RC balance, and increment their
pending_claimed_accounts balance by one. This
pending_claimed_accounts balance will be used in the following step to create the account.
When calling the
claim_account operation, the caller has the option to pay the fee in STEEM (which will be burned) instead of using RCs, using the optional
fee parameter. This will allow account creation systems that want to follow the same two-step process regardless of whether they are paying for the account with RCs or burned STEEM to do so if they choose. The alternative (which is also supported) is to use
account_create when creating non-discounted accounts (as described above), and only use the two-step process when creating discounted accounts.
If the caller does not have sufficient RCs (or STEEM if they are using the optional
fee parameter) to cover the cost of the
claim_account operation, the operation will be rejected. Any call to
claim_account that uses the optional
fee parameter, must use a fee exactly equal to the current
account_creation_fee, or it will be rejected. If the global
available_account_subsidies does not have any available discounted accounts remaining, the operation will be rejected.
Creating Claimed Accounts
pending_claimed_accounts balance will reflect the number of discounted accounts that have been successfully claimed using the
claim_account operation. Pending claimed accounts are not transferable to other users, but they do not expire, and there is no limit on how many an account can hold. (Well, technically speaking there is a limit of 9,223,372,036,854,775,806, but we do not expect anyone to reach it anytime soon.)
When an account has a non-zero balance of
pending_claimed_accounts, they can call
create_claimed_account to create a new account. Calling
create_claimed_account will decrement the caller’s
pending_claimed_accounts balance by one, and create the new account.
The structure and syntax of the
create_claimed_account operation is identical to
create_account, except there is no
fee field, since the fee was already paid when the
claim_account operation was called.
We hope that those who are interested in using the new discounted account creation system will find this information helpful. We will also be adding the two new discounted account creation methods (
create_claimed_account) to the developer portal very soon. If you have any additional questions about how this new account creation system will work, please let us know.