3

What are the special accounts ACCOUNT_ZERO, ACCOUNT_ONE, and root account? It's not clear from the Ripple wiki what they are meant for. A little explanation would be nice.

What makes these accounts "special?"

5

The root account is the account that owns the XRP in the initial ledger.

ACCOUNT_ZERO is an account whose 160-bit identifier is zero. When dealing with a currency/issuer pair, ACCOUNT_ZERO is used as both the currency and the issuer to indicate XRP.

ACCOUNT_ONE is an account whose 160-bit identifier is one. ACCOUNT_ONE is used in cases where no account is applicable but the currency is not XRP. For example, in a ripple balance node between two accounts, the "balance" belongs equally to both accounts and is really a property of the two of them. It has an issuer of ACCOUNT_ONE.

ACCOUNT_ONE is also sometimes used as a flag in internal arithmetic operations to indicate that non-XRP semantics are desired. XRP amounts are stored as integer drops (millionths of an XRP) while other currency's amounts are stored in exponential notation. Sometimes an amount isn't in any particular currency (for example, when outputs and inputs are divided to compute an offer's quality). To indicate non-XRP semantics without having a valid currency, ACCOUNT_ONE is used. It essentially means "not XRP".

  • So essentially all the XRP starts out as belonging to the root account and is distributed from there. Does this mean that the root account still owns most of the XRP (as of this date)? And looks like ACCOUNT_ZERO and ACCOUNT_ONE are just special values, they're not actual accounts with any balance in them. – Manish Apr 27 '13 at 22:17
  • The root account has long since been emptied. And yes, they are just special values, not actual accounts. You could never create them because you'd need a key that hashed to 0 or 1. Good luck finding one. – David Schwartz Apr 27 '13 at 23:22
  • Does this mean that, if someone, by an incredible amount of luck, happens to generate a key for one of these accounts, he will be a rich man? – Steven Roose Aug 14 '14 at 0:09
  • 1
    @StevenRoose Probably not, but if he happens to generate a key for an account that holds a lot of funds, then he will be. – David Schwartz Aug 25 '14 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.