In recent years, there has been an explosion of interest in staking and DeFI. When designing Rosetta, we considered seamless interaction with staking mechanisms and powerful contracts to be a critical feature. To provide first-class support for these paradigms, the rosetta-specifications define a very expressive notion of accounts that can be used in blockchain data and in account balance queries.
In blockchains with generalized smart contracting, the notion of account state can be much more nuanced than a single token balance at a single height at a single address. The rosetta-specifications introduce the sub-accounts to allow developers to identify state that is specific to a certain contract or lockup restriction (i.e. delegated stake or payment channel). It is possible to specify an account's sub-account in any block operation, in a request to get a balance, and in transaction construction.
Updated 8 months ago