Architecture
Four contracts, one SDK and a keeper. What each piece does and how an operation flows through them.
The pieces
| Piece | Role |
|---|---|
| LQNT | A standard ERC-20 launched on the Volta launchpad. It trades from launch on its own Volta pool on Uniswap v4 (HYPE pair). It knows nothing about the vault. |
Xmss | A Solidity library: recovers the key and the leaf of a hash-based signature. Pure function, hand-written in assembly. |
QuantumVault | Holds every shielded token. Keeps accounts, keys and leaf counters; verifies signatures; is itself an ERC-4337 account. |
QuantumRouter | Buys with HYPE straight into an account, and sells a shielded balance straight to HYPE. Holds nothing between transactions. |
FeeHarvester | Holds the token's Volta creator NFT, so it receives the creator share of the swap fees. Splits the fees and turns the holders' half into gas for the vault and tokens donated to it. |
Upgradeable | The upgrade rights the vault, the router and the harvester share. Each runs behind an ERC-1967 proxy (UUPS); one upgrader role may upgrade it, and can renounce that for good. |
| SDK | TypeScript: key generation, signing, leaf bookkeeping, operation encoding, ERC-4337 submission. |
| Keeper | A small service that calls the permissionless harvest when there is work to do and keeps the vault's price average current. It holds no privileges. |
Entering
wallet ──HYPE──▶ QuantumRouter.buy(account, minOut)
│ swap on the Volta pool
▼
QuantumVault.shield(account, tokens) ──▶ shares credited to the accountshield can also be called directly by any holder of the token. The account is a bytes32: nothing has to be
registered first.
Operating
An account owner signs an Op with a leaf of the account's key. Two paths carry it to the vault:
┌── any address ──▶ QuantumVault.transact(op, signature)
signed Op ──┤
└── bundler ──▶ EntryPoint ──▶ QuantumVault.validateUserOp (signature checked, books updated)
└─▶ QuantumVault.execute4337 (exit paid out or sold)Both paths end in the same internal function, which enforces the same rules: the signature must recover to the account's current key, and its leaf must not be below the account's counter.
Leaving
An operation with exitShares takes tokens out of the vault's backing. They go to recipient, or to an exitTarget
contract that handles them: the router is one, and turns them into HYPE for the recipient.
The loop
every trade ──swap fee──▶ Volta ──creator share──▶ FeeEscrow ──▶ FeeHarvester.harvest()
├─ 50% ─▶ team
└─ 50% ─▶ vault gas deposit (EntryPoint)
└▶ buy LQNT ──▶ donated to the vaultThe gas deposit is what lets accounts operate with no HYPE. The donated tokens raise the value of every share. Both are funded by trading volume, on-chain, by a function anyone can call.