I would like to know how I can detect bitcoin transactions that are mixed by Mixers' services? Is there any sample code or sample set or any applicable example in this regard?
Bitcoin Stack Exchange is a question and answer site for Bitcoin users, developers, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
Most of the transactions are 5 inputs, 5 outputs and use equal amounts (0.001, 0.01, 0.05 and 0.5). So we need to scan all blocks for such transactions and assume they belong to Samourai Whirlpool coinjoin implementation.
One project already exists which can make it easier to visualize and undertstand this: https://github.com/zeroleak/whirlpool-live
API can be used to check coinjoin transactions that are not confirmed yet and in mempool using https://wasabiwallet.io/api/v4/btc/ChaumianCoinJoin/unconfirmed-coinjoins
snicker-finder.py can be used to find Joinmarket coinjoin transactions in blocks.
A project that helps in scanning coinjoin transactions for different coinjoin implementations:
&& mostFrequentEqualOutputCount >= 10 // At least 10 equal outputs. && inputCount >= mostFrequentEqualOutputCount // More inptu than outputs. && mostFrequentEqualOutputValue.Almost(Constants.ApproximateWasabiBaseDenomination, Constants.WasabiBaseDenominationPrecision) // The most frequent equal outputs must be almost the base denomination. && uniqueOutputCount >= 2; // It's very likely there's at least one change and at least one coord output those are distinct.
&& inputCount == 5 // Always have 5 inputs. && outputCount == 5 // Always have 5 outputs. && outputValues.Distinct().Count() == 1 // Outputs are always equal. && Constants.SamouraiPools.Any(x => x == poolSize) // Just to be sure match Samourai's pool sizes.
Example: Bitcoin Fog