hMAG7 Protocol Documentation

Everything you need to verify, integrate or build on the first MAG7 index token on-chain.

Overview

hMAG7 is an ERC-20 index token on Robinhood Chain (chain ID 4663), fully collateralized by an equal-weight basket of the seven "Magnificent Seven" stock tokens issued on-chain by Robinhood: AAPL, MSFT, GOOGL, AMZN, NVDA, META and TSLA. It replicates the creation/redemption mechanics of a traditional ETF, with the fund administrator replaced by an immutable smart contract.

Architecture

hMAG7 protocol value flow diagram
ContractRoleTrust model
IndexVaultThe hMAG7 token. Holds collateral, mints and redeems in-kind.Immutable basket, hard-capped fees, no upgradeability, no pause. Owner can only adjust fees within caps and set the fee collector.
NavLensView-only NAV, creation cost and basket breakdown via Chainlink.Stateless. The vault does not depend on it.
ZapV4One-click mint: takes ETH, buys the seven components on Uniswap V4 and mints them in-kind β€” one transaction, no approvals.No owner, no admin functions. msg.value is a hard ceiling, minSharesOut guards slippage, everything unspent is refunded. Holds nothing between transactions.
FeeConverterReceives all protocol fees; converts them to WETH and executes the $M7 buyback.No withdrawal function. Exactly two exits: the burn address and the staking pool. Component sales enforce a Chainlink price floor on-chain.
M7StakingStake $M7, earn WETH from protocol fees.No owner, no admin functions. Pro-rata accumulator; rewards received while nobody stakes are buffered, not lost.
IndexFactoryPermissionless creation of new index vaults + on-chain registry.hMAG7 is index #1. Every index created inherits the same guarantees.

Mint & redeem

Minting

The vault itself only knows one way to mint: in-kind. You deposit the exact per-share quantity of each of the seven components (the "creation unit") and receive freshly minted hMAG7. Quantities are fixed at deployment so that one share started at β‰ˆ $100 of equal-weight exposure. This is deliberate β€” it means minting and redeeming never depend on DEX liquidity.

amountsForMint(shares) β†’ uint256[7]   // exact deposit per component
mint(shares, to)                      // pulls components, mints shares (0.30% fee)

One-click mint (ZapV4)

Sourcing seven stock tokens yourself is friction almost nobody will accept, so ZapV4 wraps the in-kind mint in a single transaction: you send ETH, it buys the exact components on Uniswap V4 and mints them into the vault for you. No approvals, no seven separate trades. Unused ETH is refunded in the same transaction.

zapMint(ethUsdgPool, stockPools[7], shares, minSharesOut, to) payable

Inside one PoolManager.unlock() it does seven exact-output swaps for the components, then a single ETH→USDG swap that covers exactly the USDG owed. The deltas net to zero, so only ETH is ever settled. The app quotes every candidate pool per component and picks the cheapest — routing through USDG or directly through an ETH pool, whichever prices better.

Why Uniswap V4 and not 0x: the 0x Swap API refuses every one of these tokens outright β€” BUY_TOKEN_NOT_AUTHORIZED_FOR_TRADE, "due to legal restrictions" β€” in both directions. The Uniswap V3 pools are empty. V4 is where the liquidity actually is.

ZapV4 has no owner and no admin functions. It holds nothing between transactions: whatever it doesn't spend goes straight back to you. Your msg.value is a hard ceiling and minSharesOut is your slippage guard.

Redeeming

Redemption burns your shares and pays out all seven components pro-rata against actual vault balances β€” rounding dust accrues to remaining holders, so the vault can never become insolvent. Redemption does not touch any DEX: your exit works regardless of secondary-market liquidity, and there is no function that can pause it.

redeem(shares, to) β†’ uint256[7]       // burns shares, transfers components (0.30% fee)

Pricing & oracles

Every component has a Chainlink AggregatorV3Interface USD feed on Robinhood Chain (8 decimals, 24h heartbeat, 0.5% deviation threshold). Two properties matter:

NAV is computed by NavLens as Ξ£ (vault balance Γ— Chainlink price). If hMAG7 trades away from NAV on a DEX, arbitrage via mint/redeem pulls it back.

Fees

FeeRateHard cap (compile-time)
Mint0.30%1.00%
Redeem0.30%1.00%
Streaming (management)1.00% / year2.00% / year

Fees accrue in hMAG7 shares to the FeeConverter. The caps are constants in the bytecode β€” no admin, DAO or exploit can raise fees above them.

$M7 tokenomics

$M7 is the protocol's value-capture token. It has not launched yet, and this page will not pretend otherwise β€” supply, distribution and listing are still open. What already exists is the pipeline that will feed it, and that pipeline is the only path protocol fees can take:

hMAG7 fee shares
  β†’ redeemed into the 7 stock tokens
  β†’ sold for WETH   (Chainlink price floor, max 1% slippage, on-chain)
  β†’ split: burn share β†’ buys $M7 β†’ sent to 0xdead (totalBurned())
           staking share β†’ WETH to M7Staking (set once, max 50%)

Additionally, the launch platform's creator fees (WETH) earned on $M7 trading volume are routed into the same pipeline.

Staking

M7Staking is a minimal, ownerless staking contract: stake $M7, earn WETH. Rewards are distributed pro-rata using a per-share accumulator. Rewards that arrive while total stake is zero are buffered and released with the next distribution. There is no lock-up, no cooldown and no admin key.

stake(amount) / withdraw(amount) / claim()
pendingReward(user) β†’ uint256   // claimable WETH

Index Factory

Anyone can create a new index with the same guarantees via IndexFactory.createIndex(...) β€” the basket becomes immutable at creation, fee caps apply, and the vault is registered in the on-chain registry (getAllIndexes()). hMAG7 is index #1.

Creator economics

Index creators earn from their index. At creation you choose the feeCollector; the recommended setup is an IndexFeeSplitter β€” an immutable, ownerless contract that routes a fixed share of all fees (in index shares) to the creator and the remainder into the $M7 buyback pipeline. The split is fixed forever at deployment, and distribute() is permissionless.

factory.createIndex(name, symbol, tokens, units, 30, 30, 100, creator)
new IndexFeeSplitter(vault, creator, protocolCollector, 5000)  // 50/50
vault.setFeeCollector(splitter)                                 // done

Security model

The full test suite (30 unit tests + mainnet fork tests) and sources are available for review. All contracts are verified on Blockscout at launch.

Addresses (Robinhood Chain Β· 4663)

ContractAddress

RPC: https://rpc.mainnet.chain.robinhood.com Β· Explorer: robinhoodchain.blockscout.com

Risks

Terms & Risk Disclosure β†’