As of November 2024, address reuse and inconsistent address allocation methods still pose significant challenges to user privacy and security. BIP-21, a standard URI scheme for Bitcoin payments that has proven useful, includes an optional labeling feature. However, this information exists solely within the QR code or URL schema, remaining stateless and inaccessible to the wallet after the payment request is constructed. This limitation means there is no persistent record of the label or purpose associated with each address.
This article proposes extending BIP-21 payment requests by storing the label as BIP-329 metadata, enabling purpose-specific, persistent labeling of addresses. By storing a BIP-21 label in the BIP-329 label node, wallets can ensure that the address will not be reused, even if it appears as the next address by index and/or has no current funds. If the BIP-21 label is empty, a placeholder such as "allocated" or "already used" can be added to indicate that the address is taken. This extension significantly improves address management in wallets and mitigates the risk of address reuse. Greater benefits can be achieved by syncing labels across wallets, for instance by using a tool like Labelbase.
BIP-21 (Bitcoin Improvement Proposal 21) was developed to standardize Bitcoin payment requests through a URI scheme, making it easier to include essential transaction details like Bitcoin addresses, amounts, and optional fields like labels and messages. While widely adopted, BIP-21’s implementation varies significantly across wallets, and its limited label feature does not fully address address management issues. Most wallets currently select the next available unused address for payment requests without persistent metadata, leading to potential reuse of addresses.
To address this, we suggest using BIP-329, the standard for wallet metadata, to store and categorize address labels more effectively. Specifically, storing BIP-21 labels in BIP-329 metadata can help avoid reuse by explicitly categorizing addresses as "allocated" or "already used" if left empty. This article outlines a method to incorporate BIP-329 metadata tags to achieve better address allocation.
To address these issues, we propose extending the BIP-21 label feature by storing labels as BIP-329 metadata. BIP-329 allows wallets to store various metadata types, which we can leverage for improved address tracking. Here’s how it could work:
By extending BIP-21 labels with BIP-329, wallet developers can offer users an enhanced, privacy-conscious solution. This system allows for more granular management and categorization of addresses, preserving user privacy and providing a better experience.
In summary, extending BIP-21 labeling with BIP-329 allows wallets to:
Extending BIP-21 with BIP-329 metadata provides a practical pathway to improve address management in wallets. As the Bitcoin ecosystem evolves, it’s essential for wallet developers to review their BIP-21 implementations and adopt BIP-329 for metadata storage. By linking these use cases, wallets can actively prevent address reuse and enhance user privacy.
RFC, Xavier Fiecher