Change structure to a tree/graph-based token architecture
Instead of relying to "token famililies", tokens could contains a tree of "subtokens" which usage is permissioned by the parent token. The whole yggdrasil will be a tree with a unique root token managing the update rules (proof of work/stake/etc).
Instead of having family scripts, we rely on a "family script" containing the tree of all tokens of this "family". To manipulate these tokens we need to comply to update rules defined by the "family token".
Tokens could have multiple parents if they satisfy multiple properties, making this structure a token DAG.
Each token define :
- how it can be created (permissionned delegated creation)
- how it can be destroyed (with all of its subtokens)
- how it can be updated (itself or its subtokens)
- how it can be provided (without modifications or destruction)
When subtokens are created/destroyed/updated, the parent token is updated, and the update script is verified.