I’d like to take advantage of the immutability and nonrepudiable nature of the blockchain.

Let’s say I enter into a bet with my friend that if it rains 10 days from now, I will pay him $100. If it doesn’t, he will pay me $100. In the real world, we would draft a paper agreement which both of us sign physically as proof.

How can this be done in the Ethereum world without involving the use of Ether? (except to pay for gas of course, we like betting with cash ;-) Can Ethereum be used to prove both of us entered into an agreement 10 days earlier? E.g. by storing in the blockchain the digital signatures of us signing a PDF agreement and saving such document on IPFS?

2 Answers 2


Sure, you can definitely prove that both parties made the agreement; the simplest approach would be to create a contract that contains a signAgreement(bytes32 hash) function which allows each party to send a transaction that registers agreement with the given hash (and ideally pushes out a log), and put the doc with that hash on IPFS.

  • Thx Vitalik! Would it be possible to take advantage of smart contract on Ethereum to do automatic payout to the winner of the bet? One idea is to have each of us deposit $100 worth of ether into the contract and at the end of 10 days have the contract automatically send the contract balance to the winner after consulting an external oracle for weather information. Problem with this approach is that at the end of 10 days, the contract balance might be less than $200 due to exchange rate fluctuations. How can we solve this problem? Commented Apr 6, 2016 at 18:58
  • @AndersonTess You can use stablecoins such as Maker(Work in progress) or Digix. Digix is a currency backed by gold, so it is much more stable. Commented Jun 28, 2016 at 8:11

You can do this on ethereum or even Bitcoin blockchain. You can digitally sign a contract and hash it. You can store the hash on ethereum blockchain using a simple contract or even on a Bitcoin blockchain. 10 days later, you can prove that this contract happened on a specific day by exploring the specific block ( in Bitcoin) and getting the hash from there. In ethereum, you can explore the contract and get the hash, which can prove the document existed on that specific day.

  • Thx Hrishikesh! How can I store the hash on Bitcoin blockchain? Is there any storage cost involved ? Commented Apr 6, 2016 at 19:06
  • @AndersonTess You can use a service like cryptograffiti.info. A small transaction cost is involved. If message is large, you will need to pay more fees. Commented Jun 28, 2016 at 8:12

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.