← Back to profile

Jones DAO · Arbitrum · 2023 – 2024

Metavaults: one LP, three market views

Liquidity providers pick a view on the market instead of a strategy. The same LP token goes into a Bull, Crab or Bear vault; all three farm and auto-compound, and Bull and Bear also spend part of their LP every epoch on call or put options.

vaults per LP: Bull, Crab, Bear
3
contracts deployed per metavault
11
commits (Mar 2023 – Mar 2024)
849
  • Solidity 0.8
  • Foundry
  • ERC-2535 Diamond
  • Beacon proxies
  • ERC-1167 clones
  • ERC-4626
  • EIP-712
  • Dopex SSOV
  • Valorem + Seaport
  • Arbitrum

01Three ERC-4626 vaults per LP

LP token

e.g. DPX-WETH · Sushi

Router · ERC-2535 Diamond

facets resolved through beacons

BULL

farm + calls

CRAB

farm only

BEAR

farm + puts

Auto-compounding farm

Sushi MiniChefV2

Options

Dopex SSOV · Valorem

Vault

BULL

Farms and auto-compounds the LP, and each epoch uses a configurable fraction of it to buy call options — upside on top of the farm yield.

Vault

CRAB

Pure auto-compounding farm: the LP stays staked and rewards are compounded back, for a sideways market view.

Vault

BEAR

Farms and auto-compounds the LP, and each epoch uses a configurable fraction of it to buy put options — protection on the way down.

02The epoch lifecycle

  1. Step 1

    Start epoch

    The keeper opens the epoch with its expiry and the Bull / Bear risk fractions. The compound strategy moves that share of LP to the option strategy and stakes the rest.

  2. Step 2

    Buy options

    The option strategy breaks the LP into its tokens and buys calls for Bull and puts for Bear through the option adapters.

  3. Step 3

    Deposit any time

    Deposits queue for the next epoch — or enter instantly mid-epoch with parameters signed off-chain (EIP-712), buying the matching options on the spot.

  4. Step 4

    End epoch

    Farm rewards are compounded, options are settled and the proceeds are rebuilt into LP.

  5. Step 5

    Settle the queue

    Signalled withdrawals, deferred deposits and flips between Bull, Crab and Bear are processed at the epoch boundary.

03Architecture

The user-facing router is an ERC-2535 Diamond with a twist: every function selector points to an upgradeable beacon instead of a facet, so the fallback resolves the implementation through the beacon and delegates to it. Each facet keeps its state in namespaced diamond storage.

Deposit facet

Instant or next-epoch deposits, signature verification for mid-epoch entries, and claiming of deferred deposits.

Withdraw facet

Signal, cancel and withdraw after the epoch — or withdraw instantly with a retention fee.

Flip facet

Signal a move of shares between Bull, Crab and Bear, executed at epoch end.

Router facet

Parameters, signer, slippage and retentions, pause, emergency withdrawal and the end-of-epoch hook.

A factory that ships a metavault in one call

For any LP whitelisted in the registry, the Factory deploys 11 components — the three vaults and the farm, LP and swap adapters as ERC-1167 clones, the strategies as beacon proxies and a Diamond router — and wires every operator role between them.

Upgrade layerHow
Router facetsEach selector points to a beacon: upgrading a beacon upgrades that facet on every router.
StrategiesCompound and option strategies are beacon proxies, upgraded once for every metavault.
Shared servicesFactory, manager, registry, viewer and zap sit behind transparent proxies.

Vaults and adapters are immutable clones.

04Integrations

Dopex SSOV v3

Calls and puts on the SSOV, converting collateral through Curve and Balancer.

Valorem

Options bought as Seaport 1.5 orders and exercised with a Uniswap V3 flash loan.

SushiSwap

LP building and breaking, swaps, and farming on MiniChefV2.

Swap adapters

Sushi, Uniswap V3 (with a spot-vs-TWAP manipulation check), 1inch, 0x and Balancer.

Chainlink

USD pricing for ETH, USDC, stETH and wstETH.

Tested with Foundry against Arbitrum forks — epochs, instant deposits and withdrawals, the Diamond, the factory and every adapter — plus fuzz suites run at 100,000 iterations in CI.

Built while I was Senior Solidity Developer at Jones DAO. Details are summarized from the metavaults repository.