Skip to content

This is a smart contract for Alice and Bob to play rock, paper, scissors.

License

Notifications You must be signed in to change notification settings

ethanppl/solidity-rock-paper-scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Solidity Smart Contract for Rock, Paper, Scissors

A smart contract for Alice and Bob to play rock, paper, scissors. Alice and Bob deposit 1 ETH to the smart contract. The winner gets 2 ETH or both receive 1 ETH back in case of a draw.

The smart contract is trustless, meaning Alice or Bob do not have to trust each other to participate. The code guarantees the game is fair. Neither Alice nor Bob can cheat in the process, and no third party can tamper with the result. In addition, we should incentive all parties to act accordingly and punish actions that are not expected.

Detailed Explanation

About the design of the protocol

About the design of the code

About

This is a smart contract for Alice and Bob to play rock, paper, scissors.

Topics

Resources

License

Stars

Watchers

Forks