-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Parent Issue
Closes part of #47
Description
Build a crowdfunded disclosure contract where a secret (e.g., dataset, source code, research) is revealed publicly once a funding threshold is reached.
Use Case (from iO "Decrypted Payments")
Traditional approach requires a trusted server to verify payments and release content. TLOS enables:
- Secret embedded in obfuscated circuit
- Contract checks on-chain funding condition
- When threshold met, secret is revealed publicly (not per-payer)
Example Flow
Deployer Contract Funders
| | |
| deploy(secretHash, goal) | |
|------------------------------->| stores obfuscated secret |
| | |
| |<--- fund() ----------------------|
| |<--- fund() ----------------------|
| | total >= goal |
| | |
| |--- reveal() -------------------->|
| | emits SecretRevealed(secret) |
Key Features
- Funding goal stored as public parameter
- Secret hidden inside TLOS puzzle (WeakLWEPuzzleV7 pattern)
- Anyone can trigger reveal once goal is met
- Refund mechanism if goal not met by deadline
- Optional: milestone-based partial reveals
Security Model
- What's hidden: The actual secret content
- What's public: Funding goal, current total, deadline
- Guarantee: 2^76 minimum brute-force to extract secret early
Implementation Notes
- Use WeakLWEPuzzleV7 inline pattern (like TLOSTreasureHunt)
- Consider: should secret be the puzzle solution itself, or derived from it?
- Add comprehensive tests
Acceptance Criteria
- Contract compiles and passes tests
- Gas benchmark documented
- Security warnings in contract header
- Added to examples/ directory
Metadata
Metadata
Assignees
Labels
No labels