anon icon indicating copy to clipboard operation
anon copied to clipboard

Design linking mechanism to link fixed/reward/variable trees together.

Open drewstone opened this issue 5 years ago • 1 comments

When people move between the various fixed and variable trees, we still want some way of linking them up, so that the underlying asset remains the same inside the trees linked together.

I should have a design for how we should link these together so that we ensure no mixing of asset types occurs.

drewstone avatar Jan 25 '21 14:01 drewstone

Since the difference between these trees is just their leaves, we could use the same tree for fixed deposits, rewards, and variable deposits and expose different functions for each leaf type as:

  1. Proving to know a fixed amount leaf and inserting another variable amount leaf into the same tree
  2. Proving to know a variable amount leaf and adding another 2 variable amount leaves into the same tree (or combining 2 leaves into one) -- (can be any number, not just 2)
  3. Proving to know a variable amount leaf and withdrawing into some account

lazovicff avatar Jan 25 '21 15:01 lazovicff