top of page
  • Writer's pictureeconoalchemist

Putting the who? in Cahoots.

An article on the privacy enhancing StoneWallx2 & Stowaway transactions and the recently deployed Soroban improvements from Samourai Wallet.



With the release of Samourai Wallet version 0.99.96, users gained tremendous UX improvements on collaborative (cahoots) transactions with Soroban, among other features like increased load times and increased Tor stability. Click here for Samourai Wallet's official announcement.


StoneWallx2 and Stowaway are privacy enhancing transaction tools that can be used to break the assumption that all inputs to a transaction were owned by the same entity. This assumption is called the common-input-ownership-heuristic and is a common tactic used by chain analysis firms to track users' activity throughout the Bitcoin network.


Over the past several months, if not years, the Samourai Wallet team has been hard at work developing methods and tools that any Bitcoin user can employ to mitigate the invasive surveillance tactics developed by chain analysis firms.

  • StoneWallx2 introduces reasonable doubt as to who owned which input by using multiple inputs and always 4 outputs; 1 is the spend, 1 is a decoy, and 2 are change outputs. A StoneWallx2 can be used when doing a self-transfer, sending to the collaborator, or even sending to a third party not participating in the collaboration.

  • Stowaway on the other hand, also uses multiple inputs but the amounts being transacted are obfuscated. These transactions can be used with another Samourai Wallet user and the collaborator must also be the recipient of the spend.


The StoneWallx2 and Stowaway tools have been available to the public for some time. Being the collaborative transactions that they are, these tools required that participating users exchange information between each other by sharing a few QR codes to build the transaction. Until recently, sharing these QR codes required that the collaborators were doing the transaction in person. However, Soroban introduces the ability to build these transactions using an app agnostic comms layer over Tor. Translation: Now you can build StoneWallx2 and Stowaway transactions across vast geographic distances, privately and instantly over Tor, and this technology can be implemented by other wallet developers.


 

Old Fashioned StoneWallx2

Sometimes it's easier to conceptualize with a visual example. In this clip, you are looking at a traditional Stonewallx2 transaction without Soroban. In this example, the collaborators must be doing the transaction in person so that they can swap a few QR codes with each other:


Note that with StoneWallx2 transactions, the collaborating peer needs to have a bitcoin balance in their wallet greater than the amount you want to transact. The sender and the collaborator are splitting the miners fees. In the above example, I was using an instance of Samourai Wallet installed on another Android device for demonstration purposes, like this I was acting as sender with the primary device and both collaborator/receiver with the secondary device


If you want to explore the transaction from the video example above, you may find it on KYCP here. This is kind of a bad StoneWallx2 example because I combined 3 of the outputs right afterwards. You'll probably notice that I combined the spend, decoy, & a change output as inputs to a later transaction. That move obviously diminished the privacy benefits from doing a StoneWallx2 transaction. That type of behavior is discouraged. But this will give you an idea of how the details look on-chain.



Here is another way to look at the same transaction on Blockstream's explorer. You'll see the two inputs: one from the spender, one from the collaborator; and the four outputs: one spend (to the collaborator), one decoy and one change outputs (return to sender) and one change output (return to collaborator).



 

Soroban StoneWallx2

This next video example is a StoneWallx2 transaction over Soroban. In this example, my secondary Android device is acting as the third party receiver, while my primary device is acting as the sender. My collaborating peer (@ElkimXOC) is many miles away, we are exchanging transaction building details instantly over Tor despite the vast distance between us. The example in this video was done using the Testnet Bitcoin network.


The Testnet Bitcoin (tBTC) transaction from the video above can be viewed on Blockstream's Testnet explorer here. You can see that the StoneWallx2 transaction is structured the same way as the non-Soroban StoneWallx2 in that there are two inputs: one from the sender and one from the collaborator; and four outputs one spend (to the 3rd party receiver), one decoy and one change outputs (return to sender), and one change output (return to collaborator). But we didn't have to manually swap any QR codes in person.



 

Old Fashioned Stowaway

Here is a video example of a Stowaway transaction before Soroban. It looks very similar to the way collaborating peers would build a StoneWallx2 transaction, they need to swap a few QR codes. But the way the transaction is being built makes it so that the details left on the blockchain obfuscate the amounts being transacted instead of using decoys to confuse the common-ownership-heuristics.


*In this example video, I mistakenly took the added and unnecessary step of first scanning a deposit address. There is no need to do this as Stowaway will generate the deposit address automatically.


Note that with Stowaway transactions the collaborator needs to be the receiver. If you are interested in exploring this transaction on KYCP, it can be found here. You may recognize some of the inputs of this transaction from the outputs of the other transaction I showed you earlier.


Here is another way to look at this transaction with Blockstream's explorer. There are multiple inputs and multiple outputs. None of the input or output amounts match the amount that was sent (0.00802 BTC). Since we have prior knowledge and know that the collaborator contributed 0.00848346 BTC, we can see that the 0.01650346 BTC output is the return of the collaborator's funds plus the 0.00802 that the sender was spending. But if I wasn't explaining this with prior knowledge, there would not be anyway to know that the values in this transaction were not valid at face value and that some other, hidden, amount was being spent.




 

Soroban Stowaway

Here is a video example of a Stowaway transaction using Soroban, both receiving and sending actions are shown. In the first half of the video, the view of the receiver is being shown. In the second half of the video, the view of the sender is being shown. The collaborating peer (@BTCxZelko) for both sending and receiving transactions is many miles away. Despite the vast geographic distance, Soroban has allowed for instant private communication between peers to build a transaction that conceals the amount being spent. The examples in this video are using the Testnet Bitcoin network.


The Testnet Bitcoin (tBTC) transaction from the video above can be viewed on Blockstream's Testnet explorer, here. The amount transacted in the video was 0.00045675 tBTC, but according to the details on the blockchain, that amount is not evident. Since I have prior knowledge of this transaction and can explain to you what is going on here, you can see that the 0.01878952 tBTC input plus the 0.00045675 tBTC sent equals the 0.01924627 tBTC output.




 

PayNym


Both StoneWallx2 and Stowaway transactions are built between users sharing PayNyms. The implementation of BIP47 has allowed these PayNyms to be integrated with Samourai Wallet. Any wallet developer can also implement this feature. The really cool thing about using a PayNym is that it provides a static payment code that can be on public display without revealing any of the history of that PayNym or reusing any Bitcoin addresses. Furthermore, when two users follow each other with their PayNyms in the Samourai Wallet app, they establish a cryptographic connection made with some information from both PayNyms that is unique to their specific connection. This connection enables the receiving addresses to be generated while building cahoots transactions together.


Every PayNym receives a unique avatar that can be saved in your contact list on the Samourai Wallet app.


PayNyms are another great addition to the line up of privacy enhancing tools available from Samourai Wallet.




Your privacy is only as good as the tools you use to guard it, so be sure to use the best tools available to you. The best way to learn is from experience, it is easy to install the Samourai Wallet app and start trying out these tools and features for yourself. You can find the Samourai Wallet app on their GitLab site or in the Google Play Store.



Thanks for reading! I hope you found this article thought provoking and that it helped you see how easy it is to gain better privacy with Samourai Wallet and the added Soroban improvements. Add these tools to your Whirlpool post-mix arsenal and it is easy to see that this is a game changer and that the playing field has been tipped in privacy's favor.


If you enjoyed this content, leave me a tip here: Donate.


This article can be found on Twitter as a thread here.


2,876 views
bottom of page