You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Secret Contracts enable dApps to compute over encrypted data. One simple use-case for this is rock, paper, scissors, which is currently only possible with a 2 step commit-reveal process. Using secret contract, players can keep choices secret until the end of each round (instead of a commit-reveal scheme). This significantly improves the user experience of blockchain based gaming.
Solution Description
Game setup
This solution should enable Alice to create a new game and determine a betting amount (1, 10 or 100 SCRT). Alice, would then submit her move by selecting “rock, paper, or scissors” via a visual interface, encrypt and submit the player’s choice as well as the betting amount to the secret contract. Each new game should be shown on a UI for active games. Note: The secret contract should reject Alice's inputs if the SCRT transferred is not equal to the betting amount
Joining the game
Bob can select an active game from the dashboard, and submit his choice and the betting amount to the secret contract. Note: The secret contract should reject Alice's inputs if the SCRT transferred is not equal to the betting amount
Game logic execution
The secret contract logic should:
ensure two different addresses participated in the game and decrypt the selections,
select the winner according to the rules of rock, paper, scissors (rock beats scissors, scissors beats paper, and paper beats rock).
The winning player’s address should be returned to both players (UI).
Total betting amount should be transferred to the winning player's address
This will involve:
Writing an Enigma-JS interface that:
enables a player to start or join a game, make their move and
submits these moves encrypted and a bet denominated in SCRT to the secret contract.
Writing a secret contract that:
receives player addresses and moves, and bets denominated in SCRT
compares them according to the logic of rock, paper, scissors, and returns the winner.
Success
A working application, which should have a simple React-based UI (or similar), enable the solution, and handle failure (i.e., displays a meaningful message when improperly formatted data is submitted). Two users should be able to play one another via the UI.
Bounty Selection
For this first bounty round, the process works as follows:
Developer / team submits a “pre-submission for approval” for a bounty
Enigma reviews submissions, and selects an applicant (we don’t have a firm timeline for this, but hope to work quickly)
Applicant completes the task satisfactorily and receives the bounty
If the task is not completed, or applicant is unable to continue work in a timely manner, Enigma will select another applicant.
Note: Applicants that propose additional functionality or features to increase engagement (such as betting on games, creating leaderboards based on game results, multiple rounds of RPS, live mode with time constraint) will be prioritized
To complete a pre-submission for approval,
First, comment on this issue within github and indicate your interest. Then, please also complete this application form.
Resources
These materials should help you get started: - TO BE UPDATED Secret Network documentation
[Developer Quickstart Guide] - update with Taariq's secret voting demo
[Secret Contracts Walkthrough] - update with Taariq's secret voting demo
[Enigma-JS
Walkthrough] TBD
The text was updated successfully, but these errors were encountered:
Request
Secret Contracts enable dApps to compute over encrypted data. One simple use-case for this is rock, paper, scissors, which is currently only possible with a 2 step commit-reveal process. Using secret contract, players can keep choices secret until the end of each round (instead of a commit-reveal scheme). This significantly improves the user experience of blockchain based gaming.
Solution Description
Game setup
This solution should enable Alice to create a new game and determine a betting amount (1, 10 or 100 SCRT). Alice, would then submit her move by selecting “rock, paper, or scissors” via a visual interface, encrypt and submit the player’s choice as well as the betting amount to the secret contract. Each new game should be shown on a UI for active games. Note: The secret contract should reject Alice's inputs if the SCRT transferred is not equal to the betting amount
Joining the game
Bob can select an active game from the dashboard, and submit his choice and the betting amount to the secret contract. Note: The secret contract should reject Alice's inputs if the SCRT transferred is not equal to the betting amount
Game logic execution
The secret contract logic should:
This will involve:
Writing an Enigma-JS interface that:
Writing a secret contract that:
Success
A working application, which should have a simple React-based UI (or similar), enable the solution, and handle failure (i.e., displays a meaningful message when improperly formatted data is submitted). Two users should be able to play one another via the UI.
Bounty Selection
For this first bounty round, the process works as follows:
If the task is not completed, or applicant is unable to continue work in a timely manner, Enigma will select another applicant.
Note: Applicants that propose additional functionality or features to increase engagement (such as betting on games, creating leaderboards based on game results, multiple rounds of RPS, live mode with time constraint) will be prioritized
To complete a pre-submission for approval,
First, comment on this issue within github and indicate your interest. Then, please also complete this application form.
Resources
These materials should help you get started: - TO BE UPDATED
Secret Network documentation
[Developer Quickstart Guide] - update with Taariq's secret voting demo
[Secret Contracts Walkthrough] - update with Taariq's secret voting demo
[Enigma-JS
Walkthrough] TBD
The text was updated successfully, but these errors were encountered: