Currencies

Keep It Simple Stupid!!!

8/13/17

Bitcoin black hole?

Bitcoin Black Hole

Creating a new Bitcoin address that immediately and irretrievably loses any payments sent to it is surprisingly simple. These addresses are known as "provably unspendable," signifying that it's possible to prove, without a doubt, that no one can ever withdraw even a single satoshi from them.

In this guide, we'll create what's known as a P2SH (Pay to Script Hash) address. Here, "SH" stands for "script hash." It's important to note that every Bitcoin address is essentially a wrapper script, requiring its owner to create a valid transaction to spend from it.

Valid transactions must meet two criteria: they must execute without errors, and they must return "TRUE" (or technically, the top item on the stack must be a positive integer).

Since P2SH addresses only reveal the script's hash and not the script itself, it's impossible to know in advance if a given script hash corresponds to a code that can run error-free. This means new standards to disallow non-functional scripts cannot be enforced, making the creation of a "catastrophic P2SH address" quite straightforward.

The Magic Ingredient: OP_RETURN

OP_RETURN marks a transaction as invalid. Since version 0.9, Bitcoin has adopted a standard method of attaching extra data to transactions: adding a zero-value output with a scriptPubKey of OP_RETURN followed by data. These outputs are provably unspendable and are thus excluded from the UTXO set, reducing their burden on the network.

A script containing only OP_RETURN will always fail to meet the spending criteria, as its execution invariably returns "FALSE," rendering it provably unspendable. Any funds sent to such an address are permanently stuck and irretrievable.

Creating the Address

Let's create such an address. First, we need some random data to generate a unique address. Let's use "6274636c65616b2e636f6d," the hexadecimal representation of the ASCII string "btcleak.com" (a bit cheesy, perhaps).

Our script looks like this:

OP_RETURN 11 0x6274636c65616b2e636f6d

A quick note: the "11" represents the number of bytes following it, and, though it's written as a decimal number, it's followed by a hexadecimal string.

This script is then serialized into the hexadecimal string:

6a0b6274636c65616b2e636f6d

To convert this serialized script into a corresponding P2SH address, we'll use a bit of Python, skipping the detailed tutorial part:

python
import hashlib, base58, binascii script = '6a0b6274636c65616b2e636f6d' address = base58.b58encode_check(binascii.unhexlify('05' + hashlib.new('ripemd160', hashlib.sha256(binascii.unhexlify(script)).digest()).hexdigest())).decode() print(address)

This process proves that 3JM8v96QvZ17jjcH2hDa81BSdMt2yqER56 is a valid Bitcoin address to which anyone can send funds, yet it's also proven that these funds can never be redeemed.

The Fragility and Power of Bitcoins

Bitcoins are inherently fragile; their owners can irreversibly burn them. We boldly name 3JM8v96QvZ17jjcH2hDa81BSdMt2yqER56 a Bitcoin black hole: a final destination where sent bitcoins are eternally lost.

This concept, although potentially permanent barring a significant Bitcoin protocol change (a hard-fork that would allow spending from such scripts, at which point Bitcoin would fundamentally change), introduces intriguing possibilities. For instance, someone controlling a vast amount of Bitcoin could burn a portion, verifiably reducing the total circulating supply and potentially increasing the value of the remaining Bitcoins.

https://en.bitcoin.it/wiki/Script#Provably_Unspendable

https://bitzuma.com/posts/op-return-and-the-future-of-bitcoin/

https://en.bitcoin.it/wiki/OP_RETURN

https://www.oreilly.com/library/view/programming-bitcoin/9781492031482/ch04.html

https://www.blockchain.com/explorer/addresses/btc/3JM8v96QvZ17jjcH2hDa81BSdMt2yqER56

No comments:

Project Crypto Dominance

Phase 1: Creating Fear about Money Laundering Propagating Information : Organizations or individuals aiming to control B...