Video thumbnail

zkConfide

Private prediction market with MEV resistance, Uniswap v4 Hooks, and zkProof-based resolution.

Project Description

The protocol offers a fresh take on intent privacy in DeFi. While the act of betting is transparently recorded on-chain, zkConfide keeps the user's strategy, preferences, risk appetite, and outcome verification private. AI models process user profiles off-chain to generate personalized odds, while a server wallet (via Privy) executes on the user’s behalf within strict, policy-enforced boundaries.

To prevent front-running and slippage manipulation — common in public DeFi systems — zkConfide redefines how intent is expressed. The user’s betting intent (direction, size, timing) is never revealed until the transaction is finalized, and even then, critical logic like odds calculation and market resolution is handled privately inside a Trusted Execution Environment (TEE), with results attested on-chain using zkProofs.

In short, zkConfide brings the best of both worlds:

  • Transparency where needed (on-chain bets, AMM logic via Uniswap v4),
  • Confidentiality where it matters most (user decisions, AI-generated odds, and market outcomes).

How it's Made

✨ Core Technologies:

  • Smart Contracts (Solidity): Built with Uniswap v4 Hooks, allowing us to inject custom swap logic and market behavior directly into the AMM pipeline. We created a PredictionMarketHook contract that:

    • Allows swapping USDC to YES/NO tokens.
    • Manages liquidity for YES-USDC and NO-USDC pairs.
    • Enforces slippage limits and market participation rules.
  • zkProofs & IProver: Market resolution and final outcome verification are done off-chain in a TEE, where a zk-compatible oracle (IProver) fetches event data from a trusted source, generates a zk-proof of the outcome, and submits it to the on-chain verifier.

  • Nillion Secret LLMs Odds Generation: An AI model, triggered by the server wallet, runs in a secure enclave to analyze:

    • The user’s betting history and risk profile.
    • Real-world event data and sentiment. This ensures that betting odds are personalized, tamper-resistant, and generated privately — preventing any data leakage or intent harvesting.
  • Server Wallets via Privy + NilQL: To shield user identity and simplify onboarding, we use Privy and NilQL to instantiate a server-controlled ephemeral wallet per user session. Wallet keys are encrypted on the client using NilQL, ensuring privacy by design.

  • TEE-backed Relayer with Marlin: We use Marlin to relay all server wallet transactions from within a Trusted Execution Environment (TEE). This ensures:

    • Low-latency, censorship-resistant transaction delivery.
    • Wallet key operations and transaction sequencing remain private and verifiable.
    • Enhanced integrity and trust guarantees for critical on-chain interactions.
  • Frontend Stack:

    • Next.js for frontend rendering.
    • Wagmi + Viem for wallet interactions.
    • TailwindCSS for styling.
    • Alchemy + Ethers.js to interact with on-chain data.
background image mobile

Join the mailing list

Get the latest news and updates