Confidential Workflows
The CRE SDK is designed to run a handler's callback inside a secure enclave—a running instance of a Trusted Execution Environment (TEE)—instead of on Workflow DON nodes, so that the sensitive computation it performs, and any secrets it fetches (from the Vault DON), are intended to remain confidential from node operators during execution. A workflow that does this is called a Confidential Workflow: the same kind of workflow you're already building with CRE, with an explicit confidential execution path added where you need it.
Confidential workflows successfully complete execution only after DON consensus verifies attestations from the enclave, proving the integrity of the workflow logic that executed within it.
For why you might need a Confidential Workflow, see Confidential Workflows in CRE.
Guides
- Making a Workflow Confidential: Register a TEE handler, fetch secrets dynamically, and cross back to the DON for anything that needs consensus.
Example workflows
Complete TypeScript reference implementations, in
smartcontractkit/confidential-compute-examples:
- Automated Liquidation Protection: Fetches exchange and model secrets, reads policy and risk state, asks an LLM for defensive actions, enforces policy constraints, and executes approved actions.
- Automated Portfolio Rebalancing: Reads policy, holdings, prices, and volatility, asks an LLM for trade proposals, enforces slippage and reserve-floor constraints, and routes approved trades.
- AI Smart Contract Audit Firewall: Runs two independent LLM audits on a proposed transaction, merges risk flags into an ALLOW/DENY/MANUAL_REVIEW verdict, and optionally delivers the verdict onchain with
EVMClient.