swarm calm·reads refresh every 30s

docs

everything you'd ask about how mirv works, in plain language. for the really technical bits — contract source, audits, hook internals — links at the bottom.

✿ how you make money

You earn from swap fees on Uniswap V4 pools. Not from arbitrage, not from yield farming, not from any token emissions.

When you deposit USDC, the protocol parks it as liquidity in our V4 pools — one on Base, one on Ethereum. Every trader who swaps through those pools pays a 0.30% fee. Your share of those fees scales with your share of the in-range liquidity at the moment of each swap.

When you withdraw, your shares are worth more than what you put in, because the pools have collected fees while you were in.

mirv is never the taker — we don't arbitrage between pools or run MEV. We're just a liquidity provider that happens to live on two chains at once.

❀ where the "extra" comes from

A passive cross-chain LP has to pick allocations upfront — say 50/50 — and live with it. If Base has 80% of the trading volume that week, a passive LP loses ~30% of potential fees because too much capital sits idle on the wrong chain.

mirv's agent swarm rebalances every 45 seconds. If Base's pool is paying more fees per dollar of liquidity, USDC shifts from Ethereum to Base via Circle CCTP. Your LP is always concentrated where the volume is.

illustrative math at $1M TVL, $10M weekly cross-chain volume

strategyfee captureannual yield
passive 50/50 split~60% of theoretical max~6.0% APY
mirv rebalance~90%+~9.0% APY
extra yield (mirv – passive)+3.0% APY
you keep 85% of the extra+2.55% APY on top

real ratios depend on actual pool depth and volume distribution. numbers above are illustrative.

✦ what happens when you deposit

  1. 1. You approve USDC to the vault, then call deposit on Base.
  2. 2. The vault mints you mirvUSDC shares. Initially 1 share = 1 USDC.
  3. 3. The vault splits your USDC by the chain registry. Today: 60% stays on Base, 40% gets bridged to Ethereum via Circle's CCTP burn-and-mint.
  4. 4. Within ~20 minutes, the bridged USDC arrives on Ethereum and lands at the Relayer contract.
  5. 5. The agent reports the cross-chain balance, so the vault's totalAssets reflects the full amount.
  6. 6. The agent (or a triggered hook callback) adds the USDC as LP into each chain's V4 pool, paired with WETH.

Between steps 3 and 5 your share price will briefly look lower than $1 because the cross-chain portion isn't yet accounted for. This settles within one agent cycle (~45s) once the agent reports.

✿ how you withdraw

if there's enough USDC on Base

You redeem your shares and get USDC in the same transaction. Synchronous, no waiting.

if cross-chain unwind is needed

Your withdrawal goes into a queue. The agent pulls liquidity on Ethereum, CCTP-bridges the USDC back, and fulfills your request. Usually a few minutes. If the agent fails to fulfill within 24h, you can cancel and get your shares back.

✦ the agent swarm

Four agents, all powered by Claude, cooperate to decide when and how to rebalance. They run on a 45-second cycle.

the readers (×2)

One per chain. They read pool depth, recent volume, fee accrual, and oracle prices. They report back what each side looks like.

the strategist

Compares both chains. If one is clearly paying more per dollar of liquidity, plans a move — how much USDC to shift, what tick range to add into.

the veto

Double-checks every plan against the safety rules. Blocks moves that are too big, badly priced, or fire too often. Has the final say.

the hand

The only one that signs transactions. Executes the plan once the veto agent clears it, paying the bridge fee.

❀ what bounds the swarm

The agents are LLMs and could be wrong. The protocol assumes they will be wrong sometimes and bounds the damage in code:

  • No move can shift more than 25% of total assets in a single cycle. Even a compromised agent can't drain the vault.
  • Two independent price feeds (Pyth + Chainlink) must agree within 5% before anything moves.
  • Depth updates from the other chain are capped at 10× any prior reading. Stops impossible-looking spikes from triggering bad moves.
  • There's a 60-second cooldown between rebalances. The agents can't fire-hose dispatches.
  • Treasury changes are delayed 24 hours. If the owner changes where fees go, you have a full day to leave first.
  • Cross-chain reports older than 1 hour are rejected. If the agent goes silent, the vault won't act on stale data.
  • You can always start a withdrawal. No admin override on the user exit path.

Internal test suite is at 135 passing tests. Slither, Mythril and Foundry fork-tests have been run against the rc6 bytecode. Not yet externally audited — mainnet is gated on that.

❀ what has to be true for this to actually be useful

We're being honest here, because Uniswap and other smart people will ask. mirv's pools are permissionless — anyone with USDC + WETH can add LP to them. But on day one, nobody will, because there's no incentive to use our pool over the canonical Uniswap one if they're shallower.

That means today the swarm is mostly managing the vault's own positions across two chains. It's a real protocol with real cross-chain mechanics — but to earn fees for depositors, our pools need external swap volume, and that requires:

  • Seed depth at mainnet launch — treasury seeds $500k–$1M per chain so routers consider us competitive.
  • Router + aggregator integration — Uniswap Universal Router, 1inch, Matcha need to know our pool exists and route through it. We're working toward this.
  • The hook's cross-chain primitive being adopted — our actual edge is that routers can read cross-chain depth from a single contract call. That's what makes mirv ≠ "just another LP."
  • Smarter agents — the swarm needs to also monitor canonical pools (not just our own) to detect when our pool is non-competitive and adjust.

The contracts are validated end-to-end. The mechanism works. The go-to-market — getting volume to flow through — is the next phase. See the README's "Pre-mainnet must-haves" section for the work plan.

✿ the V4 hook (for technical readers)

mirv's interesting trick is that depth isn't a per-chain phenomenon anymore. The MirrorHook exposes a cross-chain depth primitive that any contract on either chain can read, packaged behind a single quoter interface:

// IMirrorHookQuoter — the "menu" routers + aggregators call
function quoteCrossChainPool(bytes32 poolId)
  external view returns (CrossChainQuote memory);

struct CrossChainQuote {
  uint256  localDepthUsd;
  uint256  sisterChainsCount;
  uint256[] sisterDepthsUsd;
  uint32[]  sisterDomainIds;
  uint256  totalCrossChainDepthUsd;
  uint256  crossChainAdvantageBps;  // local vs best sister
  bool     reliable;
}

One call, one struct, the entire cross-chain depth picture. No off-chain indexer required. ~10k gas at 0 sisters, ~12k with one. Suitable for inclusion in a V4 quoter's hot path.

A reference router-side caller ships at examples/ExampleRouterIntegration.sol in the repo with two patterns: shouldRouteThroughMirv() (yes/no for a given swap size) andfindDeepestChain() (best sister to route through).

V4 pool identity is (currency0, currency1, fee, tickSpacing, hooks) — attaching a different hook means it's a different pool. So mirv runs its own USDC/WETH pool on each chain, separate from the canonical Uniswap pool. We don't compete with that pool; we add a hook-coordinated lane next to it.

✦ contract addresses

rc6 candidate, live on testnet. all verified on the explorers.

contractchainaddress
MirrorVaultBase Sepolia0x062b9E54…eAf37b
MirrorHookBase Sepolia0xA059C854…26c540
MirrorFactoryBase Sepolia0xC3e117CD…ebC2A7
TreasuryBase Sepolia0x00288400…780392
MirrorHookEthereum Sepolia0xc3233eb9…148540
RelayerEthereum Sepolia0x5D7BA93B…43b727

❀ frequent questions

is this audited?

not yet by an external firm. mainnet launch is gated on that. internally we run 135 tests + slither + mythril + foundry fork tests, and have a recommendations matrix (R-1..R-13) that's all landed in the rc6 bytecode.

can it work for pairs other than USDC/WETH?

yes — the architecture is pair-agnostic. the factory deploys a fresh vault/hook/relayer for any pair, and the hook's canonicalPairId works for any V4 pool. USDC pairs are easiest today because Circle CCTP gives us canonical USDC bridging out of the box. for non-USDC assets (e.g. USDT/WETH) we'd use Hyperlane warp routes — the chain registry has slots prepared, just not wired yet. volatile pairs also need Pyth + Chainlink coverage on both chains for the dual-oracle safety check.

what if the agent goes rogue?

the worst it can do per cycle is shift 25% of total assets, with a 60-second cooldown, and only between chains the registry already enabled. it can't drain the vault, can't add new chains, can't change fee destination. user withdrawal path has no agent dependency.

what if anthropic blocks the api key?

currently the swarm would stop until we rotate keys. the next big infra item is x402-funded LLM payments — the vault pays per-call via http 402 micropayments, so no single key-holder can unilaterally turn off the swarm. it's a planned upgrade, not live yet.

do my deposits sit on the destination chain forever?

no. withdrawals can pull from either chain. if there's enough on base you withdraw synchronously. if not, the agent unwinds the position on ethereum and bridges back via cctp.

what's the fee?

15% performance fee on the EXTRA yield above what a passive lp would have earned. you keep 85% of the alpha. no fee on principal, no fee on baseline lp earnings — only on the part mirv's rebalancing produces.

what's the slippage / impermanent loss story?

you have all the normal impermanent loss exposure of being a usdc/weth lp on each chain. cross-chain rebalancing doesn't add new IL beyond what a single-chain lp would have. the swarm doesn't take impulsive directional bets; it moves capital toward the chain with more volume.

can i use this on mainnet today?

no — testnet only. mainnet launch is gated on external audit and a treasury multisig setup. follow the github for updates.

want the full architecture? parameters + safety set · source on github

mit licensed · not audited yet · no warranty