Sandbox Access - Conditional Transactions (Phase 2) is available in a Sandbox environment. Contact the SKALE team at https://discord.gg/skale for access.
What Are Conditional Transactions?
Conditional Transactions (CTX) let smart contracts request decryption of encrypted data. Instead of decrypting everything at consensus time, contracts selectively reveal only what they need—when they need it.How It Works
- Submit Encrypted Data - Client encrypts data and sends it to a smart contract
- Store Encrypted State - Contract stores the encrypted bytes
- Request Decryption - Contract calls the
submitCTXprecompile with encrypted and plaintext arguments - Threshold Decrypt - The validator committee decrypts the requested data
- Callback Execution - The decrypted data is delivered to your contract’s
onDecryptfunction
The Smart Contract Flow
Your contract implementsIBiteSupplicant:
Example: Confidential Game
A simple game where encrypted numbers are decrypted and compared:Use Cases
Confidential Auctions
Bidders submit encrypted bids. The contract decrypts all bids after the deadline and determines the winner without revealing losing bids:Private Voting with Tallying
Votes remain encrypted until tally time, preventing bribery and coercion:Confidential Oracle Data
Oracles can submit encrypted data that only decrypts when a contract explicitly requests it:Getting Started
- BITE API Reference - Solidity helpers and
submitCTXdocs - Conditional Transactions Cookbook - Step-by-step tutorials
- Introduction - BITE Protocol overview
