Pay to Hash Puzzle Flow
Create Puzzle
Design a puzzle and hash its solution
1. Choose puzzle type and solution
2. Hash solution: SHA256(RIPEMD160(solution))
3. Create script: OP_SHA256 OP_RIPEMD160 <hash> OP_EQUAL
e.g.,
Puzzle types: riddles, math problems, coordinates
Example: "What's always coming but never arrives?" (Answer: "Tomorrow")
Hash: SHA256(RIPEMD160("Tomorrow"))
Lock Funds
Publish the puzzle on the blockchain
Transaction output with puzzle script
e.g., prize money, digital assets, access tokens
Solve Puzzle
Find and provide the solution
<push_data> <solution>
e.g., 'Eiffel Tower', '42', '40.7128° N, 74.0060° W'
Verify Solution
Check if the provided solution is correct
Execute script: hash solution and compare
Release Funds
If correct, reward is given to the solver
Transaction becomes valid if puzzle is solved
e.g., receive prize, unlock content, gain access
This flow shows how Pay to Hash Puzzles work on a blockchain, enabling secure and verifiable challenges.
Puzzles can range from simple riddles to complex treasure hunts, with various types of rewards.