PayNym: Enhancing Privacy in Bitcoin Transactions
Last edited: 10.7.2024
A simple but effective tool to enhance Bitcoin privacy
Paynym enables users to share their Bitcoin receiving information publicly without exposing their actual Bitcoin addresses. This system cleverly maintains privacy by ensuring that while the addresses used in transactions are known to both the sender and receiver, there is no public link between the publicly displayed receiving information (Paynym) and the transaction details recorded on the blockchain. This setup allows for both transparency in sharing payment information and privacy in conducting transactions, as observers cannot trace the transaction back to the payer's or payee's publicly shared information.
1. What is PayNym?
Originating from Bitcoin Improvement Proposal 47 (BIP47), PayNym is designed to safeguard the privacy of Bitcoin transactions. It replaces traditional Bitcoin addresses with payment codes that act as permanent, reusable identifiers, concealing the actual addresses. This feature enables users to publicly share their Bitcoin receiving details without disclosing their real Bitcoin addresses. It cleverly maintains privacy by ensuring that the addresses involved in transactions are known only to the sender and receiver, with no visible connection between the publicly shared receiving information and the details recorded on the blockchain. This approach not only fosters transparency in sharing payment details but also secures transaction privacy, preventing any observer from linking transactions back to the involved parties.
2. How PayNym Works
-
Payment Code Creation: Users create a unique payment code that serves as a lasting pseudonym for their wallet.
-
Sharing and Storing Codes: Instead of Bitcoin addresses, users distribute their payment codes. These are then stored in the sender’s wallet.
-
Transaction Initiation: To transfer bitcoins, a sender’s wallet uses the recipient's payment code to derive a new, unique Bitcoin address. This process, based on the combined payment codes of the sender and recipient, ensures that every transaction features a different address, keeping it private.
-
Sending Bitcoins: Bitcoins are sent to the newly derived address, maintaining the privacy of the recipient's primary Bitcoin address.
3. Example for Clarity
Consider Alice wanting to securely send Bitcoin to Bob. Bob gives her his payment code rather than his Bitcoin address. Alice's wallet utilizes this code to generate a unique transaction address, which remains unknown to anyone except Alice and Bob, thus securing the transaction from any third-party links to Bob's main wallet.
4. Avatars and Pseudonyms
Every PayNym is associated with a user-friendly avatar and a short name, acting as a pseudonym that simplifies recognition and use of the payment code. These features help users visually manage their contacts more effectively without compromising security or privacy.
Example of a pseudonym: +orangemath2dB
Example of an avatar:
5. PayNym Directory
For those looking to explore or use PayNyms, the website Paynym.is serves as a directory. It catalogues all registered PayNyms, enabling users to connect with others within the PayNym network. If you just created a new PayNym address your avatar will be at the top of the page.
6. How to Enable PayNym in Sparrow and Stack Wallet
Sparrow Wallet (desktop only):
- Linking PayNyms: Initially, link a PayNym to your wallet by navigating to the 'Send' tab, clicking the down arrow next to 'Pay To,' and selecting 'PayNym' from the menu. This opens a dialogue where you can manage your PayNyms.
- Add Contact: To add a PayNym not already in your contacts, enter the PayNym ID in 'Find Contact,' click 'Add Contact,' then 'Link Contact.' This requires sending a notification transaction to the PayNym wallet's monitored address, incurring a cost of 546 sats plus mining fees. This one-time transaction establishes the connection.
Stack Wallet (mobile only):
- Linking PayNyms: Begin by linking a PayNym in your wallet by clicking "More" and then the PayNym logo. Confirm to claim your PayNym address, repeating if necessary until successful. Then, use the buttons to share your PayNym.
- Add Contact: Add a PayNym by clicking "+" and searching with the PayNym ID. After it appears, click 'Follow,' then connect by sending a notification transaction to establish the link.
7. Example for a PayNym Bitcoin Donation Page
The minimum information needed to share is your pseudonym. However, also providing the avatar makes it easier for the sender to verify that the address is correct since his wallet will also display the avatar. Displaying the QR for the PayNym code makes it easy for mobile devices to read the code. This is an example of my donation page showing all mentioned options: PayNym donation (choose PayNym Tab)
8. Under the Hood: How PayNym Operates Between Two Wallets Using BIP47
Step 1: Generating and Sharing Payment Codes
- Users generate a stable and reusable payment code from their wallet. This code is derived from the wallet's seed and functions much like a master key for generating transaction addresses.
- The payment code is publicly shareable and is used to initiate private transactions. It's often accompanied by a PayNym name and a visually distinctive robot avatar, making it user-friendly and easy to share without using the complex code itself.
Step 2: Transaction Initiation and Address Generation
- When another user, say User B, wants to send Bitcoin to User A (the original payment code owner), User B's wallet uses the payment code to derive a new, unique Bitcoin address. This address generation process is based on a cryptographic combination of the public payment code and private data from User B's wallet, ensuring that each address is unique to the interaction between the two wallets.
Unique Secret Per Counterparty
Each time a payment code is shared, the recipient's wallet generates a unique secret with the sender's wallet, ensuring that all addresses generated from this payment code are distinct. This process involves a notification transaction, which is a one-time visible handshake on the blockchain that establishes the sequence of addresses.
Address and Sequence Management
The BIP47 protocol ensures that both sender and recipient wallets independently track and synchronize sequence numbers, determining the next address in the sequence to be used. This synchronization happens without the need for further coordination, maintaining privacy and security.
Multiple Senders
If a payment code is shared with multiple people, each interaction generates its own unique sequence of addresses for transactions, thanks to the unique secret established between each pair of wallets. This means there is no risk of address collision or breach of privacy, even if the payment code is used by numerous individuals who are unaware of each other.
9. Understanding the Gap Limit in HD Wallets Using BIP47
When engaging with hierarchical deterministic (HD) wallets that implement BIP47 for PayNym functionality, it's crucial to understand the concept known as the "gap limit." The gap limit, which is typically set to 20, dictates that the wallet software will sequentially check for transactions across 20 unused addresses. If no transactions are found within these addresses, the search halts. This setting is designed to optimize wallet performance, preventing the software from endlessly searching through address spaces.
Challenges with BIP47 and Address Gaps
However, the use of BIP47 can introduce complexities. Each time you share your payment code with a new party, their wallet has the capability to generate a unique series of addresses for sending funds. If these addresses are not utilized sequentially, or if there is a significant number of unused addresses between those that are used, it creates gaps. This can pose a problem during wallet restoration from a seed phrase. If the software encounters transactions at addresses beyond this typical 20-address gap limit, and then hits 20 unused addresses, it will cease further search, potentially missing out on recovering some funds.
Strategies to Mitigate the Gap Issue
- Increase the Gap Limit: Some wallets allow you to manually increase the gap limit during restoration. This can be crucial in ensuring that all funds are recovered, particularly if you've engaged in numerous transactions that might not align sequentially within the usual limit.
- Use a BIP47-Aware Wallet: Opting for wallets specifically designed to support BIP47 can be beneficial. These wallets are theoretically capable of managing larger gaps without requiring manual intervention from the user.
- Consolidate Transactions: Periodically sending small amounts of Bitcoin to addresses within the gap can help "fill" it. This proactive measure ensures that extended recovery scans are less likely to be necessary, maintaining the integrity of your wallet’s data.
- Keep Detailed Records: Maintaining meticulous records of which payment codes have been shared and which addresses have received payments can aid significantly in manually recovering coins if an automated restore fails. This level of detail helps in pinpointing where funds might reside, beyond the standard scope of automated wallet recoveries.
10. Summary
Pros of PayNym:
- Enhanced Privacy: Allows users to share their Bitcoin receiving info without revealing their actual Bitcoin addresses, ensuring private financial activities.
- No Public Traceability: The transaction addresses are known only to the involved parties, with no link visible on the blockchain, securing against external tracing.
- User-Friendly: Simplifies Bitcoin payment sharing with easy-to-remember identifiers and avatars, aiding in contact management.
Cons of PayNym:
- Initial Setup Cost: Requires a first-time connection between two wallets via a blockchain transaction, which incurs a fee, necessary for future transaction privacy.
- Wallet Compatibility: Not all wallets support the BIP47 protocol necessary for PayNym, although more are adopting it.
- Complexity for New Users: The payment codes and hidden addresses can be complex for newcomers, potentially hindering broader adoption.
- The use of BIP47 in HD wallets can create address gaps that complicate the recovery of funds if transactions are not sequential, potentially leading to missed funds during wallet restoration.
PayNym offers a robust method for maintaining transactional privacy in Bitcoin exchanges, employing unique payment codes and ensuring new addresses for each transaction to prevent tracking back to the user's wallet. Its design cleverly balances cryptographic security with user-friendliness, making it an essential tool for those seeking to enhance their cryptocurrency transaction security.
I hope this article has helped you understand how to enhance your transaction privacy with the PayNym feature. If you have already used PayNym, please leave a comment below sharing your experiences or asking any questions you might have.
If you would like to learn more about our Independent Crypto Coaching, book a free orientation call or check out our self-custody course. We also offer a bunch of free services to earn your trust.
Disclaimer & Privacy Policy The information provided in this article is for educational and informational purposes only and should not be interpreted as financial advice. Please refer to our disclaimer for more information. If you decide to submit comments we assume you have read and agree to our privacy policy.