1

Once private keys have been imported to Bitcoin Core, does spending the coins remove them from the previous address?

For example, if I import my private key from a paper wallet and spend those coins through Bitcoin Core wallet, are the coins gone from the paper wallet?

1
  • No, spending an utxo won't remove the coin from the txo. So if you rewind the chain, the txo can be doubly spent.
    – Mercedes
    Commented Dec 6, 2022 at 15:36

3 Answers 3

1

Importing a wallet (by private key or other means) does not involve any on-chain operations, and if multiple wallet instances are loaded with the same private keys, then ALL of those wallets have control over the funds of the wallet.

In a more concrete example, let's assume you have a paper wallet, that is, you have a private key saved on paper, and that the associated address has some positive balance. If you import this private key into a wallet software, that wallet will be able to spend the funds. If you import to another wallet (another software, another time, another instance), both wallets will be able to spend those funds.

The proper way to prevent control from multiple wallets:

  • Create a new wallet B (and backup keys)
  • Import the paper wallet key into a wallet, and transfer all funds to wallet B. This will create a transaction in the blockchain. After this the paper wallet will be useless, as it will have zero funds left to control.

On a similar note, if I have a wallet with some funds which I want to give it to you, the 'wrong' solution is to give you the wallet keys, because then both of us will be able to spend the funds, which can lead to conflict/misunderstanding. The proper, 'Bitcoin' way is to transfer my funds to your wallet (which has different keys).

1
  • 2
    Thank you! Very good explanation. Commented Dec 6, 2022 at 16:03
1
  • Addresses are shorthand for specific locking scripts. In simple terms, usually an address represents a specific key's spending authority.
  • A paper wallet is a backup of a private key. Software wallets often also track associated balances, but they too are primarily tools to manage key material.
  • Bitcoin balances are stored in Unspent Transaction Outputs (UTXOs). Each UTXO can only be spent once.

Funds are tracked globally in the UTXO set by every node. While a wallet can track these funds, the funds are not “in the wallet”. When you spend funds, you send an instruction to the network to use some UTXOs and create new ones. It doesn't matter which copy of the keys was used to sign the transaction that spends the UTXO.

So, once you import the key and spend the UTXO associated with the key from the paper wallet, the UTXO is used up and the paper wallet no longer secures any value (unless it was reused and there were multiple UTXOs associated with that key or you sent a new payment back to that address).

1

are the coins gone from the paper wallet?

Key point: Wallets don't contain coins

Wallets contain secret numbers we call secret keys. Any wallet containing a secret number can spend an amount of money associated with that secret number.

The coins (unspent transaction outputs) are not associated with a wallet, they are only associated with a secret number.

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.