Skip to main content
Focused on the protocol, operator, and frontend. Docs preview instructions are at the end if you’re editing this repo.

Stack Overview

  • Contracts: Uniswap v4 hook + shielded vault in packages/fhevm-hardhat-template.
  • Operator: EigenCompute runner + CoFHE processor client in packages/fhevm-hardhat-template/avs.
  • Frontend: Encrypts intents, submits multi-trade sessions, and tracks batches.
  • Docs: MDX content in mintlify-docs.

Local Dev Loop

  1. Start a chain
anvil
  1. Deploy contracts
cd packages/fhevm-hardhat-template
npx hardhat deploy --network localhost
  1. Run operator
cd packages/fhevm-hardhat-template/avs
pnpm install
pnpm run start:operator   # points to your CoFHE processor endpoint
  1. Run frontend
cd packages/site   # or the UI package path
pnpm install
pnpm run dev
  1. Iterate
  • Tweak batch duration, max intents, and coprocessor endpoint in config.
  • Use mock ciphertext fixtures to exercise UI flows without a live coprocessor.
  • Add contract tests for edge cases: expired intents, minOut violations, replay protection.

Environment Configuration

  • CoFHE public key: shipped to the frontend; rotate via config.
  • Operator endpoints: URL + credentials for the CoFHE processor.
  • Networks: RPC URLs for Ethereum (or Anvil) and any L2s used in UTI simulations.
  • Telemetry: enable metrics/logging for decrypt latency and match success rate.

Testing Pointers

  • Contracts: Hardhat/Forge tests for balance math, access control, and batch settlement.
  • Operator: Integration harness for decrypt → simulate → attest paths; ensure policy failures are surfaced.
  • Frontend: Component tests with mocked events; verify state transitions (queued → simulating → settling → finalized).

Preview these docs

npx mintlify@latest dev
# visit http://localhost:3000
Use --port 3333 if 3000 is taken. See also: Quickstart, System architecture, and EigenCompute & operators.