Docs · system design

Architecture

Three components, each holding only the power it needs — nothing more. The vault is the only one that ever touches funds.

ComponentWhereRolePower over funds
ArcaVaultonchainERC-20 index token, custody, and every rule — mint, redeem, rebalance rails, invariantsFull — and rule-bound
ArcaUniV4RouteronchainAdapter that runs the vault's swaps across Uniswap v4 (multi-hop through a quote currency)Transient only — pulls in, swaps, and pushes back within one call
AgentoffchainMomentum read → swap plan → submits rebalance() with its rationaleNone — holds only the rebalancer key

ArcaVault

One contract per index: the ERC-20 token, asset custody, and all policy in a single place. Every setting that bears on safety — the asset set, slippage/turnover caps, cooldown, fee cap, supply ceiling — is immutable once deployed. What stays mutable (guardian actions) is kept deliberately small, and can never move balances or block redemption.

ArcaUniV4Router

The vault never speaks Uniswap directly; it calls one clean interface — swap(tokenIn, tokenOut, amountIn, minOut). The adapter follows an owner-registered route of v4 pools (stock → quote → stock, since stocks pair against a quote currency, not each other) inside a single lock. Toward funds it holds no state: a malicious or buggy route can at worst burn one approved amountIn— already bounded by the vault's turnover and slippage rails — and can never drain custody.

The agent

Runs offchain: fetch prices → compute momentum-tilted target weights (with per-asset caps) → plan the smallest set of swaps within the turnover budget → submit. Its key is a rebalancer session key — the only function it can successfully call on the vault is rebalance().

  • If the agent dies, the product degrades gracefully — mint and redeem keep working; the basket simply stops rotating.
  • If the key leaks, the attacker inherits the same cage — bounded trades inside the rails, and no withdrawals.

Price oracles

Valuation reads Chainlink stock feeds (AggregatorV3Interface, 8 decimals) — the official oracle stack on Robinhood Chain. Oracles gate rebalance quality (slippage checks and NAV); they are deliberately not in the redemption path.

Oracle note

Mainnet points at the verified Chainlink feed proxies for all five constituents, with a staleness bound and an optional L2 sequencer-uptime check. Oracles price rebalance guardrails and NAV only — mint and redeem are in-kind and never read a price, so a paused feed can never lock your exit.