https://github.com/bitcoin/bips/pull/159Payment codes are a technique for creating permanent Bitcoin addresses that can be reused and publicly associated with a real-life identity without creating a loss of financial privacy.
They are similar to stealth addresses, but involve a different set of trade-offs and features that may make them more practical.
You can publicize your payment code in the same way that you can publicize your email address. Even if everyone knows your payment code, nobody can monitor the blockchain to see how many payments you have received or which transactions are yours.
If you receive an incoming transaction to your payment code, the act of learning that you received funds tells you the payment code of the person who sent the transaction. This means transactions sent to payment codes
do have the "
from address" that's missing from Bitcoin wallets and that many users would like to have.
Since transactions involving payment codes have a from address, the recipient of a payment can send a refund to the sender without requiring additional information.
Unlike stealth addresses, detecting incoming payments does not require scanning the entire blockchain and all transactions. Any method used by light clients to obtain their balance normally also works with payment codes. This means a light client can use payment codes without outsourcing their privacy to a trusted full node.
Payment codes have different privacy features than stealth addresses:
- Payments sent to a stealth address are obviously identifiable to network and blockchain observers as sends to a stealth address and could conceivably be censored. Payments sent to a payment code are not distinguishable from traditional Bitcoin transactions
- Payment codes leak an upper bound on the number of incoming notification transactions a known payment code has received. The senders of those payment codes, whether not a particular notification transaction is a valid payment code or not is not leaked. Notification transactions are identifiable by a network or blockchain observer and could conceivably be censored.
- Stealth address transactions put the information that's contained inside a payment code notification in every transaction. Payment code notification transactions include an extended public key that only needs to be sent once to each recipient and is which is valid for 232 subsequent payments.
The payment code standard does not currently support multisig payment codes, and there's no obvious way to add support for them without either losing desirable features or failing to provide the additional security that multisig addresses are supposed to provide. It might be possible to use threshold signature techniques to accomplish the goal of allowing multiple parties to share control over a payment code without requiring OP_CHECKMULTISIG scripts. This will be a subject for future investigation.
The full description of the protocol with illustrations is available here:
https://github.com/OpenBitcoinPrivacyProject/bips/blob/master/bip-0047.mediawiki