QHooks Lab / Volume Epochs

Give every epoch a budget.

Set a time window and an input-token budget for each swap direction. Opening the next epoch requires both wallet and post-quantum approval.

Integration notes

local builds · not independently audited.

Configuration

Swaps are allowed at the start, but not at the end. End minus start must equal the epoch duration. The example uses fixed test timestamps 2,000,000,000–2,000,003,600; set your local chain clock inside that window, or choose your own window before deployment.

Each budget is a positive integer in that token’s smallest units—not a dollar amount. Token 0 input is metered for 0 → 1 swaps; token 1 input for 1 → 0. Actual executed input includes fees. Token decimals matter.

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 builder targets local chain 31337. It uses the optional ML-DSA profile, with expensive onchain key setup—not the cheaper hash-based profile. Its one-time key setup takes about 40M gas, which fits within a single transaction only on Base and BNB Chain; Ethereum, Arbitrum and Robinhood Chain cap transactions below that. Token launches use the hash-based profile and are not affected. Building here is free and does not connect a wallet, enroll keys, deploy contracts or move funds. Deploying to a public chain (below) instead uses the hash-based SLH-DSA key profile token launches use: about 1M gas for the shared verifier, once per chain, so it fits every supported chain.

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.

Epoch 0 starts with zero usage. Budgets are pool-wide, not per-wallet: any trader can consume them. Caps are inclusive; partial fills count only what executed. Exhaustion or expiry can pause swaps. Liquidity operations are unaffected.

Renewal is never automatic or early. Both authorizations bind the exact previous and next epoch; duration stays fixed and past usage remains recorded. Future gaps and missing signers can pause trading. This is not an oracle, identity control or anti-whale guarantee.

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

Other Lab templates · Volume Epochs 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.