2023-07-23

Respect tree is a primitive that can be used by a fractal with non-transferrable Respect to:

All of this using a single smart contract that implements a simple tree data structure, where nodes are weighted by Respect votes.

Each node has the following attributes:

The root node has a total weight equal to the current supply of Respect of a fractal (Respect is assumed to be non-transferrable). The balance table of the root node is the balance table of Respect.

Anyone can create a child node for any node.

Any account with non-zero Respect can vote on the child node. They can choose the amount of Respect to vote with. They can vote for multiple child nodes. The total Respect distributed by an account to the child nodes must not be more than the balance of that account in the parent node.

The account balance in the child node is equal to the Respect votes for that node by that account.

Example