QHooks Lab / Circuit Recovery

A pause with a protected restart.

Set a per-swap input threshold for each direction. A threshold-reaching trade completes, then later swaps pause. Recovery requires both wallet and post-quantum approval after your cooldown.

Integration notes

local builds only (ML-DSA key setup fits only Base and BNB Chain) · not independently audited.

Configuration

Each threshold is a positive integer in that token’s smallest units—not a dollar amount. Token 0 input applies to 0 → 1 swaps; token 1 input to 1 → 0. Actual executed input includes fees. Token decimals matter. These are per-swap thresholds, not cumulative budgets.

Build & exports

Downloads

What your build includes

Your configured controller, governed hook, manager, key registry and verifier, plus the complete 64-file Solidity source project and compiler input. Exports include helper bytecode and third-party notices.

This downloadable build targets local chain 31337 and uses the optional ML-DSA profile, whose one-time key setup takes about 40M gas and fits a single transaction only on Base and BNB Chain. Deploying to a public chain below uses the hash-based SLH-DSA profile token launches use. Building here does not connect a wallet, enroll keys, deploy contracts or move funds. Creator Revenue and Dynamic Fees also use the hash-based profile for public-chain deployment.

Integration notes

Supply verified infrastructure, ordered ERC20 addresses, a policy, wallet owner and enrolled public key at deployment. Find the hook permission salt for the actual controller address and child initcode. No test keys or private keys are included.

Either direction reaching its threshold pauses both directions after that trade completes. Partial fills use actual executed input. Liquidity operations are unaffected. This is not a stop-loss, oracle, price guarantee or protection against LP losses.

Recovery binds the exact previous trip and old/new thresholds. Generation and trip history remain recorded. The manager must be locked. Missing signers can leave trading paused indefinitely.

The base contracts have local integration tests. Compiling your settings does not run a new behavioral test. Connected recovery-governance and deployment are separate workflows.

Other Lab templates · Circuit Recovery details

All QHooks tools

Your wallet

No wallet extension needed. Your QWallet quantum key stays separate.

Connect your phone with a QR code.

Uses MetaMask Connect, copyright ConsenSys. License

Choose an EVM wallet.

No wallet detected in this browser.

Open qhooks.com in Chrome with your wallet extension enabled, or in your wallet app’s built-in browser.

The in-app preview cannot access Chrome’s wallet extensions. Use MetaMask Mobile above to pair your phone.

Connecting does not authorize spending. Every signature and transaction needs your approval. Never enter your recovery phrase here.