barnjamin/zk-experiments

RISC0: Write demo program to be proven

Closed this issue · 1 comments

tbd what it should be

ideas:

  • wheres waldo (lol)
  • random forest classification
  • central limit order book manager
  • anon voting

I'm working on the following:

Secret Bounties: Buying a secret with a special property privately on chain

Suppose Alice wants to know something and is willing to pay for it when provided with the info. Eg, she publishes a large number $n$ she wishes to learn a factor of. She wants to ensure fair payouts to bounty hunters: they should be 100% confident of being payed for providing the secret. An Algorand Application or Logic Signature seems well suited for this purpose. But she doesn’t want others to learn the secret by replaying the app/logic sig transaction which is totally public. So she announces the following Secret Bounty Program:

  1. Alice publishes the secret request (eg “find a factor of $n$”) and a way to contact her privately
  2. A bounty hunter Eve contacts Alice claiming a solution (eg she knows a $p$ that factors $n$)
  3. Alice prepares the bounty algorithm and shares all details with Eve:
  • Alice privately sends Eve a one time pad $r$ (or another reversible method for hiding the secret) which will be used to create the obscured input $z$
  • Alice also prepares a ZK-SNARK for “I know a $z$ that when unencrypted by secret $r$ produces Alice's requested secret” (eg $z$ unpadded by $r$ is a non-trivial factor of $n$).
  • Alice prepares an app or logic sig to verify the ZK-SNARK and payout to Eve’s address
  1. Alice puts 1337 Algos reward is this app or logic sig
  2. Eve sends a payment transaction from the app or logic sig with argument $z$ and gets paid