Wiki Home

Credentials Dependency Graph

Analyze possible optimization



Credential reissuance

How Wasabi currently works

Wasabi implements a mechanism that allows to register outputs in parallel. That is, a ways to break/consolidate credentials in order to get the exact number of credentials with the exact value and vsize necessary to register the outputs.

Imagine we have two inputs {7; 3} and want to split the total amount in outputs {3; 3; 2; 1; 1;} , then it needs to:

  1. break the 3btc credential by two new credential of 2btc and 1btc
  2. break the new 2btc credential is two new credentials of 1btc and 1btc
  3. break the 7btc credential in two new credencials of 5btc and 2btc
  4. change the new 1btc and 5btc in two new credentials of 3btc and 3btc

After this 4 steps we have all the credentials that we need to redister the 5 outputs in parallel. However, note that the credential reissuance process requires, many times, to finish one reissuance before starting others.

It worth to note that there are multiple ways to get the exact same set of credentials, for example this is equivalent but requires one less reissuance:

Alternative implementation for Wasabito

It could worth to explore an alternative system where there is not a credential reissuance concept nor mechanism for the only purpose of breaking/consolidating credentials but instead, have this as part of the output registration mechanism.