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
- Start a chain
- Deploy contracts
- Run operator
- Run frontend
- 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
--port 3333 if 3000 is taken.
See also: Quickstart, System architecture, and EigenCompute & operators.