I know that Ethereum and Bitcoin both you the same underlying elliptic curve, so I'm wondering, is it possible to store bitcoin in an Ethereum contract?

1 Answer 1


Sure! As bitcoins are simply your "rights" to control the value of stored blockchain ledger entries, practically speaking, all you ever need is a private key to store bitcoins.

Example of a Bitcoin private key represented in WIF format: 5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nFCDPsGHMGALCn1E
and its associated address: 1PsL2jSXpg8ojDdj9ZfVKib5vJKhmts4PP

In this format, an Ethereum contract could most certainly store a Bitcoin private key in a standard string variable (or string array). The sky is really the limit in terms of applications for a Bitcoin private key database in a decentralized blockchain like Ethereum.


Considering that Ethereum is a public blockchain, similar to Bitcoin, the values that you store in its contracts are also public information. This could very likely result in the theft of your bitcoins by someone monitoring the network.

One possible remedy to this could be the use of client-side encryption/decryption, when storing/retrieving the private key value(s) in your Ethereum contract.

  • Thanks, @nyusternie. I guess I knew that that was possible. What I really mean to ask is there a way to do it in a more secure way similar to how contracts store ETH?
    – Loourr
    Oct 8, 2017 at 12:14

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.