I just learned that Mike Hearn created a Bitcoin Puzzle transaction where the first person to solve its scriptPubKey, could claim that transaction's amount as a reward.

The thing is... Aren't all the transactions forced to have a destination address? So, even if the winner solves the scriptPubKey, how can then he/she divert the funds to another destination address?

2 Answers 2


Aren't all the transactions forced to have a destination address?


Transactions never contain addresses. Transaction outputs contain only a locking script and a numeric amount.

There are no addresses in the Bitcoin blockchain.

Addresses are a way for a payee to construct a barcode that can be shown to a payer, from the barcode the payer can construct a standard locking script that only the payee can unlock.

To spend an output as an Input in a new transaction you only have to write an unlocking script that sets up values in the stack that cause evaluation of the locking script to produce a boolean value of true.

It is trivial to create a locking script that always evaluates to true.I



In Bitcoin coins are not send to addresses. Instead, coins are locked with locking scripts. You own the coins that you can unlock.

Addresses are how receiving wallets inform paying wallets on how they want their coins locked.

For example, if I'm paying you and your wallet send me this address 1N9Cby5NDPsLDnLnTEsYXP4eyWGrfuen7C she's telling my wallet that she wants their receiving coins locked in a P2PKH (Pay to Public Key Hash) with the public key hash e7e7a79d7d9d23b9dc7dcbd81fead779b2d7167d

So, my wallet will broadcast a transaction, which will unlock some previous coins I have, and lock them to the following script:

OP_DUP OP_HASH160 e7e7a79d7d9d23b9dc7dcbd81fead779b2d7167d OP_EQUALVERIFY OP_CHECKSIG

Your wallet will be pooling the mempool/blockchain waiting to see this transaction there. The second it sees it, it will tell you "paid" or "confirmed".

Address prefixes indicate the type of script:

  • starts with 1 = P2PKH
  • starts with 3 = P2SH
  • starts with bc1q = segwit
  • starts with bc1p = taproot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.