Bitcoin Forum
April 30, 2024, 05:26:52 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: utxotrack  (Read 95 times)
albert0bsd (OP)
Hero Member
*****
Offline Offline

Activity: 850
Merit: 660



View Profile WWW
September 02, 2023, 12:51:38 AM
Last edit: September 22, 2023, 10:26:55 PM by albert0bsd
Merited by ABCbits (8), TryNinja (4), hugeblack (4), EFS (2), Daltonik (2), NotATether (2), DdmrDdmr (1)
 #1

Hey everyone.

Lately I get some interest about Bitcoin transaction privacy. I've been testing various scenarios on the testnet, and I've come to realize that it can be quite challenging to determine if your UTXOs share previous TXIDs or addresses in common. Manual tracking can be especially tricky.

Here are a couple of resources I found that might be helpful:

Know Your Coin Privacy (KYCP):
https://kycp.org/
https://oxt.me/

However, please note that these resources still require some manual searching, and the results may not always be conclusive at first sight

To address this challenge and assist me in selecting the right UTXOs for certain transactions having considering the privacy and other factors, I develop a small and not complex script in python Utxotrack available on github

This script works seamlessly on both the Bitcoin mainnet and testnet. Currently, it's a standalone script, but I plan to expand its functionality in the future if you like it.

The main idea is to identify any instances where transactions share reused addresses or TXIDs across different levels of their ancestry. It's a step toward enhancing privacy in Bitcoin transactions.

Just to clarify, I didn't really check if there are other scripts for this. I'm just into coding, and this task seemed like a relatively simple one to work on.

I open this topic to get feedback about the script and get some interesting ideas that could be helpful to this community.

If you want to talk about UTXOs privacy or some other topic I suggest open a new topic for it.

Executing the script.

Code:
python3 utxotrack.py
Code:
Missing arguments expected:
python3 utxotrack.py <network> <txid> <level>

Let’s to said that you have an utxo in some TXID


Code:
python3 utxotrack.py bitcoin a95e587f7ed6813b567c291f91db80785c5e5a3d73f97222f0d3dfcf04e988f3 1

Code:
Level 0 TX a95e587f7ed6813b567c291f91db80785c5e5a3d73f97222f0d3dfcf04e988f3 have 1 inputs and 1 outputs.
inputs:
adbed3a8ea57bb321ed93a39b5a7ef4424de876a7c2ebb254c82517d6555697e 1875 from bc1qyp8nuqvwfydg9svlm9cgyz3h4krfcrglue786g
Total involved addresses: 1
bc1qyp8nuqvwfydg9svlm9cgyz3h4krfcrglue786g : 1
Total involved txids: 1
adbed3a8ea57bb321ed93a39b5a7ef4424de876a7c2ebb254c82517d6555697e : 1

But if we increment the level to 3 or 4 the things become more interesting, the program mark with a different color those TX and address that appear more than one time

Code:
python3 utxotrack.py bitcoin a95e587f7ed6813b567c291f91db80785c5e5a3d73f97222f0d3dfcf04e988f3 4

Code:
Level 0 TX a95e587f7ed6813b567c291f91db80785c5e5a3d73f97222f0d3dfcf04e988f3 have 1 inputs and 1 outputs.
inputs:
adbed3a8ea57bb321ed93a39b5a7ef4424de876a7c2ebb254c82517d6555697e 1875 from bc1qyp8nuqvwfydg9svlm9cgyz3h4krfcrglue786g
Level 1 TX adbed3a8ea57bb321ed93a39b5a7ef4424de876a7c2ebb254c82517d6555697e have 2 inputs and 2 outputs.
inputs:
Detected repeated TX id: 5c6dded31f8db448690e7eeb57eb340029335b84f2d5c9bb0475527a1f505f24
Detected repeated address: bc1qzc6rjlyrqt6vfp5hjlhwx6nqeahyt4tqe6lcnr
5c6dded31f8db448690e7eeb57eb340029335b84f2d5c9bb0475527a1f505f24 3651 from bc1qzc6rjlyrqt6vfp5hjlhwx6nqeahyt4tqe6lcnr
5c6dded31f8db448690e7eeb57eb340029335b84f2d5c9bb0475527a1f505f24 3685 from bc1qzc6rjlyrqt6vfp5hjlhwx6nqeahyt4tqe6lcnr
Level 2 TX 5c6dded31f8db448690e7eeb57eb340029335b84f2d5c9bb0475527a1f505f24 have 2 inputs and 10 outputs.
inputs:
Detected repeated address: 3P8KDNJD19M2pZVkozVKdxqxPh5VhyXod5
bc918ad6752795087494f07b3f8d69bc1e2d0a49865e01606e54d1afe2e5a619 1073 from 3P8KDNJD19M2pZVkozVKdxqxPh5VhyXod5
e57f2edf96c3a1aaa2032c87d9a6f6df9a2709107cbf0d3379067e428d9f7afc 38773 from 3P8KDNJD19M2pZVkozVKdxqxPh5VhyXod5
Level 3 TX bc918ad6752795087494f07b3f8d69bc1e2d0a49865e01606e54d1afe2e5a619 have 1 inputs and 2908 outputs.
inputs:
598de09d64c8a1e565524650b2127c8a31b66576b509cb49d86097a7449572ee 454147444 from bc1qkqa93cvc7mcy5jjw52dujfkm2mz96cfyjvwarn
Level 3 TX e57f2edf96c3a1aaa2032c87d9a6f6df9a2709107cbf0d3379067e428d9f7afc have 1 inputs and 2908 outputs.
inputs:
159345d616aafeb9de437afe9f13aa68ecc678550b42e5005011c5f315f2b6e3 640000000 from bc1q54rqt77uh77ftgf5hahf2zf2sasyrwwxxgmkam
Total involved addresses: 5
bc1qyp8nuqvwfydg9svlm9cgyz3h4krfcrglue786g : 1
bc1qzc6rjlyrqt6vfp5hjlhwx6nqeahyt4tqe6lcnr : 2
3P8KDNJD19M2pZVkozVKdxqxPh5VhyXod5 : 2
bc1qkqa93cvc7mcy5jjw52dujfkm2mz96cfyjvwarn : 1
bc1q54rqt77uh77ftgf5hahf2zf2sasyrwwxxgmkam : 1
Total involved txids: 6
adbed3a8ea57bb321ed93a39b5a7ef4424de876a7c2ebb254c82517d6555697e : 1
5c6dded31f8db448690e7eeb57eb340029335b84f2d5c9bb0475527a1f505f24 : 2
bc918ad6752795087494f07b3f8d69bc1e2d0a49865e01606e54d1afe2e5a619 : 1
e57f2edf96c3a1aaa2032c87d9a6f6df9a2709107cbf0d3379067e428d9f7afc : 1
598de09d64c8a1e565524650b2127c8a31b66576b509cb49d86097a7449572ee : 1
159345d616aafeb9de437afe9f13aa68ecc678550b42e5005011c5f315f2b6e3 : 1


It is normal that a single utxo have some repeated address or TXID in its ancestors  a lot of explanations can fit here (Consolidations in the same address, Change address equal to the source address, mixers, etc…)

But the idea is to check different utxos and check if they share something in common up to 5 levels of ancestors (I said 5 here because more than it can be very messy some times, i am going to open a topic asking for that )

Feel free to check out the script and share your thoughts. I'm also open to suggestions and improvements, so please let me know if you have any ideas to make it even more effective.


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!