1

As I understand it, CoinJoin is a method to aggregate multiple transactions into a single transaction, mostly for privacy purposes.

  • How does this aggregation affect the total size of the transactions? I believe it contains the same number of inputs and outputs, but I wonder if the total size decreases due to reducing some overhead.
  • How many transactions can be aggregated? I believe there is a cap on the transaction size, which will limit the total number of inputs and outputs.
  • For the maximal number of inputs/outputs, what will be the total size with and without CoinJoin?
  • Are there additional factors which might affect the CoinJoin transaction size?
1

Status Quo

The CoinJoin transaction only has a minimally reduced blockspace requirement in comparison to the unaggregated transactions:

Transaction sizes (example is P2PKH) can be calculated by the following formula:

 size = #inputs * 148 bytes + #outputs * 34 bytes + 10 bytes

By combining multiple transactions only the 10 bytes of the transaction overhead will be saved, the inputs and outputs will require the same amount of space as in the separate transactions before.

The transaction size is limited by the blocksize, however transactions bigger than 100kB are non-standard.

Outlook Schnorr Signatures

The latter will change with the planned introduction of Schnorr signatures and the subsequent possibility of signature aggregation. Schnorr signatures have the nice feature that multiple signatures can be combined into one.

Hence, more inputs on one transaction would reduce the blockspace requirement in the following fashion. Assuming the signature is about half of the input size (it's 72 bytes of 148 for P2PKH) you would get:

inputSizeTotal(n inputs) = 1 * inputSize + (n - 1) * ¹/₂ * inputSize

For n → ∞ you'd half the inputSizeTotal. ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.