UMA's Optimistic Oracle on Secret Network
Overview
This project bridges UMA's Optimistic Oracle solution to Secret Network, enabling the secure and verifiable resolution of arbitrary questions and requests.
Value Proposition
Integrating UMA's Oracle with Secret Network allows for the inclusion of complex data into the blockchain, which supports advanced applications like:
- Privacy-preserving prediction markets
- Regulated financial and medical protocols requiring real-time data and user confidentiality
- Private lending and insurance protocols
How It Works
Posting a Contest:
- A contest consisting of an ID and event details (including the UMA request query) is posted to the Prediction Market smart contract on Secret Network.
Querying Contests:
- The SP-Relayer node continuously queries the PM contract for new contests that need resolution.
- The query returns contest information and a signature verifying the data originated from the contract.
Initializing the Market:
- The SP-Relayer parses the query content to initialize a new Market (question/request) on the Sepolia SP-UMA-Request contract through a Sepolia network transaction.
Asserting an Answer:
- An answer is asserted as truthful and enters a dispute window, during which it can be challenged.
Settling the Outcome:
- If the answer is not challenged during the dispute window, the SP-Relayer node settles the outcome.
- This action triggers the Axelar GMP route back to the SP-Answer Secret contract on Secret Network.
Bet Resolution:
- When a user claims their bet, the Prediction Market/Contest contract queries the Answer contract for the bet's resolution.
Decentralization and Automation
- SP-Relayer Node: Exists solely for automation, ensuring smooth operations without requiring constant manual intervention.
- Decentralized Fulfillment: Thanks to the public/private keys stored on Secret Network, any motivated entity can fulfill the steps usually handled by the SP-Relayer, ensuring the process remains decentralized and trustless.
Technical Implementation
- Secret Network's Private Contract State: Utilizes public/private keys on-chain for verifiable sources of truth.
- Axelar's General Message Passing Protocol: Ensures data integrity throughout the process.
Demonstration
Watch the video to see the process in action:
- Step 1: Posting a Contest https://testnet.ping.pub/secret/tx/42D0978CBDE4CF7981450343A74E207A0E148030B3C979969C1A598F0E8ECA2B
- Step 2: Querying & Signing Contests
- Step 3: Initializing the Market on Sepolia https://sepolia.etherscan.io/tx/0x7b44b6027f758c4ae15a6bd68bb9c7c70178776c4a2801b91549ad55af6b5bae
- Step 4: Asserting an Answer https://sepolia.etherscan.io/tx/0x8a1d83df12a7829aafca76ef4c2b84b5f232e2272767901fa4414285e1a98891
- Step 5: Settling the Outcome https://sepolia.etherscan.io/tx/0x0e481fb0ffe48754a789d38e346aace570ec2f7b0d8f35f07d939284fef88114
- Step 6: Simulation of the Axelar step, as they do not support pulsar-3, with our SP-Relayer relaying the answer back to our Answer contract https://testnet.ping.pub/secret/tx/7A15FE0BBBA3DF51D4D2E073309A1ADD78DDCAF304D43BB8D1E726E789A504EA
This integration can enhance the functionality of Secret Network by enabling complex, secure, and verifiable data processing.